8000 GitHub - kikislater/GeoDeep: Free and open source library for AI object detection in geospatial rasters. 🚀
[go: up one dir, main page]

Skip to content

kikislater/GeoDeep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoDeep

A fast, easy to use, lightweight Python library for AI object detection in geospatial rasters (GeoTIFFs), with pre-built models included.

Image

Install

pip install -U geodeep

Usage

From the command line

geodeep [geotiff] [model ID or path to ONNX model]

Example:

geodeep orthophoto.tif cars

Here GeoDeep will find cars in the orthophoto and write the result as a GeoJSON file containing the bounding boxes, confidence scores and class labels.

A list of up-to-date model IDs can be retrieved via:

geodeep --list-models

See also geodeep --help.

From Python

from geodeep import detect
bboxes, scores, classes = detect('orthophoto.tif', 'cars')
print(bboxes) # <-- [[x_min, y_min, x_max, y_max], [...]]
print(scores) # <-- [score, ...]
print(classes) # <-- [(id: int, label: str), ...]

geojson = detect('orthophoto.tif', 'cars', output_type="geojson")

Models by default will be cached in ~/.cache/geodeep. You can change that with:

from geodeep import models
models.cache_dir = "your/cache/path"

Models

Model Description Resolution (cm/px) Experimental
cars YOLOv7-m model for cars detection on aerial images. Based on ITCVD. 10
trees Retinanet tree crown detection model from DeepForest 10
birds Retinanet bird detection model from DeepForest 2 ✔️
trees_yolov7 YOLOv9 model for treetops detection on aerial images. Model is trained on a mix of publicly available datasets. 10 ✔️

All ONNX models are published on https://huggingface.co/datasets/UAV4GEO/GeoDeep-Models

Creating New Models

Instructions coming soon. The basic idea is to create an ONNX model (see the retinanet conversion script) and possibly make some modifications to GeoDeep to handle different conventions in model architectures via conditional checking.

Why GeoDeep?

Compared to other software packages (e.g. Deepness), GeoDeep relies only on two dependencies, rasterio and onnxruntime. This makes it simple and lightweight.

Contributing

We welcome contributions! Pull requests are welcome.

Roadmap Ideas

  • Train more detection models
  • Add support for semantic segmentation models
  • Faster inference optimizations

Support the Project

There are many ways to contribute to the project:

  • ⭐️ us on GitHub.
  • Help us test the application.
  • Become a contributor!

Credits

GeoDeep was inspired and uses some code from Deepness and DeepForest.

License

The code in this repository is licensed under the AGPLv3.

Made with ❤️ by UAV4GEO

About

Free and open source library for AI object detection in geospatial rasters. 🚀

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%
0