ODM
A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷
Top Related Projects
Open source Structure-from-Motion pipeline
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
PX4 Autopilot Software
Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
ArduPlane, ArduCopter, ArduRover, ArduSub source
Quick Overview
OpenDroneMap (ODM) is an open-source toolkit for processing aerial imagery captured by drones and other unmanned aerial vehicles (UAVs). It provides a set of tools for generating high-quality 3D models, orthophotos, and other geospatial data products from drone-captured imagery.
Pros
- Comprehensive Functionality: ODM offers a wide range of features, including structure-from-motion (SfM) processing, dense point cloud generation, mesh modeling, and orthophoto creation.
- Open-Source and Free: ODM is released under the MIT license, making it freely available for both personal and commercial use.
- Cross-Platform Compatibility: ODM can be run on various operating systems, including Windows, macOS, and Linux.
- Active Community: ODM has a large and active community of contributors, ensuring ongoing development and support.
Cons
- Steep Learning Curve: Setting up and configuring ODM can be challenging, especially for users new to photogrammetry and geospatial data processing.
- Hardware Requirements: Generating high-quality 3D models and orthophotos can be computationally intensive, requiring powerful hardware (e.g., GPU, large RAM).
- Limited Automation: While ODM provides a range of automated processing capabilities, some tasks may still require manual intervention or external tools.
- Dependency on Third-Party Libraries: ODM relies on several third-party libraries and tools, which can introduce compatibility issues or require additional setup.
Code Examples
N/A (OpenDroneMap is not a code library)
Getting Started
To get started with OpenDroneMap, follow these steps:
-
Install the required dependencies:
- Docker (recommended for cross-platform compatibility)
- GDAL
- OpenCV
- PCL
-
Clone the OpenDroneMap repository:
git clone https://github.com/OpenDroneMap/ODM.git
-
Navigate to the ODM directory:
cd ODM
-
Build the Docker image:
docker build -t opendronemap .
-
Run the ODM Docker container:
docker run -it --rm -v $(pwd)/data:/code/data opendronemap
-
Place your drone imagery in the
data
directory. -
Run the ODM processing pipeline:
python run.py --project-path /code/data/my-project
-
Wait for the processing to complete. The resulting 3D models, orthophotos, and other data products will be available in the
data/my-project
directory.
For more detailed instructions, including advanced configuration options and command-line arguments, please refer to the OpenDroneMap documentation.
Competitor Comparisons
Open source Structure-from-Motion pipeline
Pros of OpenSfM
- Modular Design: OpenSfM is designed with a modular architecture, making it easier to integrate with other systems and customize for specific use cases.
- Robust Algorithms: OpenSfM employs state-of-the-art computer vision algorithms for tasks like feature detection, matching, and structure-from-motion, resulting in high-quality 3D reconstructions.
- Active Development: The project has an active community of contributors and is regularly updated with new features and improvements.
Cons of OpenSfM
- Steeper Learning Curve: Compared to OpenDroneMap, OpenSfM may have a higher barrier to entry due to its more complex configuration and setup process.
- Limited Documentation: While the project has good documentation, it may not be as comprehensive or user-friendly as the documentation for OpenDroneMap.
Code Comparison
OpenDroneMap:
def run_opensfm(self):
"""Run OpenSfM pipeline"""
self.log.info('Running OpenSfM')
try:
opensfm.run_dataset(self.opensfm_project_path)
except Exception as e:
self.log.error('OpenSfM failed: %s' % str(e))
raise e
OpenSfM:
def run_reconstruction(data):
"""Run the full reconstruction pipeline."""
data.load_features()
data.load_matches()
data.create_tracks()
data.triangulate()
data.compute_depthmaps()
data.save_reconstruction()
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
Pros of AirSim
- AirSim provides a highly realistic and customizable simulation environment for drone and autonomous vehicle development, with support for various sensors and weather conditions.
- The project has a large and active community, with extensive documentation and a wide range of sample code and tutorials.
- AirSim is cross-platform, with support for Windows, Linux, and macOS, making it accessible to a wide range of developers.
Cons of AirSim
- AirSim has a steeper learning curve compared to OpenDroneMap, as it requires a deeper understanding of simulation and robotics concepts.
- The project is primarily focused on autonomous vehicle simulation, while OpenDroneMap is more specialized for drone-based photogrammetry and mapping.
- AirSim may have a higher resource footprint, as it requires a more powerful hardware setup to run realistic simulations.
Code Comparison
OpenDroneMap:
import odm
from odm.types import ODMOptions
options = ODMOptions(
project_path="path/to/project",
images_path="path/to/images",
orthophoto_resolution=5,
dem_resolution=5,
use_opensfm=True,
use_cmvs=True,
use_pmvs=True,
use_odm_filterpoints=True,
use_odm_meshing=True,
use_odm_texturing=True,
use_odm_georeferencing=True,
use_odm_orthophoto=True,
use_odm_dem=True
)
odm.run(options)
AirSim:
#include <airsim/AirSimSettings.h>
#include <airsim/vehicles/car/CarRpcController.h>
AirSimSettings settings;
settings.enable_rpc = true;
settings.rpc_port = 41451;
CarRpcController controller;
controller.connect("localhost", settings.rpc_port);
controller.takeoff();
controller.moveToPosition(0, 0, -10, 5);
controller.land();
PX4 Autopilot Software
Pros of PX4/PX4-Autopilot
- Robust and mature autopilot system with extensive documentation and community support
- Supports a wide range of hardware platforms and vehicle types
- Integrates well with other drone-related projects and tools
Cons of PX4/PX4-Autopilot
- Steep learning curve for beginners due to the complexity of the system
- Limited support for advanced computer vision and photogrammetry features
- Requires specialized hardware and setup for some advanced features
Code Comparison
OpenDroneMap/ODM:
import numpy as np
from opendronemap import dataset
from opendronemap import odm
# Load dataset
dataset = dataset.ODMDataset('path/to/dataset')
# Run ODM pipeline
odm_options = {
'resize_to': 2048,
'min_num_features': 4000,
'feature_quality': 1.2,
'feature_min_frames': 3
}
odm_results = odm.run(dataset, **odm_options)
PX4/PX4-Autopilot:
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/tasks.h>
#include <px4_platform_common/posix.h>
int commander_main(int argc, char *argv[])
{
if (argc < 2) {
PX4_WARN("usage: commander [start|stop|status]");
return 1;
}
if (!strcmp(argv[1], "start")) {
// Start the commander
return commander_thread_start();
}
// ...
}
Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
Pros of QGroundControl
- Extensive support for a wide range of drone hardware and protocols, including MAVLink, PX4, and ArduPilot.
- Provides a comprehensive ground control station with features like mission planning, telemetry monitoring, and parameter tuning.
- Actively maintained with regular updates and a large community of contributors.
Cons of QGroundControl
- Primarily focused on drone control and may not offer the same level of photogrammetry and 3D modeling capabilities as OpenDroneMap.
- The user interface may be more complex for users unfamiliar with drone technology.
- Limited support for non-MAVLink-based drones or custom hardware.
Code Comparison
OpenDroneMap:
def run_opensfm(self):
"""Run OpenSfM reconstruction."""
log.info('Running OpenSfM')
self.dataset.run_opensfm()
self.update_progress(40)
QGroundControl:
void MainWindow::loadSettings()
{
// Load user settings
QSettings settings;
settings.beginGroup("QGC");
m_lowPowerMode = settings.value("lowPowerMode", false).toBool();
settings.endGroup();
}
ArduPlane, ArduCopter, ArduRover, ArduSub source
Pros of ArduPilot
- Extensive community support and active development
- Supports a wide range of hardware platforms, including drones, rovers, and boats
- Provides advanced flight control and autonomous capabilities
Cons of ArduPilot
- Steeper learning curve compared to OpenDroneMap
- Limited focus on photogrammetry and 3D mapping capabilities
- Requires more specialized hardware and configuration
Code Comparison
OpenDroneMap (Python):
def run_odm_process(args):
"""Run the ODM process"""
try:
odm_runner = ODMRunner(args)
odm_runner.run_all()
except Exception as e:
logger.error("Error running ODM process: %s" % str(e))
raise e
ArduPilot (C++):
void Plane::update_flight_stage(void)
{
// Update the flight stage
if (control_mode == MANUAL || control_mode == TRAINING) {
flight_stage = FLIGHT_STAGE_MANUAL;
} else if (is_flying()) {
if (landing.is_flaring()) {
flight_stage = FLIGHT_STAGE_LAND;
} else {
flight_stage = FLIGHT_STAGE_FLIGHT;
}
} else {
flight_stage = FLIGHT_STAGE_STARTUP;
}
}
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
An open source command line toolkit for processing aerial drone imagery. ODM turns simple 2D images into:
- Classified Point Clouds
- 3D Textured Models
- Georeferenced Orthorectified Imagery
- Georeferenced Digital Elevation Models
The application is available for Windows, Mac and Linux and it works from the command line, making it ideal for power users, scripts and for integration with other software.
If you would rather not type commands in a shell and are looking for a friendly user interface, check out WebODM.
Quickstart
The easiest way to run ODM is via docker. To install docker, see docs.docker.com. Once you have docker installed and working, you can get ODM by running from a Command Prompt / Terminal:
docker pull opendronemap/odm
Run ODM by placing some images (JPEGs, TIFFs or DNGs) in a folder named âimagesâ (for example C:\Users\youruser\datasets\project\images
or /home/youruser/datasets/project/images
) and simply run from a Command Prompt / Terminal:
# Windows
docker run -ti --rm -v c:/Users/youruser/datasets:/datasets opendronemap/odm --project-path /datasets project
# Mac/Linux
docker run -ti --rm -v /home/youruser/datasets:/datasets opendronemap/odm --project-path /datasets project
You can pass additional parameters by appending them to the command:
docker run -ti --rm -v /datasets:/datasets opendronemap/odm --project-path /datasets project [--additional --parameters --here]
For example, to generate a DSM (--dsm
) and increase the orthophoto resolution (--orthophoto-resolution 2
) :
docker run -ti --rm -v /datasets:/datasets opendronemap/odm --project-path /datasets project --dsm --orthophoto-resolution 2
Viewing Results
When the process finishes, the results will be organized as follows:
|-- images/
|-- img-1234.jpg
|-- ...
|-- opensfm/
|-- see mapillary/opensfm repository for more info
|-- odm_meshing/
|-- odm_mesh.ply # A 3D mesh
|-- odm_texturing/
|-- odm_textured_model.obj # Textured mesh
|-- odm_textured_model_geo.obj # Georeferenced textured mesh
|-- odm_georeferencing/
|-- odm_georeferenced_model.laz # LAZ format point cloud
|-- odm_orthophoto/
|-- odm_orthophoto.tif # Orthophoto GeoTiff
You can use the following free and open source software to open the files generated in ODM:
- .tif (GeoTIFF): QGIS
- .laz (Compressed LAS): CloudCompare
- .obj (Wavefront OBJ), .ply (Stanford Triangle Format): MeshLab
Note! Opening the .tif files generated by ODM in programs such as Photoshop or GIMP might not work (they are GeoTIFFs, not plain TIFFs). Use QGIS instead.
API
ODM can be made accessible from a network via NodeODM.
Documentation
See http://docs.opendronemap.org for tutorials and more guides.
Forum
We have a vibrant community forum. You can search it for issues you might be having with ODM and you can post questions there. We encourage users of ODM to participate in the forum and to engage with fellow drone mapping users.
Windows Setup
ODM can be installed natively on Windows. Just download the latest setup from the releases page. After opening the ODM Console you can process datasets by typing:
run C:\Users\youruser\datasets\project [--additional --parameters --here]
GPU Acceleration
ODM has support for doing SIFT feature extraction on a GPU, which is about 2x faster than the CPU on a typical consumer laptop. To use this feature, you need to use the opendronemap/odm:gpu
docker image instead of opendronemap/odm
and you need to pass the --gpus all
flag:
docker run -ti --rm -v c:/Users/youruser/datasets:/datasets --gpus all opendronemap/odm:gpu --project-path /datasets project
When you run ODM, if the GPU is recognized, in the first few lines of output you should see:
[INFO] Writing exif overrides
[INFO] Maximum photo dimensions: 4000px
[INFO] Found GPU device: Intel(R) OpenCL HD Graphics
[INFO] Using GPU for extracting SIFT features
The SIFT GPU implementation is CUDA-based, so should work with most NVIDIA graphics cards of the GTX 9xx Generation or newer.
If you have an NVIDIA card, you can test that docker is recognizing the GPU by running:
docker run --rm --gpus all nvidia/cuda:10.0-base nvidia-smi
If you see an output that looks like this:
Fri Jul 24 18:51:55 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.82 Driver Version: 440.82 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
You're in good shape!
See https://github.com/NVIDIA/nvidia-docker and https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker for information on docker/NVIDIA setup.
Native Install (Ubuntu 21.04)
You can run ODM natively on Ubuntu 21.04 (although we don't recommend it):
git clone https://github.com/OpenDroneMap/ODM
cd ODM
bash configure.sh install
You can then process datasets with ./run.sh /datasets/odm_data_aukerman
Native Install (MacOS)
You can run ODM natively on Intel/ARM MacOS.
First install:
- Xcode 13 (not 14, there's currently a bug)
- Homebrew
Then Run:
git clone https://github.com/OpenDroneMap/ODM
cd ODM
bash configure_macos.sh install
You can then process datasets with ./run.sh /datasets/odm_data_aukerman
This could be improved in the future. Helps us create a Homebrew formula.
Updating a native installation
When updating to a newer version of native ODM, it is recommended that you run:
bash configure.sh reinstall
to ensure all the dependent packages and modules get updated.
Build Docker Images From Source
If you want to rebuild your own docker image (if you have changed the source code, for example), from the ODM folder you can type:
docker build -t my_odm_image --no-cache .
When building your own Docker image, if image size is of importance to you, you should use the --squash
flag, like so:
docker build --squash -t my_odm_image .
This will clean up intermediate steps in the Docker build process, resulting in a significantly smaller image (about half the size).
Experimental flags need to be enabled in Docker to use the --squash
flag. To enable this, insert the following into the file /etc/docker/daemon.json
:
{
"experimental": true
}
After this, you must restart docker.
Video Support
Starting from version 3.0.4, ODM can automatically extract images from video files (.mp4, .mov, .lrv, .ts). Just place one or more video files into the images
folder and run the program as usual. Subtitles files (.srt) with GPS information are also supported. Place .srt files in the images
folder, making sure that the filenames match. For example, my_video.mp4
==> my_video.srt
(case-sensitive).
Developers
Help improve our software! We welcome contributions from everyone, whether to add new features, improve speed, fix existing bugs or add support for more cameras. Check our code of conduct, the contributing guidelines and how decisions are made.
Installation and first run
For Linux users, the easiest way to modify the software is to make sure docker is installed, clone the repository and then run from a shell:
$ DATA=/path/to/datasets ./start-dev-env.sh
Where /path/to/datasets
is a directory where you can place test datasets (it can also point to an empty directory if you don't have test datasets).
Run configure to set up the required third party libraries:
(odmdev) [user:/code] master+* ± bash configure.sh reinstall
You can now make changes to the ODM source. When you are ready to test the changes you can simply invoke:
(odmdev) [user:/code] master+* ± ./run.sh --project-path /datasets mydataset
Stop dev container
docker stop odmdev
To come back to dev environement
change your_username to your username
docker start odmdev
docker exec -ti odmdev bash
su your_username
If you have questions, join the developer's chat at https://community.opendronemap.org/c/developers-chat/21
- Try to keep commits clean and simple
- Submit a pull request with detailed changes and test results
- Have fun!
Troubleshooting
The dev environment makes use of opendronemap/nodeodm
by default. You may want to run
docker pull opendronemap/nodeodm
before running ./start-dev-env.sh
to avoid using an old cached version.
In order to make a clean build, remove ~/.odm-dev-home
and ODM/.setupdevenv
.
Credits
ODM makes use of several libraries and other awesome open source projects to perform its tasks. Among them we'd like to highlight:
Citation
OpenDroneMap Authors ODM - A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. OpenDroneMap/ODM GitHub Page 2020; https://github.com/OpenDroneMap/ODM
Trademark
Top Related Projects
Open source Structure-from-Motion pipeline
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
PX4 Autopilot Software
Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
ArduPlane, ArduCopter, ArduRover, ArduSub source
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot