jshtok / RepMet

Few-shot detection for visual categories
Apache License 2.0
108 stars 18 forks source link

How to train and evaluate RepMet on COCO dataset? #23

Closed duynn912 closed 4 years ago

duynn912 commented 4 years ago

Hi @jshtok,

I am sorry for bothering you again. I noticed that the backbone of few shot detection in RepMet was trained on COCO, so I was wondering what I need to do if I want to train RepMet and evaluate it on COCO again. Could you show me a way to do so? And Do I need to train COCO and ImageNetLOC together to leverage the knowledge from ImageNetLOC like the one you did for PASCAL VOC or I just train RepMet on COCO not combining it with ImageNetLOC?

Thank you very much! Sincerely, Duynn

jshtok commented 4 years ago

Hi Duynn, The logic here is simple. The set of few-shot categories must not be seen during any fully-labeled training stage, beit initial pretraining or later training on base classes. You may split COCO categories into two sets, (pre)train on one and test on another. If you choose the Pascal categories (subset of COCO) to be the base categories, you can base-train on Pascal, too. Same holds for ImageNet.

Hope this helps, Joseph

duynn912 commented 4 years ago

Hi @jshtok,

I am sorry for bothering you again!

I have an unclear code in the coco.py. In line 73 you load a train_cats_split.txt but after you read it, you save it into a parameter test_class_list in line 75. What dose it means? Does this file contain a list of training data samples or a list of training classes? Could you please share this file with me? image

jshtok commented 4 years ago

Hi,

This file is used when one wants to train on the subset of categories of the given dataset. Please see the files attached.

Regards,

On Tue, Feb 18, 2020 at 9:21 AM duynn912 notifications@github.com wrote:

Hi @jshtok https://github.com/jshtok,

I am sorry for bothering you again!

I have an unclear code in the coco.py. In line 73 you load a train_cats_split.txt but after you read it, you save it into a parameter test_class_list in line 75. What dose it means? Does this file contain a list of training data samples or a list of training classes? Could you please share this file with me? [image: image] https://user-images.githubusercontent.com/39177680/74711504-aceb7a80-5256-11ea-93fa-54f7e5ba71b5.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jshtok/RepMet/issues/23?email_source=notifications&email_token=ACOBU6TINXI7FBVM7SZBV3LRDOEBHA5CNFSM4KNRPDEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMA4BLA#issuecomment-587317420, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOBU6THUEG4LJR7J4DFEOLRDOEBHANCNFSM4KNRPDEA .

toilet bicycle apple train laptop carrot motorcycle oven chair mouse boat kite sheep horse sandwich clock tv backpack toaster bowl microwave bench book orange bird pizza fork frisbee bear vase toothbrush spoon giraffe handbag broccoli refrigerator remote surfboard car bed banana donut skis person truck bottle suitcase zebra

duynn912 commented 4 years ago

Hi @jshtok,

Thank you very much for your kind support and answers. You are one of the kind author that I've ever seen!

I have two problems as follows: (1) Assuming that I follow to train RepMet on COCO as you said, 20 classes overlapped with PASCAL as novel classes and the rest is base classes. So a problem here is how I can test RepMet on test set of COCO. In ImageNetLOC, there is only one category with one or more instances in an images but with COCO or PASCAL dataset, we may have many categories including base and novel categories in an image.

(2) Could you please show me a way to get the result with the base classes of ImagaNetLOC in Table 4 (I have tried to do it but mAP just got 0%) and the results of 100 classes of ImageNet-LOC with no episode fine-tuning in Table 3?

I look forward to hearing from you. Hope you can help me out!

Best regards, Duynn