Single and Multi-Object Detection on GPU on Windows*
This Windows* tutorial uses the sample application called "Object Detection YOLO* V3 Python* Demo."
Object Detection YOLO V3 Python Demo uses the following components of OpenVINO™Toolkit:
- OpenCV: to decode the input video and display a frame with detections that are rendered as bounding boxes and labels, if provided.
- Inference Engine: to perform inference on a decoded frame using deep learning models provided.
By default, this sample application displays latency and FPS.
Instructions in this tutorial are provided for a GPU.
For each configuration, the sample demonstrates two detection types:
- Single detection uses a basic data set to perform one-by-one person detection.
- Multi-detection uses an advanced data set to perform multi-object detection, such as a person and a car.
While running the sample applications, you will gain familiarity with the Intel® Distribution of OpenVINO™ toolkit.
Single and Multi-Object Detection with Hardware Acceleration on a GPU
If you used the CPU instructions and left your command prompt window open, skip ahead to Step 2.
Run these steps on the target system.
The screenshots below were taken on a system with the following configuration:
- Model name/Processor: Intel® Core™ i5-6500TE CPU @ 2.30GHz, 2304 Mhz, 4 Core(s), 4 Logical Processor(s)
- Graphics: Intel® HD Graphics 530
- Memory: 16 GB
- Disk space: 150 GB
- OS: Microsoft Windows* 10 Pro Version 10.0.19042 Build 19042
Step 1: Initialize the Intel® Distribution of OpenVINO™ toolkit Environment
Open a command prompt window in Administrator mode.
Go to the bin directory located in the Intel® Distribution of OpenVINO™ toolkit installation path:
cd C:\Program Files (x86)\Intel\openvino_2021\bin
Run setupvars.bat
Go to the sample application directory in which the Object Detection YOLO V3 Python demo is located:
cd C:\Users\<username>\Downloads\YOLOv3
Leave the command prompt window open for the next step.
Step 2: Run the Single Detection Application on the GPU
Run the Object Detection YOLO V3 Python Demo sample application:
python object_detection_demo.py -i Sample_videos\one-by-one-person-detection.mp4 -m tensorflow-yolo-v3\FP32\frozen_darknet_yolov3_model.xml -d GPU -t 0.1 -at yolo
Success is indicated by an image that shows a single individual in a bounding box. At the left side of the image you see the latency. You might not clearly see some bounding boxes and detections if scene components are the same color as the bounding box or text.
- Press the ESC key to exit the demo.
Leave the command prompt window open for the next step.
Step 3: Run the Multi-Detection Application on the GPU
Run the Object Detection YOLO V3 Python Demo sample application:
python object_detection_demo.py -i Sample_videos\person-bicycle-car-detection.mp4 -m tensorflow-yolo-v3\FP32\frozen_darknet_yolov3_model.xml -d GPU -t 0.1 -at yolo
Success is indicated by an image that shows one or more objects and/or people. At the left side of the image you see the latency. You might not clearly see some bounding boxes and detections if scene components are the same color as the bounding box or text.
- Press the ESC key to exit the demo.
Summary and Next Steps
In this tutorial, you learned to run inference applications on different processing units using the sample application "Object Detection YOLO V3 Python Demo." In the process, you gained familiarity with the Intel® Distribution of OpenVINO™ toolkit, which was installed with the Edge Insights for Vision.
As a next step, see the Single and Multi-Object Detection on Intel Vision Accelerator on Windows* tutorial.