We'll use the YOLO algorithm to build a Java real-time object detection application. We'll use transfer learning to load the YOLO model that was trained on ImageNet and the COCO dataset. Among other objects, it is trying to detect cars, pedestrians, and traffic lights with quite high accuracy.
Building a real-time video, car, and pedestrian detection application
Architecture of the application
Before jumping into the code, let's see what the architecture of the application will look like:
First, we read the video frames at a certain rate, maybe 30 frames per second. Then, we give each of the frames to the YOLO model, which gives us the bounding-box predictions for each of the objects. Once we have the bounding...