I've read guide documentation
https://mmdetection.readthedocs.io/en/latest/tutorials/new_dataset.html#customize-datasets-by-reorganizing-data
very many times but i don't know how to make it.
How can i configure?
Plz help me. Thank you.
In what format do you have your data? Is it in the coco format?
In what format do you have your data? Is it in the coco format?
oh, yes i have coco datasets already : )
Let us assume you are using the mask_rcnn_r50_fpn_2x_coco for Instance Segmentation, then you can edit the class mmdetection/mmdet/datasets/coco.py and change the CLASSES to the classes you have.
Then you also edit the class 'configs/_base_/models/mask_rcnn_r50_fpn.py', and replace the num_classes with the number of classes you have, then you should be fine.
This is basically what I do. Do let me know if that works for you.
Let us assume you are using the mask_rcnn_r50_fpn_2x_coco for Instance Segmentation, then you can edit the class mmdetection/mmdet/datasets/coco.py and change the CLASSES to the classes you have.
Then you also edit the class 'configs/_base_/models/mask_rcnn_r50_fpn.py', and replace the num_classes with the number of classes you have, then you should be fine.
This is basically what I do. Do let me know if that works for you.
Oh! This is the long-awaited news for me!
OK I'm gonna try it now and I'll reply to you if it works or not
I've edited all that you said.
CLASSES = ('person', 'bycycle', 'car' ... etc) to CLASSES = ('person') in mmdetection/mmdet/datasets/coco.py.num_classes=80 to num_classes=1 in mmdetection/configs/_base/models/mask_rcnn_r50_fpn.py.Then I've tried to train python mmdetection/tools/train.py mmdetection/configs/detectors/mask_rcnn_r50_fpn_2x_coco.py in terminal.
But I got an error like this.

It seems to works for training but not evaluation.
Are there any things that I edited?
For some weird python reasons which I am not sure of, you need to have CLASSES = ('person', ) with the comma at the end rather than just having CLASSES = ('person') without the comma. Try that and let me know how that goes
For some weird python reasons which I am not sure of, you need to have CLASSES = ('person', ) with the comma at the end rather than just having CLASSES = ('person') without the comma. Try that and let me know how that goes
Oh, I mistake annotation file plz wait. Thanks @azibit u r angel.
Oh, bro, reason of the error is my annotation file's "category_id". After i edit CLASSES = ('person') training process works well!
I got a beautiful results.

Thank you @azibit.
I owe you big time. You're a lifesaver Thanks.
You are most welcome @blackCmd I wish you all the very best. Do let me know if you need anything else
https://mmdetection.readthedocs.io/en/latest/tutorials/new_dataset.html#modify-classes-of-existing-dataset