Categories
AI/ML CNNs OpenCV Vision

Mask R-CNN

Image for post

Paper: https://arxiv.org/pdf/1703.06870.pdf

FB really likes detecting things. I went with their PyTorch version. The matterport version didn’t work out of the box, so went with FB’s code to try image segmentation.

Caffe2 version: https://github.com/facebookresearch/Detectron

PyTorch version: https://github.com/facebookresearch/Detectron2

Matterport’s version: https://github.com/matterport/Mask_RCNN

Deep Learning based Image Segmentation with OpenCV: https://www.pyimagesearch.com/2018/11/26/instance-segmentation-with-opencv/

https://engineering.matterport.com/splash-of-color-instance-segmentation-with-mask-r-cnn-and-tensorflow-7c761e238b46

Image for post

Also Watershed algorithm is available in OpenCV:

Watershed: http://www.cmm.mines-paristech.fr/~beucher/wtshed.html

Result

Segmenting an image by the watershed transformation is therefore a two-step process:

* Finding the markers and the segmentation criterion (the criterion or function which will be used to split the regions – it is most often the contrast or gradient, but not necessarily).

* Performing a marker-controlled watershed with these two elements.

https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_watershed/py_watershed.html