0

I want to get feature value of an object with YOLOv5. I'm guessing there is a hint in "detect.py" in opensource. How can I get feature value of the object used for inference?Please tell me how to resolve.

1 Answers1

1

The variable 'det' inside the def run in detect.py(line 181), you can know the xyxy value, the confidence score, and the number of class name of the object.

Since 'det' is a tensor data type, you will need to converting 'det'.

If you want to get only the number of class name of the object, you can easily get it by converting cls in detect.py(line 205) like 'int(cls)'.

Desty
  • 328
  • 1
  • 5