May 10, 2023, 7:28pm
I am trying to run a custom 3D object detection with the ZED 2 camera.
This is my setup:
ZED SDK: 3.8
With the 3D object detection, I am trying to detect production modules. I followed your documentation in
this link and the linked github code.
For the custom object detection, I trained a yolov5 network with my data. An example of the inference is shown in the picture below:
For the inference, I’m running this prompt:
python3 custom_object_detection_v2.py --weights ...\weights\best.pt --img_size 640
this code, which you provided.
If I run the inference via the prompt the yolo
documentation provides (
python3 detect.py --weights ...\weights\best.pt --source 0) I get the following results:
You can see the images of both cameras of the ZED 2 camera and all the right classifications.
So, I have the following questions:
What am I missing, that I get excellent results when running the prompt of the yolo documentation and nearly no object detections when running the same model on the ZED script?
Where do I have to change the class names, that they show up on the bbox of the inference?
Thanks in advance!
May 15, 2023, 12:07pm
Thanks a lot,
How is the parameter called exactly which I need to change?
I found this in the documentation and added
obj_param.filtering_mode = None line to my script at this position:
obj_param = sl.ObjectDetectionParameters()
obj_param.detection_model = sl.DETECTION_MODEL.CUSTOM_BOX_OBJECTS
obj_param.enable_tracking = True
obj_param.filtering_mode = None
But this results in the following error message:
File "pyzed\sl.pyx", line 2533, in pyzed.sl.ObjectDetectionParameters.filtering_mode.__set__
Can you point me at what to ingest exactly?
Alright. is there any plan on fixing this bug?
May 16, 2023, 12:48pm
Thanks, that already helped a little bit. Are there further options to get better results on the prediction from the ZED camera?
The amount of detected objects and the precision is still not comparable to the results of the yolo inference.
To elaborate on what I tried so far:
I tried setting the OBJECT_FILTERING_MODE to NONE
I set the detection confidence threshold in ObjectDetectionRuntime to 10:
obj_runtime_param = sl.ObjectDetectionRuntimeParameters(detection_confidence_threshold = 10)
I tried to run depth_mode Ultra and Neural
I tried obj.is_grounded with False and True
I tried obj_param.enable_tracking with False and True
I ran yolov5 n/s and m
So far with no satisfactory result