Model doesnt return object names only label number

Hi, im trying to use the yolov5 inference and while it runs it only returns an integer of the object class and the name field is just ‘None’. Has anyone else seen this or know how to fix it?

im running yolov5 detection example code.


Could you be a bit more specific about the code you are running ? A link maybe, or the actual code ?


hi, im running the custom detection in the exaples found here:

Okay, and where does the problem happen ? What is returning wrong ? What is this name field that you mention ?


Hi @alassagne
I am facing the same problem that @chad write about.
He means yolo should write the class names instead of the numbers. You can find the sample screenshot.

i never got it fixed so what i did was extract the names, put them in a separate dict and in the code where that text is generated it uses the class number to get the name from the dictionary.

Thank you for reporting this. We’ll investigate and try to fix that.

Has the problem been solved?

hi, could you tell me exactly how to make it?

Hi, what do you mean “how to make it” ? As far as I know the problem is still there.