Login using Social Account
     Continue with GoogleLogin using your credentials
Let us perform the forward pass of the image through net
.
Remember, we have already set the input for the network net
using net.setInput
in the previous slide.
Now, we shall use net.forward
to get the masks and the co-ordinates of the bounding boxes.
Note:
Remember,
net.forward
: Perform a forward pass of the Mask R-CNN. It returns
(1) the bounding box coordinates
of the objects in the image along with classID, confidence scores from the output layer named 'detection_out_final'
(2) the pixel-wise segmentation for each specific object from the output layer named ‘detection_masks‘
.
Use net.forward
to get the masks and bounding boxes of the detected objects in the input image.
(boxes, masks_polygons) = << your code comes here >>(["detection_out_final",
"detection_masks"])
The boxes have classID, confidence scores and 4 points identifying the bounding box. This bounding box is normalized and has to be multiplied by the actual size of the image to get actual values.
Let us print the shape of boxes
.
boxes.shape
The boxes
have classID, confidence scores and 4 points identifying the bounding box. This bounding box is normalized and has to be multiplied by the actual size of the image to get actual values.
Let us also print the shape of masks_polygons
using shape
.
masks_polygons.<< your code comes here>>
The masks_polygons
have
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...