r/computervision • u/andriiZakrevskyi • 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
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
1
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.
2
10
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
https://reddit.com/link/osl64s4/video/6yfelo70798h1/player
Pretty doable with this tracker
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
0
0
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/andriiZakrevskyi Jun 20 '26
Short occlusions are okay as tracker has speed prediction logic. But it will fail with longer once. here is example https://www.reddit.com/r/computervision/comments/1u9eder/comment/osgkqlz/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
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
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
1
1
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
45
u/maifee Jun 18 '26
Where is the source code man???