Real-time prediction using Darknet

Prediction involving Darknet can all be done using the command line in the terminal. For more details, refer to https://pjreddie.com/darknet/yolo/.

Up to now, we have made inferences using Darknet on an image. In the following steps, we will learn how to make inferences using Darknet on a video file:

  1. Go to the darknet directory (already installed in the previous steps) by typing cd darknet in the terminal.
  2. Make sure OpenCV is installed. Even though you have OpenCV installed, it may still create an error flag. Use the sudo apt-get install libopencv-dev command to install OpenCV in the darknet directory.
  3. In the darknet directory, there is a file called Makefile. Open that file, set OpenCV = 1, and save.

Get Mastering Computer Vision with TensorFlow 2.x now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.