facebookresearch / Mask2Former

Code release for "Masked-attention Mask Transformer for Universal Image Segmentation"
MIT License
2.59k stars 388 forks source link

Question about fine-tuning on custom dataset for instance segmentation #180

Open adityakankariya opened 1 year ago

adityakankariya commented 1 year ago

I want to perform instance segmentation by fine-tuning Mask2Former on a custom drone thermographic image COCO dataset. I follow instructions to register the dataset in the DatasetCatalog, and I am able to get the metadata to work with that. Now I don't know how to use train_net.py as DefaultTrainer(cfg) does not work with Mask2Former. For some reason, the train_net config is still looking for the standard COCO 2017 prebuilt dataset. How do I get it to ingest my custom dataset? Is It something to do with the environment variable DETECTRON2_DATASETS? Does it go back to registering the COCO dataset? Clearly, the issue is seen in the last screenshot, where the datasets are already set to coco_2017 for some reason...

Screenshot 2023-03-01 at 10 54 37 PM Screenshot 2023-03-01 at 10 54 54 PM Screenshot 2023-03-01 at 10 55 27 PM image

stardust-96 commented 1 year ago

@adityakankariya were you able to sort out?

Ihafnonaim commented 8 months ago

I want to perform instance segmentation by fine-tuning Mask2Former on a custom drone thermographic image COCO dataset. I follow instructions to register the dataset in the DatasetCatalog, and I am able to get the metadata to work with that. Now I don't know how to use train_net.py as DefaultTrainer(cfg) does not work with Mask2Former. For some reason, the train_net config is still looking for the standard COCO 2017 prebuilt dataset. How do I get it to ingest my custom dataset? Is It something to do with the environment variable DETECTRON2_DATASETS? Does it go back to registering the COCO dataset? Clearly, the issue is seen in the last screenshot, where the datasets are already set to coco_2017 for some reason...

Screenshot 2023-03-01 at 10 54 37 PM Screenshot 2023-03-01 at 10 54 54 PM Screenshot 2023-03-01 at 10 55 27 PM image

Hi, Did you figure it out?