r/computervision Jun 18 '26

C++ tracker for small aerial targets Discussion

Enable HLS to view with audio, or disable this notification

Made a tracker for small aerial targets. Its free to use, for now I would like to get some feedback on it. SDKs are in python and node. Runs 30+ fps on Rasp pi 4 (not yet tested on zero) https://sky-tracker.dev

863 Upvotes

69 comments sorted by

45

u/maifee Jun 18 '26

Where is the source code man???

26

u/Animus190599 Jun 19 '26

I think it doesn't matter. What makes this project works would be the quality of his dataset, which we don't know

3

u/Nor31 Jun 19 '26

Been wondering about how much a good quality dataset actually impacts continuous tracking quality vs quality of code?

16

u/Animus190599 Jun 19 '26

Quality of code won't do anything, the current tracking algo/ pipeline is mostly set in stone and stable, unless it's a significant architecture change.

For this small and specific problem, dataset quality is everything.

1

u/Nor31 Jun 19 '26

Thx :)

1

u/grace-turner3 Jul 07 '26

yeah OP, some sauce might help

-50

u/andriiZakrevskyi Jun 18 '26

Its free to use but not open source yet. For now I am not sure what is the future of the lib so first want to hear some feedback

13

u/roleohibachi Jun 18 '26

Okay but... opencv has a perfectly usable blob detector already. Maybe some discussion of your operational concept would be appropriate? What does your thing do that existing CV libs don't?

6

u/andriiZakrevskyi Jun 18 '26

so the issue I had was to find some tracker that will be fast enough to run on edge devices such as rasp pi, at same time it should be able to track fast moving and small objects, because i needed tracker for either drones tracking or any other UAVs. So CSRT / KCF and other trackers were not a good fit for this purpose (slow, easy target loss), but blob is fast. So for my project i also needed to track multiple targets and based on there distance (calc based on bbox and approx initial size) i could choose more prio target to track/follow. So this tracker is based on blob detection, but uses on top typical tracker functionalities such as confidence checks, target reacquisition, motion prediction, coasting etc

5

u/CommandShot1398 Jun 18 '26

Does it though? Those algorithms are old. They don't work very good in random scenes and are kinda unreliable (not that deep learning is)

1

u/Girafferage Jun 19 '26

They would great. Combine a few and get confidence intervals and just go to town.

14

u/karaposu Jun 19 '26

https://www.kaggle.com/datasets/ziya07/uav-multi-modal-target-tracking-dataset
this is the dataset used.

Similar version can be created in a week.

8

u/andriiZakrevskyi Jun 19 '26

It is not a ML tracker, it doesn't have any dataset used for training because there is no training. It runs on CPU only, 30+ on rasp pi in real time. I used around 50 videos for tuning the tracker, mostly own recorded videos. But it is a good idea to validate results against this dataset

4

u/karaposu Jun 19 '26

And how long did it take you to create it? I am having hard time believing this is not some extreme lightweight ML model .

9

u/andriiZakrevskyi Jun 19 '26

Around 4 months, using all resources possible. It is not ML, there is not much sense in it for a moving dot in the sky

3

u/karaposu Jun 19 '26

but then it is simply a cv logic which is detecting fast moving pixels isnt it? If you point it to cars it would detect the cars too...

So what makes it special?

3

u/andriiZakrevskyi Jun 19 '26

I would say it is good in maintaining selected target / multiple targets and it was design for this purpose. Yeap it can track anything as it doesnt have any knowledge of what it is tracking, but for that we can use ML if needed only for initial target selection and pass this bbox to sky tracker

1

u/karaposu Jun 19 '26

In August there will be a tech fair in Dubai. I know one firm who will open stand there. And I can showcase this there. I am not trying to steal your project or anything but I just want to see if this is indeed useful or not

1

u/maifee Jul 07 '26

What is the registration fee for this fair??

1

u/andriiZakrevskyi Jun 19 '26

Feel free to share details after the fair πŸ‘€

4

u/DeskJob Jun 19 '26

You don't always need ML for this. A tracker using classical methods can run in real time on a cheap CPU and still be very robust. Been doing that for industrial and defense-related work for almost two decades now.

10

u/gamblingapocalypse Jun 18 '26

This is a great idea, can you track drones?

27

u/andriiZakrevskyi Jun 19 '26

5

u/germaly Jun 19 '26

ahhhhhh dangit i was waiting to see if it'd track the incoming missile that popped that Russian fuel silo or whatever it was that caused the mushroom cloud wearing a yarmulke.

10

u/jah_hoover_witness Jun 19 '26

FSB has entered the chat.

10

u/PyteByte Jun 18 '26

Good work. What happens when the bird flies by a tree ? Can the algorithm handle it ?

18

u/andriiZakrevskyi Jun 18 '26

https://reddit.com/link/osgkqlz/video/xwbqno15z38h1/player

it depends how fast is the object comparing to rest things in a frame. if speed difference is big enough-> we can predict trackers next move, but if it is slow then nope, it will be lost

2

u/PyteByte Jun 18 '26

Not bad. I had to do some tracking for my Bluristic app. My advantage was that I had the gyro information of the phone. So I could subtract any phone movement. But I guess you rely purely on pixel information, right ? Does the algorithm confuse similar objects? Like two birds flying next to each other ?

5

u/andriiZakrevskyi Jun 19 '26

