has no attribute DETECTION_MODEL

After installing ZED SDK 4, I get this error in line 166 has no attribute DETECTION_MODEL

And I checked has DEPTH_MODE and DevicePeroperties() but hasn’t the DETECTION_MODEL

Hi, that’s because DETECTION_MODEL does not exist anymore in 4.0. You sample is outdated.
It’s now OBJECT_DETECTION_MODEL or BODY_TRACKING_MODEL depending on what you do.


That makes sense. But seems like the custom detector sample in ‘samples/custom detector/python/python_yolov5/’ in ZED SDK 4 installation is not up-to-date.
Please make this update.
In the meantime, where do I get an updated version of this sample?

As you ca see here:

the is not up-to-date.

As seen here, It’s my bad luck that only the custom detector is not up-to-date. And it’s sounds to me that it’s a bad software development behaviour to suddenly change a bunch of APIs without having a support for legacy codes people are using.

Sorry for your troubles. We’ll update this sample very soon, probably next week.

In the meantime, legacy code are still working as before with 3.8.2. Our SDK 4.0 is in early access, but is very stable already and all these little issues like the one you found will be resolved in no time.

im having the same issue with SENSING_MODE and ZED SDK 4.
AttributeError: module ‘’ has no attribute ‘SENSING_MODE’


It’s the same thing. The sensing mode does not exist anymore in 4.0. it was replaced by a boolean RuntimeParameters Class Reference | API Reference | Stereolabs

Hi the error with SENSING_MODE etc. still exists with zed-opencv:

Is this going to be updated?

I have the same issue when using YOLOv7 custom detector.
My environment is:
Python 3.8
How do I solve it?

Hi, I doubt it’s the same issue, the sensing mode exists in 3.8. Can you open a new thread with your issue ?