Skip to content
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

Enhance Panoptic Quality implementation #1527

Merged
merged 18 commits into from
Feb 24, 2023

Conversation

marcocaccin
Copy link
Contributor

@marcocaccin marcocaccin commented Feb 20, 2023

What does this PR do?

Fixes #1511:

  • allow batches in input (necessary feature)
  • allow inputs as images, point clouds, or data with any other spatial dimensionality
  • do not consider never seen classes in metric computation
  • make some progress in extending tests
Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃
sure ✅

raise TypeError(f"Expected argument `target` to be of type `torch.Tensor`, but got {type(target)}")
if preds.shape != target.shape:
raise ValueError(
f"Expected argument `preds` and `target` to have the same shape, but got {preds.shape} and {target.shape}"
)
if preds.dim() != 3 or preds.shape[-1] != 2:
raise ValueError(f"Expected argument `preds` to have shape [height, width, 2], but got {preds.shape}")
if preds.dim() < 3:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: what's the best way to deal with an unknown number of spatial dimensions? Here I just say "anything > 0 is fine", but maybe we want to restrict to just point clouds and images (but why no voxels..., and so on)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is veru good question, so lets play with it in follow-up PR :)
cc: @Lightning-AI/core-metrics

@marcocaccin marcocaccin force-pushed the feat/panoptic_quality_enhance branch 2 times, most recently from f476b21 to 2c36e0b Compare February 22, 2023 20:49
@marcocaccin marcocaccin marked this pull request as ready for review February 22, 2023 21:49
@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Merging #1527 (59de7c8) into master (b5aaa60) will decrease coverage by 51%.
The diff coverage is 80%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1527     +/-   ##
========================================
- Coverage      88%     37%    -51%     
========================================
  Files         219     219             
  Lines       11473   11497     +24     
========================================
- Hits        10069    4277   -5792     
- Misses       1404    7220   +5816     

@Borda Borda added the enhancement New feature or request label Feb 23, 2023
@Borda Borda added this to the v0.12 milestone Feb 23, 2023
@mergify mergify bot added the ready label Feb 23, 2023
@marcocaccin marcocaccin force-pushed the feat/panoptic_quality_enhance branch from 2709853 to 178e715 Compare February 23, 2023 23:16
@Borda Borda requested a review from SkafteNicki February 24, 2023 12:52
@mergify mergify bot removed the has conflicts label Feb 24, 2023
@Borda Borda enabled auto-merge (squash) February 24, 2023 16:40
@Borda Borda disabled auto-merge February 24, 2023 19:37
@Borda Borda merged commit f455b8e into Lightning-AI:master Feb 24, 2023
@marcocaccin marcocaccin deleted the feat/panoptic_quality_enhance branch April 19, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend Panoptic Quality usability, functionality and testing
4 participants