YoungXIAO13 / FewShotDetection

(ECCV 2020) PyTorch implementation of paper "Few-Shot Object Detection and Viewpoint Estimation for Objects in the Wild"
http://imagine.enpc.fr/~xiaoy/FSDetView/
MIT License
211 stars 33 forks source link

COCO training missing annotation files? #24

Closed atiszabo closed 3 years ago

atiszabo commented 3 years ago

Hi,

congratulations on the nice paper and repository! I am trying to reproduce the results on COCO with @hjraad, but I've ran into two problems:

Problem 1) Seems I don't have 2 annotations files. I've tried to run train_coco.sh when got this error on two missing files:

FileNotFoundError: [Errno 2] No such file or directory: 
 /FewShotDetection/data/coco/annotations/instances_valminusminival2014.json'
FileNotFoundError: [Errno 2] No such file or directory: '/FewShotDetection/data/coco/annotations/instances_minival2014.json'

I've downloaded COCO following the README.md under data, I obtained these files from the annotations:

instances_train2014.json
captions_train2014.json
instances_val2014.json
captions_val2014.json
person_keypoints_train2014.json
instances_shots2014.json
person_keypoints_val2014.json

How should I get the missing files? Do I miss anything? Thanks in advance

Problem 2) I tried to run finetune_coco.sh as well with the provided base checkpoint, but it also got some problems with loading the data. Somehow it only loads 2 images wheres it should do 10 shot for multiple classes, which I guess should be more. Please see below:

Namespace(TFA=False, batch_size=4, checkepoch=20, checkpoint=21985, checkpoint_interval=10000, checksession=200, class_agnostic=False, cuda=True, dataset='coco', disp_interval=100, fix_encoder=False, log_dir='checkpoint', lr=0.001, lr_decay_gamma=0.1, lr_decay_step=4, max_epochs=30, meta_loss=True, meta_train=True, meta_type=0, net='metarcnn', num_workers=8, optimizer='sgd', phase=2, resume=True, save_dir='save_models/COCO', session=1, shots=10, start_epoch=1, use_tfboard=True)

[...] Loaded dataset coco_2014_shots for training [...] before filtering, there are 2 images... after filtering, there are 2 images...

Any clues on this? @YoungXIAO13

Thanks!

YoungXIAO13 commented 3 years ago

Hi @atiszabo ,

For Problem 1), thanks for spotting this issue, I've updated the README with the instruction and file links for downloading these two json files.

For Problem 2), I suggest to check the json files you've downloaded, or delete the https://github.com/YoungXIAO13/FewShotDetection#coco file and re-run the code to re-generated this file, this should give you at least hundreds of images in the case of 10-shot.

hjraad commented 3 years ago

@YoungXIAO13 : thanks for being responsive and for maintaining your repo!