Coder Social home page Coder Social logo

0scarj1ang / detectree2_2023 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from patball1/detectree2

0.0 0.0 0.0 147.08 MB

This is forked from the main detectree2, and used to develop Liana classification functions.

Home Page: https://patball1.github.io/detectree2/

License: MIT License

Shell 0.01% Python 0.54% R 0.27% Makefile 0.02% Jupyter Notebook 99.15% Dockerfile 0.01%

detectree2_2023's Introduction

predictions predictions

License: MIT Detectree CI PEP8 DOI

Python package for automatic tree crown delineation based on Mask R-CNN. Pre-trained models can be picked in the model_garden. A tutorial on how to prepare data, train models and make predictions is available here. For questions, collaboration proposals and requests for data email James Ball. Some example data is available for download here.

Detectree2是一个基于Mask R-CNN的自动树冠检测与分割的Python包。您可以在model_garden中选择预训练模型。这里提供了如何准备数据、训练模型和进行预测的教程。如果有任何问题,合作提案或者需要样例数据,可以邮件联系James Ball。一些示例数据可以在这里下载。

Code developed by James Ball, Seb Hickman, Thomas Koay, Oscar Jiang, Luran Wang, Panagiotis Ioannou, James Hinton and Matthew Archer in the Forest Ecology and Conservation Group at the University of Cambridge. The Forest Ecology and Conservation Group is led by Professor David Coomes and is part of the University of Cambridge Conservation Research Institute. MRes project repo available here.

Warning
Due to an influx of new users we have been hitting bandwidth limits. This is primarily from the file size of the pre-trained models. If you are using these models please aim to save them locally and point to them when you need them rather than downloading them each time they are required. We will move to a more bandwidth friendly set up soon. In the meantime, if installing the package is failing please raise it as an issue or notify me directly on [email protected].

Please cite

Ball, J.G.C., Hickman, S.H.M., Jackson, T.D., Koay, X.J., Hirst, J., Jay, W., Archer, M., Aubry-Kientz, M., Vincent, G. and Coomes, D.A. (2023), Accurate delineation of individual tree crowns in tropical forests from aerial RGB imagery using Mask R-CNN. Remote Sens Ecol Conserv. https://doi.org/10.1002/rse2.332

Requirements

e.g. pip3 install torch torchvision torchaudio

Installation

pip

pip install git+https://github.com/PatBall1/detectree2.git

Currently works on Google Colab (Pro version recommended). May struggle on clusters if geospatial libraries are not configured. See Installation Instructions if you are having trouble.

conda

Under development

Getting started

Detectree2, based on the Detectron2 Mask R-CNN architecture, locates trees in aerial images. It has been designed to delineate trees in challenging dense tropical forests for a range of ecological applications.

This tutorial takes you through the key steps. Example Colab notebooks are also available.

The standard workflow includes:

  1. Tile the orthomosaics and crown data (for training, validation and testing)
  2. Train (and tune) a model on the training tiles
  3. Evaluate the model performance by predicting on the test tiles and comparing to manual crowns for the tiles
  4. Using the trained model to predict the crowns over the entire region of interest

Training crowns are used to teach the network to delineate tree crowns.

predictions predictions

Here is an example image of the predictions made by Detectree2.

predictions

Independent validation

Detectree2 (F1 score: 0.57) outperformed DeepForest (F1 score: 0.52)

Detectree2 could estimate tree crown areas accurately, highlighting its potential and robustness for tree detection and delineation

Gan, Yi, Quan Wang, and Atsuhiro Iio. (2023). Tree Crown Detection and Delineation in a Temperate Deciduous Forest from UAV RGB Imagery Using Deep Learning Approaches: Effects of Spatial Resolution and Species Characteristics. Remote Sensing. 15(3):778. https://doi.org/10.3390/rs15030778

Applications

Tracking tropical tree growth and mortality

predicting

Counting urban trees (Buffalo, NY)

predicting

Multi-temporal tree crown segmentation

predicting

Liana detection and infestation mapping

In development

predicting

Tree species identification and mapping

In development

To do

  • Functions for multiple labels vs single "tree" label

Project Organization

├── LICENSE
├── Makefile
├── README.md
├── detectree2
│   ├── data_loading
│   ├── models
│   ├── preprocessing
│   ├── R
│   └── tests
├── docs
│   └── source
├── model_garden
├── notebooks
│   ├── colab
│   ├── colabJB
│   ├── colabJH
│   ├── colabKoay
│   ├── colabPan
│   ├── colabSeb
│   ├── exploratory
│   ├── mask_rcnn
│   │   ├── testing
│   │   └── training
│   ├── reports
│   └── turing
├── report
│   ├── figures
│   └── sections
└── requirements

Code formatting

To automatically format your code, make sure you have black installed (pip install black) and call black . from within the project directory.


Copyright (c) 2022, James G. C. Ball

detectree2_2023's People

Contributors

0scarj1ang avatar ancazugo avatar james-hirst-1998 avatar ma595 avatar patball1 avatar ptresson avatar shmh40 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.