# Android object tracking speed up

**URL:** <https://forum.opencv.org/t/android-object-tracking-speed-up/15992>\
**Category:** Android/Java\
**Created:** [December 28, 2023, 1:02pm UTC](https://forum.opencv.org/t/android-object-tracking-speed-up/15992 "2023-12-28T13:02:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Janeta](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/tomas_janeta/32/8687_2.png) [@Tomas\_Janeta](https://forum.opencv.org/u/Tomas_Janeta)\
**Post date:** [December 28, 2023, 1:02pm UTC](https://forum.opencv.org/t/android-object-tracking-speed-up/15992/1 "2023-12-28T13:02:22Z")

</div>

Hi, I have the following problem.

I am coding an application that detects objects, tracks them and displays information about them in real time.

For detection, I am using Yolov8 model and opencv Dnn module, which works well.  
For tracking I tried MIL tracker, but it is very slow. I t can handle only 5fps.  
I need at leas 10fps throughput.

My ideas:

1. try a different tracker - I wanted to try some different trackers from opencv-contrib, but failed to build opencv sdk with contrib modules.
2. multi threading - process frames in different thread, not sure how the synchronization would work
3. rewrite the tracking part in C++ - I have no idea, what kind o speedup it could give.

Please, if you cold give me your insights about these three options (or if you think of any other solution), I would be very grateful.
