Compile and keep python scripts that can track objects.
[INFO_051219]: Haven't tested any of these codes on Raspberry Pi yet.
OpenCV has about 7 different object tracking algorithms, the accessibility to which depends on your version of OpenCV. Check out Adrian's guide to know more, since that's where I learnt about it. The code in this repo is also taken from the same guide.
Notes:
- The problem, atleast from my observations, is that they fail when the tracked object goes out of frame
- So, these are more useful for follower applications, where the objective is to ensure the tracked object is always within the frame
- The ROI GUI (again from OpenCV), although pretty neat, makes it somewhat inefficient for autonomous applications
GOTURN is a deep learning based object tracker, that is also available on OpenCV. For more info about the model as well as the trained model files, check out Satya Mallick's guide.
Model - Dropbox link
Script - GOTURN tracking
Notes:
- The model fails/seems to break for objects or feed that the model was not trained for
- If the object has gone out of frame for a moment, it seems to break
- The major problem for me was that it's quite heavy in terms of resource usage; it made my PC laggy and pretty much crashed it (Ubuntu 18) the first (and only time) I used it. I havent tried running it on GPU yet