EnoxSoftware / OpenCVForUnity

OpenCV for Unity (Untiy Asset Plugin)
https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088
550 stars 172 forks source link

Yolo default example not working #148

Open ArnoBora opened 1 year ago

ArnoBora commented 1 year ago

Hello, I have an issue that I can't load any of the Yolo examples. I have used the python script to download all the models but no matter what I do, Unity point me to the PDF,

Empty path name is not legal.
UnityEngine.Debug:LogError (object)
OpenCVForUnityExample.DnnObjectDetectionExample:readClassNames (string) (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:344)
OpenCVForUnityExample.DnnObjectDetectionExample:Run () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:166)
OpenCVForUnityExample.DnnObjectDetectionExample:Start () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:100)
coco.names is not loaded. Please see “Assets/StreamingAssets/dnn/setup_dnn_module.pdf”.
UnityEngine.Debug:LogError (object)
OpenCVForUnityExample.DnnObjectDetectionExample:Run () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:169)
OpenCVForUnityExample.DnnObjectDetectionExample:Start () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:100)
person.jpg is not loaded. Please see “Assets/StreamingAssets/dnn/setup_dnn_module.pdf”.
UnityEngine.Debug:LogError (object)
OpenCVForUnityExample.DnnObjectDetectionExample:Run () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:180)
OpenCVForUnityExample.DnnObjectDetectionExample:Start () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:100)
Screen.width 970 Screen.height 435 Screen.orientation Portrait
UnityEngine.Debug:Log (object)
OpenCVForUnityExample.DnnObjectDetectionExample:Run () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:187)
OpenCVForUnityExample.DnnObjectDetectionExample:Start () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:100)
yolov4-tiny.weights is not loaded. Please see “Assets/StreamingAssets/dnn/setup_dnn_module.pdf”.
UnityEngine.Debug:LogError (object)
OpenCVForUnityExample.DnnObjectDetectionExample:Run () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:208)
OpenCVForUnityExample.DnnObjectDetectionExample:Start () (at Assets/OpenCVForUnity/Examples/MainModules/dnn/DnnObjectDetectionExample.cs:100)

I have tried deleting and reloading the files using the python script many times and it won't load them. Could someone tell me what I'm doing wrong.

Thank you

EnoxSoftware commented 1 year ago

This error indicates that the files needed to run the example scene cannot be loaded. In most cases, this is because the files are not located directly under the path "Assets/StreamingAssets/dnn". When the setup is completed as described in ReadMe.pdf, you will see the following screen. (YoloObjectDetectionExample)

YoloObjectDetectionExample

Could you please check that the Yolo model files are placed in the appropriate paths?