facebookresearch / CutLER

Code release for "Cut and Learn for Unsupervised Object Detection and Instance Segmentation" and "VideoCutLER: Surprisingly Simple Unsupervised Video Instance Segmentation"
Other
913 stars 90 forks source link

Supervised/unsupervised custom dataset #22

Closed eroshacinas closed 1 year ago

eroshacinas commented 1 year ago

First of all, thank you for the amazing methods introduced in the paper. As the title suggests, I’m trying to train an object detector for my custom dataset using both approaches to see which one’s better.

  1. I have generated annotations using maskcut.py with a change of fixed_size from 480 to 640, and placed the .json under ./datasets/imagenet/annotations. I also placed the images under ./datasets/imagenet/train. I then renamed the path in cutler/data/datasets/builtin.py to ‘imagenet_train_fixsize640_tau0.15_N3.json’ to reflect my file. However it gives me an error ‘no valid images’ when i run train_net.py. Is there something I missed?

  2. For human-made annotations (coco format) to train a fullysupervised model using train_net.py, I’m registering my custom dataset using ‘register_coco_instances’ and modified the config in model zoo from ‘coco_train_2017’ to ‘my_dataset’. However it gives me an error that my custom dataset is not yet registered.

Any help that can point me in the right direction would be greatly appreciated.

frank-xwang commented 1 year ago

Duplicate of #16. Please check #16 for more details on working with custom datasets.

You may receive the "no valid images" error if no valid annotations are provided. I recommend reviewing the JSON file or visualizing the generated annotations before running train_net.py to ensure they are valid.

eroshacinas commented 1 year ago

That solved my issue, I didn't know MaskCut wasn't able to generate annotations in the json file. Thank you!