# Tracking objects detected with a custom object detector

**URL:** <https://community.stereolabs.com/t/tracking-objects-detected-with-a-custom-object-detector/248>\
**Category:** Uncategorized\
**Created:** [May 18, 2021, 11:49am UTC](https://community.stereolabs.com/t/tracking-objects-detected-with-a-custom-object-detector/248 "2021-05-18T11:49:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JordiG](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/j/f9ae1b/32.png) [@JordiG](https://community.stereolabs.com/u/JordiG)\
**Post date:** [May 18, 2021, 11:49am UTC](https://community.stereolabs.com/t/tracking-objects-detected-with-a-custom-object-detector/248/1 "2021-05-18T11:49:46Z")

</div>

How can we use object tracking function (integrated in the ZED SDK) to track objects detected with a custom object detector?  
Thank you in advance,  
Jordi

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [May 18, 2021, 9:42pm UTC](https://community.stereolabs.com/t/tracking-objects-detected-with-a-custom-object-detector/248/2 "2021-05-18T21:42:31Z")

</div>

Hi @JordiG  
this feature is not available in the ZED SDK.  
If you want to track custom objects you must write your own detector and tracker.  
You can start from this Github repository as an example:

> **[stereolabs/zed-yolo](https://github.com/stereolabs/zed-yolo)**
>
> 3D Object detection using Yolo and the ZED in Python and C++

---

<div class="post-metadata">

**Author:** ![JordiG](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/j/f9ae1b/32.png) [@JordiG](https://community.stereolabs.com/u/JordiG)\
**Post date:** [May 19, 2021, 7:45am UTC](https://community.stereolabs.com/t/tracking-objects-detected-with-a-custom-object-detector/248/3 "2021-05-19T07:45:27Z")

</div>

Hi @Myzhar  
Thank you for your quick reply. The new ZED2i documentation says that the object detection module will work with Custom Objects (Q3 2021). Does it mean that soon it will be possible to detect custom objects? This feature will be available for ZED2 in the new SDK version?  
Thank you in advance,  
Jordi

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [May 19, 2021, 10:09am UTC](https://community.stereolabs.com/t/tracking-objects-detected-with-a-custom-object-detector/248/4 "2021-05-19T10:09:07Z")

</div>

Hi @JordiG  
we are not allowed to provide more information about the new feature, but I can say that it will be available for all the cameras with OD capabilities.

---

<div class="post-metadata">

**Author:** ![Kuwaaa](https://community.stereolabs.com/user_avatar/community.stereolabs.com/kuwaaa/32/166_2.png) [@Kuwaaa](https://community.stereolabs.com/u/Kuwaaa)\
**Post date:** [July 19, 2021, 4:06am UTC](https://community.stereolabs.com/t/tracking-objects-detected-with-a-custom-object-detector/248/5 "2021-07-19T04:06:03Z")

</div>

When I tried to use Uselib’s optflow track for this repository, line 374 at yolo\_v2\_class.hpp crashed.

 ![11111](https://community.stereolabs.com/uploads/default/original/1X/10e1ceebc103bca868a729bf0c20494fad78d5c9.png)

Then I try to call WaitKey to block the process before calling optflow, and the problem goes away

What do I have to do to make the program work?

My environment:  
windows10  
opencv4.4  
zed2i  
cuda11.0  
vs2019
