Syn-McJ / TFClassify-Unity

An example of using Tensorflow with Unity for image classification and object detection.
MIT License
167 stars 47 forks source link

performance not same as in python #24

Closed Amanpradhan closed 5 years ago

Amanpradhan commented 5 years ago

Hello, I trained a custom mobilenet ssd object detector model, which works just fine in python but the performance is very poor in unity. What do I need to do in order to improve its performance?+

Syn-McJ commented 5 years ago

Hi @Amanpradhan, I'm not quite sure. If you check the readme you'll see I made a note about this. Feel free to leave any suggestions.

Amanpradhan commented 5 years ago

When I am showing 3 objects in a frame, it is making 3 bounding boxes, just not at the right coordinates. Do you have any idea why?

Syn-McJ commented 5 years ago

Hi @Amanpradhan, If your model produces correct borders in python, then it's most likely a misalignment in unity. You can check if the camera background is positioned correctly, maybe try to save a raw picture with border coordinates and see what kind of shift occurs, then fix it manually.

As I mentioned in the readme, I'm no Unity expert, and this repo only meant as an example. However when I checked object detection, even though performance was poor, borders around objects were somewhat accurate. So I'm not sure what can be the problem in your case.

Syn-McJ commented 5 years ago

Hi @Amanpradhan, If you're using newer versions of Unity, your problem might be related to https://github.com/Syn-McJ/TFClassify-Unity/issues/25 I'll close this issue.