Hi there,
I am running my cameras with object detection using CUSTOM_YOLOLIKE_BOX_OBJECTS
, NMS3D_PER_CLASS
, and a custom onnx file. I retrieve_objects()
into an sl.Objects()
variable, and most of the time everything works just fine. Sometimes, however, I get a “misclassification".
For example, my custom detector detects people and pylons. When a misclassification occurs, it labels a person as a pylon instead of a person. And not just for a frame or two. That misclassification lasts until the person exits the frame.
Now don’t get me wrong, I am well-aware that this could be a model error. But I’ve seen it with multiple models and believe that the ZED SDK (v5.0) output could potentially be outputting the incorrect raw_label
. Perhaps its because of the way I configured it or am retrieving the objects which is causing some undefined behavior.
Here is a more in-depth look at my configuration:
detection_parameters = sl.ObjectDetectionParameters()
detection_parameters.detection_model = sl.OBJECT_DETECTION_MODEL.CUSTOM_YOLOLIKE_BOX_OBJECTS
detection_parameters.custom_onnx_file = "my_model.onnx"
detection_parameters.custom_onnx_dynamic_input_shape = sl.Resolution(608,608)
detection_parameters.filtering_mode = sl.OBJECT_FILTERING_MODE.NMS3D_PER_CLASS
detection_parameters.allow_reduced_precision_inference = True
detection_parameters.enable_tracking = True
detection_parameters.enable_segmentation = False
And then I retrieve objects like this:
_objects = sl.Objects()
_rt_params = sl.ObjectDetectionRuntimeParameters()
_rt_params.detection_confidence_threshold = 30
zed.retrieve_objects(_objects, _rt_params)
object_list = _objects.object_list
And then I get the classes like this:
[det.raw_label for det in object_list] # Gives the class ID
Then I can get my class name using my own Python dictionary that maps ID → label.
Has anyone else had this error, or does anyone see anything wrong with my configuration?
Please let me know if you’d like some more info.
Thanks!