Login using Social Account
     Continue with GoogleLogin using your credentials
The DNN module from CV2 supports reading of tensorflow trained object detection models. We need to load the weight and config for this. For more on this topic refer to https://github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API
Note:
cv2.dnn.readNetFromTensorflow(weights, config)
: Reads a network model stored in TensorFlow framework's format.
weights
: path to the .pb
file with binary protobuf description of the network architectureconfig
: path to the .pbtxt
file that contains text graph definition in protobuf format. Resulting "Net" object is built by text graph using weights from a binary one that let us make it more flexible.Set weights
to the path of the model weights file /cxldata/dlcourse/mask_rcnn_model_data/mask_rcnn_frozen_inference_graph.pb
.
<< your code comes here >> = "/cxldata/dlcourse/mask_rcnn_model_data/mask_rcnn_frozen_inference_graph.pb"
Set config
to the path of the model configurations file /cxldata/dlcourse/mask_rcnn_model_data/mask_rcnn_inception_v2_coco_2018_01_28.pbtxt
.
<< your code comes here >> = "/cxldata/dlcourse/mask_rcnn_model_data/mask_rcnn_inception_v2_coco_2018_01_28.pbtxt"
Read the network model stored in TensorFlow framework’s format by using cv2.dnn.readNetFromTensorflow
and passing the weights
and configs
, the file paths of weights and configurations of the model.
net = << your code comes here >>(weights, config)
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...