open-forest-observatory / tree-detection-framework

BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Extend `RegionDetection/Set` and implement NMS #27

Closed russelldj closed 1 month ago

russelldj commented 1 month ago

Most of this PR is making changes/extensions to the RegionDetections and RegionDetectionsSet classes to support streamlined NMS.

Also I currently have un-used functionality to get the bounds of the predicted region in different CRS for both the RegionDetections and RegionDetectionSet.

russelldj commented 1 month ago

I also implemented NMS, which was fairly straightforward. One major limitation is this library only supports rectangular bounding boxes. Currently, this is defined as the minimum bounding rectangle for each polygon (.bounds). In the future we might want to support real polygon NMS. Also, there's an option to include a multi-class variation in LSNMS, the library we use. I didn't implement it, but we could consider it in the future.