I'm doing a research on "`Mask R-CNN` for Object Detection and Segmentation". So I have read the original research paper which presents `Mask R-CNN` for object detection, and also I found few implementations of `Mask R-CNN`, [here](https://github.com/matterport/Mask_RCNN) and [here](https://github.com/facebookresearch/Detectron) (by Facebook AI research team called detectron). But they all have used coco datasets for testing.

But I'm quite a bit of confusing for training above implementations with custom data-set which has a large set of images and for each image there is a subset of masks images for marking the objects in the corresponding image.

So I'm pleasure if anyone can post useful resources or code samples for this task. 

Note: My dataset has following structure,

> 
> It consists with a large number of images and for each image, there
>  are separate image files highlighting the object as a white patch in a
>  black image.
> 
> 
> 

Here is an example image and it's masks:

Image;

[![enter image description here](https://i.stack.imgur.com/bEbzV.png)](https://i.stack.imgur.com/bEbzV.png)

Masks;

[![enter image description here](https://i.stack.imgur.com/eGnjK.png)](https://i.stack.imgur.com/eGnjK.png) [![enter image description here](https://i.stack.imgur.com/jJi2a.png)](https://i.stack.imgur.com/jJi2a.png)