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

Dear author, I would like to ask what may cause the following problems in the process of generating support sets when running your code: #20

Open
yinchuchen opened this issue Dec 6, 2022 · 3 comments

Comments

@yinchuchen
Copy link

Dear author, I would like to ask what may cause the following problems in the process of generating support sets when running your code:

python datasets/coco/2_gen_support_pool.py
[u'info', u'licenses', u'images', u'annotations', u'categories']
loading annotations into memory...
Done (t=5.84s)
creating index...
index created!
0
('path:', '/home/lthpc/Annotation/CH/Meta-Faster-R-CNN-main/datasets/coco/support/trainval2014/COCO_train2014_000000262146.jpg')
/home/lthpc/Annotation/CH/Meta-Faster-R-CNN-main/datasets/coco/support/trainval2014/COCO_train2014_000000262146.jpg
('img.shape', None)
Traceback (most recent call last):
File "datasets/coco/2_gen_support_pool.py", line 267, in
support_df = main()
File "datasets/coco/2_gen_support_pool.py", line 243, in main
support_img, support_box = crop_support(im, bbox)
File "datasets/coco/2_gen_support_pool.py", line 51, in crop_support
image_shape = img.shape[:2]# h, w
AttributeError: 'NoneType' object has no attribute 'shape'

@GuangxingHan
Copy link
Owner

GuangxingHan commented Dec 6, 2022

The reason might be that the program does not find the original jpg files. Can you double confirm that the two above image files are good?

@yinchuchen
Copy link
Author

Hello, I checked that the picture exists in ./coco/train2014/, and whether ./coco/support/trainval2014/is created by 2_ gen_ support_ pool. Whether there is a problem in the generation process, or whether there are any files that need to be downloaded

@GuangxingHan
Copy link
Owner

GuangxingHan commented Dec 6, 2022

  1. Yes, coco/support/trainval2014 is created by the script.
  2. As far as I know, lots of people have used this projects so far, and I did not know any problem about this yet.
  3. We prepare the dataset following TFA (https://github.com/ucbdrive/few-shot-object-detection/blob/master/datasets/README.md#coco). One thing to keep in mind is to copy the original val images to the train folder. But as you can find the images with the printed path, it should not be a problem.

Can you debug the python script yourself? Although I am not clear about the exact problem, I think it may not be a big issue.

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

2 participants