matterport / Mask_RCNN

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

Getting into the code #868

Open kolian1 opened 6 years ago

kolian1 commented 6 years ago

Hi all I am going through the code, (that works wonderfully btw, thumbs up to the Author) in an attempt to better understand it. I am suing the pre-trained model. After reading the relevant documents I expect that the Non Maximal Suppression function model->nms_keep_map, or model->ProposalLayer->call->nms will be used to remove overlapping BB's. I also expect to see the segmentation- where a BB feature map will be fed to a Network, classifying each pixel as Background or Foreground. This is supposed to happen in model->build_fpn_mask_graph I have placed breakpoints in both, but they are visited only during model loading, and not during prediction/detection as I would expect. Can someone please tell me what I am missing here? Thanks!

pstalidis commented 6 years ago

I also expect to see the segmentation- where a BB feature map will be fed to a Network, classifying each pixel as Background or Foreground. This is supposed to happen in model->build_fpn_mask_graph I have placed breakpoints in both, but they are visited only during model loading, and not during prediction/detection as I would expect. This is actually how tensorflow works. The build_fpn_mask_graph function declares the various operations that will be performed on the (unknown) data. On prediction/detection the (known) data are inserted to the graph and the result is received.

arks22 commented 2 years ago

I am also trying to customize the nms algorithm, how can I do that actually? Thanks.