-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trainers: add Instance Segmentation Task #2513
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just need to make the code and tests match our existing trainers and run ruff: https://torchgeo.readthedocs.io/en/latest/user/contributing.html#linters
To solve the import issue, you also need to add 2 lines to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run ruff on the code to make it more uniform? This will make it easier to review.
InstanceSegmentationTask(backbone='invalid_backbone') | ||
|
||
def test_weights(self) -> None: | ||
InstanceSegmentationTask(weights=True, num_classes=91) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yet another test that downloads data on the fly (#1088), but let's fix that another day when we figure out how to support custom weights.
Hmm, looks like FTW isn't supported because it only has masks, not bboxes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are finally passing! @ariannasole23 maybe you can check VHR-10 again to make sure I didn't break anything and it still works. Would like a couple other people to review this too, but otherwise this is ready to merge once you accept the CLA.
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will give others a few days to test before merging.
The current InstanceSegmentationTask implementation isn't really flexible. I tried training a model with it recently and found the following:
Train config used: trainer:
min_epochs: 15
max_epochs: 100
model:
class_path: InstanceSegmentationTask
init_args:
model: 'mask-rcnn'
backbone: 'resnet50' # Only resnet50 can be used
weights: None # Using pretrained weights (weights:True) will not work in this implementation
num_classes: 11
lr: 3.0e-5 I'd suggest following the implementation of how Faster-RCNN is defined in |
|
No description provided.