Home

Awesome

Mask R-CNN

This is an implementation of the Mask R-CNN network using OCaml's numerical library Owl. This network can be used to perform object detection, segmentation and classification. The implementation is based on this paper and ported from this Keras implementation.

Prerequisites

Images

Image The code evalImage.ml from the examples can be used to classify all the pictures in a given folder. It can be compiled with make and run with make run. A new image with highlighted objects will be generated to the results/ folder. You can modify the location of the source directory/file in examples/evalImage.ml, as well as the size of the image: a larger size yields a more accurate detection but needs more time and memory (default is 768, but you can try 512, 1024, 1536, 2048,...).

Videos

If you are patient enough, you can try to convert a video frame-by-frame by running make video (you need FFmpeg to run it). You can modify the location of the source video in examples/evalVideo.ml. Note that this writes all the frames of the video on the hard drive.