...

Detectron2 custom dataset Training Made Easy

etectron2 custom dataset

Last Updated on 22/04/2026 by Eran Feit

Detectron2 custom dataset training means taking your own images (not COCO), labeling them with polygon masks, registering them in Detectron2, and fine-tuning Mask R-CNN so it can detect and segment your specific objects.
In this tutorial, we’ll walk through that full process using a fruit dataset (apples, bananas, grapes, strawberries, oranges, lemons): annotation, COCO export, dataset registration, training on Windows CPU and Ubuntu/WSL GPU, and finally inference on new test images.
By the end, you’ll have a working instance segmentation model that was trained on your data, not a generic dataset — and you’ll actually see it draw masks around your objects.