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

Error:Index was outside of the bounds of the array #42

Closed HolyShitKillingMachine closed 4 years ago

HolyShitKillingMachine commented 4 years ago

I have used ssd-mobilenet-v1 to train my pb file,and edit the label txt file. And run the detect demo,it cames out that error. I have checked the detail! image image image I only got 5 objects to detect,and the valve is 5,so the label = this.labels[5],so then out of the index. I do not know how to fix this,cause the classes's valve came from the DetectAsync. would you help?

Syn-McJ commented 4 years ago

@HolyShitKillingMachine, Send me your model and labels, I'll check.

HolyShitKillingMachine commented 4 years ago

@Syn-McJ I have sent it to your email.syn-mcj@mail.ru

HolyShitKillingMachine commented 4 years ago

@Syn-McJ how about the pb file and the label files,are they ok for use?

Syn-McJ commented 4 years ago

@HolyShitKillingMachine, did you check your model with python before using it in my example?

I'm checking it now and it doesn't seem to work. Additionally, I can see it producing labels with index 5 while you have only 5 labels which means max index is 4, therefore it causes out of range exception.

This repository isn't meant for teaching how to train tensorflow models, for this please refer to the documentation at tensorflow.org.

Please refrain from creating new tickets before you made sure that your model works well with python inference code.