ucbdrive / few-shot-object-detection

Implementations of few-shot object detection benchmarks
Apache License 2.0
1.1k stars 223 forks source link

COCO Structure #88

Closed HeliosZhao closed 3 years ago

HeliosZhao commented 3 years ago

Hi,

Thanks for your code, but I have a question about COCO.

When I finetune the novel weights on coco, I could not load the image.

python -m tools.train_net --num-gpus 1 \
        --config-file configs/COCO-detection/faster_rcnn_R_101_FPN_ft_novel_10shot.yaml \
        --opts MODEL.WEIGHTS checkpoints/coco/faster_rcnn/COCO_base_model/model_reset_remove.pth

The error is

FileNotFoundError: [Errno 2] No such file or directory: 'datasets/coco/trainval2014/COCO_val2014_000000482978.jpg'

The coco data structure is the same with https://github.com/ucbdrive/few-shot-object-detection/blob/master/datasets/README.md :

datasets/ 
    coco/
        train2014/
        val2014/
        annotations/

There is no dataset "trainval2014" ?

davesie commented 3 years ago

I fixed that by combining the two folder into one. So it would look like this:

datasets/ 
    coco/
        train2014/
        val2014/
        trainval2014/
        annotations/

because if you take a look at this part where the dataset gets registered, they just register the val2014 and trainval2014 folder. The test2014 is not needed as I see it.

HeliosZhao commented 3 years ago

@davesie Yeah, it works fine. Thanks!

davesie commented 3 years ago

Glad I could help =)

Wei-i commented 3 years ago

Glad I could help =)

thanks for your help for meeting the same issue:)))))