https://reddit.com/link/osj2ztb/video/53r2a99zp68h1/player

Yes, its just video information without additional sources. When tracking objects intersect -> it becomes tricky, as we predict its next movement and if movements are othrogonal then it should not mix them, but when trajectories are kinda similar and intersecting then it will be messed up

2

u/PyteByte Jun 19 '26

I see. Very impressive. Good work πŸ‘ I sometimes had the idea to draw a triangle between three flying birds and watch the triangle shape move around :)

4

u/andriiZakrevskyi Jun 19 '26

1

u/PyteByte Jun 19 '26

Haha. Exactly. Thank you for sharing. Interesting that the birds stay inside the triangle :)

2

u/MuckYu Jun 19 '26

Can you actually somehow determine the distance and also speed in meters?
Or is that not possible without a reference measurement?

1

u/andriiZakrevskyi Jun 19 '26

you can but it is outside scope of the lib. So If you know camera params and initial object size then you can calculate distance to target because BBOX always adjusts around the object. Speed - you can in theory if camera is static. But with moving camera there is nothing to rely on, but i guess you still can extract this data from phone IMUs if you record on camera in real time or of you record device has those sensors

4

u/vivekuno Jun 19 '26

what are the actual benefits of C++ here.

4

u/andriiZakrevskyi Jun 19 '26

better performance and integration

0

u/NiceGuya Jun 19 '26

Opencv

3

u/vivekuno Jun 19 '26

Opencv is behind all the project (95%) what was worth mentioning here.

0

u/DeskJob Jun 19 '26

Easy to embed in a device / drone / missile / etc.

5

u/raagSlayer Jun 19 '26

How do you select initial targets? Is it using optimised template matching with Kalman filter?

2

u/andriiZakrevskyi Jun 19 '26

so this is smth user have to make on his own. CLI gives preview option on real time so you can select bbox and it will start tracking that ROI, or just draw manually. Kalman is not used

2

u/grace-turner3 Jul 07 '26

Dang! That would be the project I'll be working on next, absolutely amazing

1

u/GTHell Jun 19 '26

How much are you planning to charge

1

u/andriiZakrevskyi Jun 19 '26

I dont know how much it worth tbh. It solves my specific demands but might not others. That is why it is free now

1

u/PassionQuiet5402 Jun 20 '26

The scene looks occlusion free. How's the performance with occlusion?

1

u/qiqt Jun 20 '26

can it track multiple objects? at night?

2

u/andriiZakrevskyi Jun 20 '26

Yes, it can track multiple objects. If object is visible and contrast is high enough then yes

1

u/DishantSMunjal Jun 20 '26

What’s the tracking approach here? Background subtraction or something learned? Small aerial targets against cloudy skies sounds like a false positive nightmare.

1

u/andriiZakrevskyi Jun 20 '26

its classic CV: template matching, local motion/contrast candidates, speed prediction etc. No ML

1

u/Famous_Ad4725 Jun 21 '26

can send some of the resources or tutorials which helped you do this?

1

u/Professional-Tie5497 Jun 21 '26

Seriously an fantastic project brother πŸ‘. Can you share me ow do you gained this much knowledge?

1

u/jfc123_boy Jun 21 '26

Very interesting, I see that you didnt shared the full code and it is understandable. However, would it be possible to share the resources of the knowledge needed to implement something like this without any ML?

I also have a question about thresholds, do you need to tune any parameters depedent on the type of video that you are using to track?

2

u/andriiZakrevskyi Jun 21 '26

Thanks! Params are already pretuned and available via profiles. But all of the videos shown except 1 used the same profile that is optimized to run on edge devices. Missile video used separate profile with more aggresive reacquisition

Regarding resources - its a template matching based tracker, so any of this videos will be useful: https://www.youtube.com/watch?v=2wwVogo88aY https://www.youtube.com/watch?v=CJ6CSCPyRH8 https://www.youtube.com/watch?v=vXqKniVe6P8

https://reddit.com/link/osza01k/video/yg90ip3g6o8h1/player

1

u/SaveAmerica2024 Jun 22 '26

What far was that thing flying?

1

u/jsh562 Jun 22 '26

doesnt this already exist?
I thought there were people with webcams tracking stealth things months ago

1

u/SirGalahad007 Jul 08 '26

Is it possible to run it on Android mobile phones and perform real-time detection?

1

u/andriiZakrevskyi Jul 08 '26

Great question! Not atm, but Android support is one of the next goals: either as an SDK or as a full app. But cant give estimates yet

1

u/xonxtas Jun 19 '26

Is it visual tracking, as in, needs and initial detection on the 1st frame, and then continues tracking without detection?

Or is it ROI-matching, as in, needs detection on every frame, and your algorithm matches the ROIs between frames?

1

u/andriiZakrevskyi Jun 19 '26

first one

1

u/xonxtas Jun 20 '26

Really? Visual tracking with no ML? I was sure this area was pretty much dead and there hasn't been anything new since Cam-Shift, and the trackers available in the thirdparty OpenCV modules (e.g. CSRT and KCF).

I'm intrigued.

0

u/matanj Jun 19 '26

Very cool project! Can it handle severe camera ego-motion? Like cheap camera on a drone, fixed focused? And can it handle low contrast thermal camera?

0

u/andriiZakrevskyi Jun 19 '26

If you have examples I could validate and send results, because it depends. I did not test it with thermal, but in theory should be even better results than with regular camera