roboflow / dji-aerial-georeferencing

Detect objects in drone videos and plot them on a map
https://blog.roboflow.com/georeferencing-drone-videos/
Apache License 2.0
189 stars 32 forks source link
aerial-image-detection aerial-imagery computer-vision dji drone georeferencing machine-learning mapbox object-detection roboflow tutorial

Detect and Map Objects of Interest from Drone Videos

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

Try It in Your Browser

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.

Resources

Run It Locally

Customize It

This 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:

Getting Your Flight Log

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.

flighlog

Training a Custom Model

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.

Contributing

Pull requests are welcome to improve this repo. Ideas for improvements that could be made: