weecology / weecology/DeepForest
Polygon model support
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 774
- Forks
- 265
- PR merge metrics
- No merged PRs in 30d
Description
As part of milestone 2.0, we want to support polygon prediction and modeling. Here is a roadmap
- Add torchvision mask-rcnn to models/ directory and match the prediction format of boxes.
- Create a polygon dataset class.
One area that I started implement in million trees is how the dataloader is going to yield masks. Frankly, I've never used a mask-rcnn model, https://github.com/weecology/MillionTrees/blob/64f78b52ad164fc4cbc87de2bf54259e98c694d4/milliontrees/datasets/TreePolygons.py#L134, so i'm open to ideas.
(https://github.com/weecology/DeepForest/blob/d834b17b949e25df0f75905108955ec4928f025e/deepforest/dataset.py#L203) - Confirm that preprocess.split_raster and other utilities/visualization functions can take in polygon predictions.
- Create a example ipython notebook showing how to train a polygon model, train an initial model using open source polygon data: https://www.mdpi.com/2072-4292/16/11/1935, https://zenodo.org/records/8148479 https://zenodo.org/records/8136161 (this one I had to clean up, the .tif was messy).
I expect that the user will not have to declare polygons anywhere, when they choose mask-rcnn in the config, or when we read_file we will know that they have polygon data. We may need to add a class attribute to deepforest.main that keeps track of the current geometry.
Optional ideas
- Compare output of mask RCNN with segment anything based on the DeepForest box model. see #460
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the models/ directory, the dataset implementation in deepforest/dataset.py, and the MillionTrees TreePolygons.py example to understand the proposed mask output. Then inspect preprocess.split_raster and the visualization utilities for polygon compatibility. Done would include mask-rcnn support, a polygon dataset class, compatible utilities, and an example notebook using polygon data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100