weecology / DeepForest

Python Package for Airborne RGB machine learning
https://deepforest.readthedocs.io/
MIT License
506 stars 172 forks source link

Detecting crown contours #389

Closed aloboa closed 1 year ago

aloboa commented 1 year ago

As far as I understand from the results (eg https://visualize.idtrees.org/), Deepforest output are rectangles including detected crowns, rather than the actual polygons contouring the crowns. Is this because the input training is also rectangles including crowns or is there something in the processing that prevents the method to output crown polygons? In other words, if we train with delineated crown polygons, would we get crown polygons as output?

ethanwhite commented 1 year ago

The algorithm is bounding box based because that's how most computer vision detection algorithms work fundamentally. This is in contrast to most LIDAR based approaches which inherently produce polygons. If you need polygons from image data then you'll need a method that adds a masking phase to the process. We've experimented with some but don't have anything implemented.

If polygons are a priority I recommend checking out https://github.com/PatBall1/detectree2, which uses a mask R-CNN that adds the masking phase and is designed to work on polygon training data.