Tracking Objects!

This week, I mainly focused on finalizing the perception pipeline. This work involved installing the OpenCV contrib library on the Nano (surprisingly complicated actually) and making use of OpenCV’s various object tracking implementations to evaluate their performance on the Jetson Nano.

Of all the different tracking methods that I played around with, the two most interesting ones are those at the ends of the tracking spectrum. The MOSSE tracker, is supposed to be somewhat innacurate but as fast as it gets. It ran at 20 FPS and lost the target object almost every time. On the other hand, the CSRT tracker works very well, but ran only at a mere 1-2 FPS. The gif below is of the CSRT tracker but is sped up about 8x.

Because our requirement is to never lose a target when lighting doesn’t change and it doesn’t change shape, I decided that the CSRT tracker is definitely the way to go (unless I have time left over at the end to consider GOTURN or another Deep Learning based tracker to better deal with occlussions). However, 1-2 FPS just won’t do it. We need tracking to happen in under 60 ms in order to appear to be happening in real time, this is approximately 16 FPS as a minimum.

In order to improve tracking speed, I considered trying to implement my own super-fast tracker, but I figured that it’s unlikely that I could make one that is better than OpenCV’s implementations in such a short time frame. I was feeling down about how things were turning out, but then I realized that in order to test the different tracking methods, I used a very high quality video that I shot using a drone. Because tracking works by looking for the minimum difference of a certain patch of an image between frames, the size of the image plays a huge role in how fast tracking works. Furthermore, the Picam that we will use works at much lower resolutions than the footage I was using to test. All this to say that next week I’ll test my resolution theory to see if I can get the CSRT tracker to work at least at 16 FPS. One other thing to note is that, towards the end of the gif, the tracker loses me (probably because the window behind me is the same color as my shirt). In order to make this a bit more robust, I’ll have to look into running object detection every certain number of frames and tying that to the currenty running tracker. I’ll look into this in coming weeks as well.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *