Skip to content

Add polygon dataset class#1359

Open
Om-Doiphode wants to merge 1 commit intoweecology:mainfrom
Om-Doiphode:polygon_dataset
Open

Add polygon dataset class#1359
Om-Doiphode wants to merge 1 commit intoweecology:mainfrom
Om-Doiphode:polygon_dataset

Conversation

@Om-Doiphode
Copy link
Contributor

Description

This PR adds a polygon dataset that can be used for training segmentation models like Mask RCNN.

  1. Create a polygon dataset class.
  2. Add MaskRCNN to deepforest/models/ directory.
  3. Confirm that preprocess.split_raster and other utilities/visualization functions can take in polygon predictions.
  4. Create an example IPython notebook showing how to train a polygon model, train an initial model using open-source polygon data

Related Issue(s)

Fixes issue #758

AI-Assisted Development

  • I used AI tools (e.g., GitHub Copilot, ChatGPT, etc.) in developing this PR
  • I understand all the code I'm submitting
  • I have reviewed and validated all AI-generated code

AI tools used (if applicable):

ChatGPT

@Om-Doiphode Om-Doiphode mentioned this pull request Mar 24, 2026
4 tasks
@jveitchmichaelis
Copy link
Collaborator

jveitchmichaelis commented Mar 25, 2026

Could you scope this pr to only the dataset/loader please? You could have a look at the keypoint commit (recently) for reference.

We can test that we can evaluate predictions (would need to add some to the repo) without integrating the training and inference loop.

We should also think about:

  • What format labels do we support loading? I think we probably should support MS-COCO at this point, or at least add a conversion script to generate a suitable CSV with the correct geometry.
  • Output format (get_item)? Typically this is boolean mask-per-object or it may need to be type long for torchvision.
  • Similarly, format convention for models in HuggingFace? See MaskFormer, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants