Questions like:
NOTE:
If you met any unexpected issue when using detectron2 and wish to know why,
please use the "Unexpected Problems / Bugs" issue template.
We do not answer general machine learning / computer vision questions that are not specific to
detectron2, such as how a model works, how to improve your training/make it converge, or what algorithm/methods can be
used to achieve X.
No. The function is made for pascal voc dataset only.
So for custom dataset in Pascal VOC, do we have to write a custom dataloader function ?
Use Custom Datasets explains how to use custom datasets.
@nodechef A solution is to use scripts to transfer VOC format to COCO format, then it will be easy to use register_coco_instances to register it.
@SkeletonOne have you developed any script ? I looked into https://github.com/yukkyo/voc2coco
but it's giving some errors. if you haven't than I would probably fix this one.
@nodechef I think the script in https://github.com/yukkyo/voc2coco is correct. Note that the only thing you should pay attention to while training is to remove the 'ignore' annotation, as https://github.com/facebookresearch/detectron2/issues/1089 says.
@nodechef This method is just an easy way to train your dataset and the credibility cannot be guaranteed. I would not recommend using this method for serious purposes.
This register_coco_instances ? Or converting voc2coco ?
@nodechef Both works well.
I am confused a little bit. Which method were you talking about ? I'm training the model for production purposes. So I need to make sure that everything is implemented in optimized way.
@nodechef
The function register_coco_instances works perfectly in this situation.
But the credibility of the script ' https://github.com/yukkyo/voc2coco' cannot be guaranteed. If you really need to use it, you should check the ground truth of your converted .json file. You can visualize the ground truth using the Colab Tutorial in Detectron2, https://colab.research.google.com/drive/16jcaJoc6bCFAQ96jDe2HwtXj7BMD_-m5.
If you need to be ensure everything is accurate, there are two options:
There are no direct method for training on custom data in pascal voc format. I hope I've made myself clear.
Yeah. That makes total sense. Thank you 👍
@pakornvs Thanks for your effort. But will you please give an instruction on how to use it to register a voc-style custom dataset?
Most helpful comment
@nodechef
The function register_coco_instances works perfectly in this situation.
But the credibility of the script ' https://github.com/yukkyo/voc2coco' cannot be guaranteed. If you really need to use it, you should check the ground truth of your converted .json file. You can visualize the ground truth using the Colab Tutorial in Detectron2, https://colab.research.google.com/drive/16jcaJoc6bCFAQ96jDe2HwtXj7BMD_-m5.
If you need to be ensure everything is accurate, there are two options:
There are no direct method for training on custom data in pascal voc format. I hope I've made myself clear.