Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dacquaviva/yolov5-openvino-cpp-python
Example of using ultralytics YOLOv5 with Openvino in C++ and Python.
https://github.com/dacquaviva/yolov5-openvino-cpp-python
Last synced: 3 months ago
JSON representation
Example of using ultralytics YOLOv5 with Openvino in C++ and Python.
- Host: GitHub
- URL: https://github.com/dacquaviva/yolov5-openvino-cpp-python
- Owner: dacquaviva
- Created: 2022-06-30T17:45:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-31T12:21:27.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T01:20:03.467Z (7 months ago)
- Language: C++
- Homepage:
- Size: 3.95 MB
- Stars: 63
- Watchers: 1
- Forks: 19
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-yolo-object-detection - dacquaviva/yolov5-openvino-cpp-python - openvino-cpp-python?style=social"/> : Example of using ultralytics YOLOv5 with Openvino in C++ and Python. (Lighter and Deployment Frameworks)
- awesome-yolo-object-detection - dacquaviva/yolov5-openvino-cpp-python - openvino-cpp-python?style=social"/> : Example of using ultralytics YOLOv5 with Openvino in C++ and Python. (Lighter and Deployment Frameworks)
README
# YOLOv5-Openvino-Cpp-Python
Example of performing inference with ultralytics [YOLOv5](https://github.com/ultralytics/yolov5) using the 2022.1.0 openvino API in C++ using Docker as well as python.
This repository is only for model inference using openvino. Therefore, it assumes the YOLOv5 model is already trained and exported to openvino (.bin, .xml) format. For further info check [YOLOv5](https://github.com/ultralytics/yolov5).
## YOLOv5-Openvino-Cpp
### Docker installation
This repository folder contains the Dockerfile to build a docker image with the Intel® Distribution of OpenVINO™ toolkit.1) This command builds an image with OpenVINO™ 2022.1.0 release.
```
docker build cpp -t openvino_container:2022.1.0
```
2) This command creates a docker container with OpenVINO™ 2022.1.0 release.
##### Windows
```
docker run -it --rm -v %cd%:/yolov5-openvino openvino_container:2022.1.0
```
##### Linux/Mac
```
docker run -it --rm -v $(pwd):/yolov5-openvino openvino_container:2022.1.0
```
### Cmake buildFrom within the docker run:
```
cd cpp && mkdir build && cd build
```
Then create the make file using cmake:
```
cmake -S ../ -O ./
```
Then compile the program using:
```
make
```
Then run the executable:
```
./main
```## YOLOv5-Openvino-Python
### Usage
```
python -m venv /path/to/envsource /path/to/env/bin/activate # Linux/mac
\path\to\env\Script\activate # Windows
```
```
cd python
```
```
pip install -r requirements.txt
```Then run the script:
```
python main.py
```## Final Result:
