sandipan211 / ZSD-SC-Resolver

Resolving semantic confusions for improved zero-shot detection (BMVC 2022)
MIT License
22 stars 4 forks source link

Custom Data #13

Closed saintour closed 1 year ago

saintour commented 1 year ago

What steps should I take if I want to train with custom data? Thanks in advance.

sandipan211 commented 1 year ago

Hi @saintour ,

I have not trained myself with custom datasets, but I have tested my trained model on random images taken from the internet. However, if you want to train on custom data, these are the things to keep in mind:

  1. The first step would be to make your dataset compatible with the COCO format. A tutorial on how you can make a customized COCO format dataset can be found here.
  2. Then, you have to define a seen-unseen split for the classes of that dataset. Suppose you have that list of S seen and U unseen classes. Define them in splits.py. Make the appropriate changes while loading the data and semantics for these classes.
  3. This file encloses the class for a custom dataset. Make the necessary changes in this. It contains the config parameters. While running any script, you must use this config file from now on.
  4. Train a CNN backbone of your choice (like Resnet-101) on Imagenet classes after removing any class from Imagenet that exists in U. This is strictly as per zero-shot criteria, but if you wish, you can omit this step and directly use the one we provide.

That's it! Now you can follow the steps 1-6 given in the README.