This project extracts the location of objects of interest from a drone video and plots them on a map. By combining the video with data from its flight log and a computer vision model trained on Roboflow, it demonstrates georeferencing a machine learning model's predictions to GPS coordinates and using them to visualize the location of detected solar panels on a map using Mapbox.
https://user-images.githubusercontent.com/870796/189461690-122f4e64-a66e-40f0-ac4b-68258a8abe7e.mov
The project is deployed to Github Pages here and you can test it out with this sample video and flight log.
If you have your own Drone video you'd like to use, follow the instructions in the blog post to pull your detailed flight log from Airdata.
npm install
in the main directorynpm run build:dev
to start a webpack build with livereloadnpx serve dist
http://localhost:3000
in your browserThis repo can easily be changed to run any custom model trained with Roboflow including the thousands of pre-trained models shared on Roboflow Universe. Simply swap out your publishable_key
and the model
ID and version
in the ROBOFLOW_SETTINGS
at the top of main.js
.
There are also some additional configuration options available at the top of renderMap.js
.
For example, changing the model to swimming-pool-b6pz4
to use this swimming pool computer vision model from Roboflow Universe changes the functionality from plotting solar panels to plotting pools:
https://user-images.githubusercontent.com/870796/190296751-02b46989-7e18-4fcb-93c4-67e492cff401.mp4
Other ideas for how to use this repo:
You can get the detailed flight log from a DJI drone using Airdata. The sample video and flight log were taken from a DJI Mavic Air 2. Full details are in the blog post.
If you can't find a pre-trained model that accurately detects your particular object of interest on Roboflow Universe you can create a dataset and train your own custom model using Roboflow.
Roboflow is an end-to-end computer vision platform that has helped over 100,000 developers use computer vision. The easiest way to get started is to sign up for a free Roboflow account and follow our quickstart guide.
Once you've trained a custom model, update your publishable API Key, model ID, and version in the configuration at the top of main.js
.
Pull requests are welcome to improve this repo. Ideas for improvements that could be made:
distance
calculationsisVideo
compared to the duration of the loaded video