Flying quadcopters is a lot of fun! You eventually run into some obstacles but most of the time you enjoy being able to control something that flies. I really loved playing with my quadcopter but as it went farther away from me, it became difficult to spot where it was. That's when I thought: Is there a way to detect this quadcopter from a far away distance?
Collecting the data
We humans are able to identify a quadcopter only by seeing it numerous times in various positions. This enables our mind to create mental maps of what a quadcopter looks like. For a computer to do this job, we need to first supply it with a lot of images of drones taken in different orientations and different backgrounds.
On searching online for various drone datasets, I could find none. the last resort of this problem was to manually create the dataset. This data collection would take a really long time as the model would need at least ~1000 images of the drones labelled with where the drones are present in the image.
To solve this problem, I wrote a python script which would generate this dataset. The script would superimpose "ONLY drone" images with a "background image" which would give us different images of the same drone in various positions and angles. Below is how the images are added:
The first image is the original drone image. The second image is this same drone superposed on a background.
As you can see with just one image of this drone and multiple backgrounds, we can generate a lot of images for training our model.
Training the model
The model I used for training this drone detector was based on the YOLO-v3 architecture. I trained the model for a couple thousand epochs and then tested this trained model on my own drone!
The model does pretty well in finding my drone. Note that the training data does not include even a single image of my drone!
Future Use Case
When I first started to build this, I wanted my drone detector to be able to detect the drone at far away distances but my current drone detector still has a long way to go before it reaches that level. Some ways of increasing the range of the detector may be by using more "real" images of drones. It could also be improved by using some IR signals from the drone along with the raw video footage.
Such a drone detector which can detect drones at far away distances may also be able to help the army to detect enemy drones.
Thank you for reading till the end of my blog! Let me know what you think of this drone detector and what you would try to detect next:)