I. Overview of mask generation
At the end of the previous section, we have obtained the classification and regression information of the image to be detected. we extract the regression information (that is, the border information of the target to be detected) separately, and combine the pyramid feature mrcnn_feature_maps, generate a mask.
# Detections # output is [batch, num_detections, (y1, x1, y2, x2, class_id, score)] in # normalized coordinates detections = DetectionLayer(config, name="mrcnn_detection")( [rpn_rois, mrcnn_class, mrcnn_bbox, input_image_meta]) # Create masks for detections detection_boxes = KL.Lambda(lambda x: x[..., :4])(detections) mrcnn_mask = build_fpn_mask_graph(detection_boxes, mrcnn_feature_maps, input_image_meta, config.MASK_POOL_SIZE, config.NUM_CLASSES, train_bn=config.TRAIN_BN)
"Computer Vision" Mask-rcnn _ Qi: mask generation (to be continued)