Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where to get the box feature? the bbox_file is empty. how to gererate the box feature from image? #115

Open
ekma000 opened this issue Apr 3, 2024 · 0 comments

Comments

@ekma000
Copy link

ekma000 commented Apr 3, 2024

` elif cfg.MODEL.BUA.EXTRACTOR.MODE == 3: # extract roi features by bbox
npy = False
bbox_path = os.path.join(args.bbox_dir, im_file.split('.')[0])
if os.path.exists(bbox_path + '.npy'):
npy = True
bbox_file = bbox_path + '.npy'
elif os.path.exists(bbox_path + '.npz'):
bbox_file = bbox_path + '.npz'
else:
continue

        try:
            if npy:
                bbox = torch.from_numpy(np.load(bbox_file, allow_pickle=True).tolist()['bbox']) * dataset_dict['im_scale']
            else:
                bbox = torch.from_numpy(np.load(bbox_file)['bbox']) * dataset_dict['im_scale']
        except Exception as e:
            print(e)
            continue`

where to get the box feature? the bbox_file is empty. how to gererate the box feature from image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant