matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.52k stars 11.68k forks source link

Instance Segmentation vs Object Detection #2334

Open OAT7963 opened 4 years ago

OAT7963 commented 4 years ago

I would like to find out whether it is better to use instance segmentation or object detection to classify vehicles and count them, in the case of traffic congestion.

From my experience, traffic congestion has a lot of occlusion for bounding box to be accurate, it may classify a car as a truck, and a truck as a car. I have a relatively large datasets, approx 7000 - 10000 images, it may be better to just use object detection as it will be easier to manage as the dataset gets larger

Image example: image

If anyone can give some input, that would be greatly appreciated.

Thanks

suchiz commented 3 years ago

HI there, if you don't have any use of masks then just use object detection. In the case of Mask-RCNN, the mask is done AFTER the detection. So before having the segmentation, you have to detect the object. The "instance segmentation" is just creating the mask for an object. Here it is a FCN with binary output: 1 if this pixel is part of the object, 0 otherwise.

To resume Mask RCNN: 1) Extract features (backbone + fpn) 2) Detect objects with RPN 3) Recognize what's in the RPN box, Refine the RPN box, Segment pixelwise what's in the RPN box

So it has nothing to do with intance segmentation or object detection.

For the detecting part, Mask-RCNN uses Faster-RCNN. So you can compares Faster R-CNN with others CNNs if you want to