Registrations Closing Soon for DevOps Certification Training by CloudxLab | Registrations Closing inEnroll Now
Let's read the weights and config files. The .cfg file consists of a textual description of the network architecture. The .weights file is the file with learned network.
We then use
cv2.dnn.readNetFromDarknet function to build the network, as per the configurations and learned weights as mentioned in the .cfg and .weights files.
Read the model config and weights files using the readNetFromDarknet method in the OpenCV DNN module. Set
weights=<<your code comes here>> config=<<your code comes here>>
Now build the model
cv2.dnn.readNetFromDarknet function with
config, weights arguments.
net = <<your code comes here>>(config, weights)
Let us take a look at all the layers in the model. As you will there a total of 379 layers.
ln = net.getLayerNames() print (len(ln), ln )
We will determine the output layers. The output layers are the last layers and therefore their output connections are open and unconnected.
Determine only the output layer names that we need from YOLOv4:
ln = [ln[i - 1] for i in net.getUnconnectedOutLayers()] print (ln)
No hints are availble for this assesment
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here