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
209 stars 33 forks source link

Training on Custom DataSet #10

Open Pramod-ReflectiveAi opened 3 years ago

Pramod-ReflectiveAi commented 3 years ago

Hi @YoungXIAO13

I want to train a model with my own custom data set prepared with 10 classes and 5 of which are novel

I see most of the train.py having setup to standard dataset like coco , pascal_voc_0712

can you please suggest how to move forward , How should i prepare the dataset and how can i make your code work with custom taining

Please help with this

YoungXIAO13 commented 3 years ago

Hi @Pramod-ai ,

I think that you could first generation the annotation files in a fashion like COCO (cf here) and then adapt the script coco.py to your dataset.

You can also adjust it in a fashion like PASCAL, that's what I've done for dataset Pascal3D and ObjectNet3D, you could see this script pascal3d.py. Basically you just need to create a cvs file containing the annotations (img_path, bbox, cls, etc..) and also look into metadata_3d.py that generates the class data for training.

Good luck

amajee11us commented 3 years ago

In case of a custom dataset, how do you create the splits. For example, for the VOC dataset, there are 3 different splits that are available. How can I do the same for a custom dataset?

YoungXIAO13 commented 3 years ago

Hi @amajee11us

Actually you can see that a set of class definitions in the config file. This is used to select the corresponding base/novel class split in the creation of dataset, for example 3 splits for VOC The basic idea behind this design is always keeping the base classes at first and novel classes at last, which is important for the sample filtering and final evaluation. You could do the same for your custom dataset.

Another way to do is using the same class id indexing everywhere and create different index groups for different base/novel splits.