# yolov5-ov2021 **Repository Path**: equalman/yolov5-ov2021 ## Basic Information - **Project Name**: yolov5-ov2021 - **Description**: 基于c++/openvino 2021r4的yolov5推理实现 - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-10-11 - **Last Updated**: 2022-10-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # yolov5-ov2021 #### Description 基于c++/openvino 2021r4的yolov5推理实现 #### Software Architecture 代码基于[Intel官方OpenVINO 2021r4](https://gitee.com/openvinotoolkit-prc/openvino) 的例程修改而来 用cmake生成并编译VS2017项目,代码用于演示OpenVINO做yolov5模型推理的使用流程 需要Windows10,VisualStudio 2017和Intel的集成显卡(如果做GPU INT8推理想得到最好性能,最低GPU硬件需求要用Gen12显卡-即tigerlake集显) #### Installation 1. openvino2021.4 #### Instructions 1. 打开VS的x64 Native Tools Command Prompt for VS 2017窗口 2. 运行"c:\Program Files (x86)\Intel\openvino_2021\bin\setupvars.bat"初始化openvino开发环境 3. 修改源码里推理硬件类型CPU或GPU,图片和IR模型的路径,指向本地文件所在的路径 ``` int main(int argc, char *argv[]) { try { string FLAGS_d = "CPU"; //"GPU"; //string FLAGS_m = "yolov5l_v4.xml"; //string FLAGS_m = "yolov5l_v4_int8_cpu.xml"; //string FLAGS_m = "yolov5l_v4_640.xml"; string FLAGS_m = "yolov5l_v4_640_int8_cpu.xml"; string FLAGS_i = "bus.jpg"; //string FLAGS_i = "zidane.jpg"; ``` 4. 运行命令,即可生成程序 ``` mkdir build cd build cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release .. cmake --build . --config Release ``` 5. 运行程序 ``` yolov5-ov2021.exe ``` #### Contribution 1. Fork the repository 2. Create Feat_xxx branch 3. Commit your code 4. Create Pull Request #### Gitee Feature 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md 2. Gitee blog [blog.gitee.com](https://blog.gitee.com) 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) 4. The most valuable open source project [GVP](https://gitee.com/gvp) 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)