Project - Yolov4 with OpenCV for Object Detection

6 / 7

Forward pass for inference

The next step is the inference step.

Let us perform the forward pass of the image through net.

Note:

  • net.setInput(blob) : Sets the input value blob for the network net.
INSTRUCTIONS
  • Set blob as input to the network net using setInput.

    net.<< your code comes here >>(blob)
    
  • Let us perform the forward pass and get the outputs from the 3 output layers. We also measure the amount of time taken to do this:

    t0 = time.time()
    layerOutputs = net.forward(ln)
    t = time.time()
    print('time=', t-t0)
    (np.array(layerOutputs)).shape
    
See Answer

No hints are availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...