I’m using the ZED sdk 4.0 and apparently it’s possible to use The ZED SDK’s object detection model with a user-defined custom object detection model at the same time.
My question is whether the Custom Detector and the ZED object detection model should run in a separate thread or whether it is sufficient, as shown here, if only one thread is created where the appropriate functions (e.g.
zed.retrieve_objects) are called twice (for custom model and SDK’s model), with the corresponding
it is not required to have two different threads unless you use the asynchronous mode.
When I run the program either only with the SDK object detection or only with the custom detection, it works and the detections and tracking are shown correctly in both cases. But as soon as I create two (different)
instance_model_id for the two detectors and enable both detectors with
zed.enable_object_detection(...) and I pass the
zed.retrieve_objects(), only the detections from the SDK object detection are displayed and nothing is shown regarding the costum detector. When I set the
image_sync parameter to
False, I get the following output:
async mode not compatible with external custom model.
the SDK team is checking the problem to provide a fix if it’s caused by a behavior of the ZED SDK.
Please keep the post updated if you find anything relevant.
EDIT: It works well now with two threads. However, it does not work via one thread in my case (see the error
async mode not compatible with external custom model from my last post). Thanks for support.