OpenCV for Unity使用深度学习神经网络进行图像识别对象检测

本文使用的是OpenCV for Unity 2.4.5

1.打开Assets\OpenCVForUnity\StreamingAssets\dnn\setup_dnn_module.pdf

2.按照提示下载person.jpgyolov4-tiny.cfgyolov4-tiny.weightscoco.names

 3.打开场景Assets\OpenCVForUnity\Examples\MainModules\dnn\YoloObjectDetectionExample\YoloObjectDetectionWebCamTextureExample.unity

4. 配置Dnn参数

 5.运行测试,可以看到物体被检测出来了。

 6.也可以自己训练数据集进行识别,下图是口罩识别。

猜你喜欢

转载自blog.csdn.net/zouxin_88/article/details/128095879