derenlei / Unity_Detection2AR

Localize 2D image object detection in 3D Scene with Yolo in Unity Barracuda and ARFoundation.
https://derenlei.medium.com/object-detection-with-localization-using-unity-barracuda-and-arfoundation-794b4eff02f8
MIT License
218 stars 61 forks source link

Try a different yolo model but not working #2

Closed marcomameli1992 closed 3 years ago

marcomameli1992 commented 3 years ago

Dear, I'm trying to use a YOLO-v2 tiny from onnx model zoo and I change the name of input and output in the Detector script bu the model does not work. Analyzing the model I see there are some differences, like constants and number of weights. Can you share your yolo configuration to obtain the same model with my train data?

derenlei commented 3 years ago

Hi,

The YOLO-v2 tiny configuration we used for training can be found in the darknet repo: https://github.com/pjreddie/darknet/blob/master/cfg/yolov2-tiny.cfg

We used darknet to train the model and then converted it to onnx format. (darknet -> tensorflow -> freeze -> onnx)

L0GI0 commented 3 years ago

Hey, we also tried to use some yolov2-tiny models, some work, some doesn't, we are trying to figure out what is the cause, is it about the .cfg file ? That means if a model uses different one, then it cant be use in this project ? Or maybe we can somehow configure the project in unity and run any yolo2-tiny model ?

ROBYER1 commented 3 years ago

Hey, we also tried to use some yolov2-tiny models, some work, some doesn't, we are trying to figure out what is the cause, is it about the .cfg file ? That means if a model uses different one, then it cant be use in this project ? Or maybe we can somehow configure the project in unity and run any yolo2-tiny model ?

Did you make sure to change the input and output variables in the Detector.cs script to match those of your model?

Are you getting any errors?