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

[Segmentation] Added generalized dice score metric #1090

Merged
merged 80 commits into from
Apr 23, 2024

Conversation

jlcsilva
Copy link
Contributor

What does this PR do?

Fixes #1089 . Didn't manage to make it work for multidimensional multilabel scenarios. However, that shouldn't a very common use case.

Before submitting

  • Was this discussed/approved 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 🙃

@Borda
Copy link
Member

Borda commented Jun 17, 2022

I beilve that this shall be automatically resolved in cmd by git merge upstream/master

@jlcsilva
Copy link
Contributor Author

I beilve that this shall be automatically resolved in cmd by git merge upstream/master

I tried that, but got merge: upstream/master - not something we can merge. Any tips? I searched the error, but I'm a bit of a git rookie, so I'm afraid I'll break stuff instead of fixing it 😅

@Borda Borda force-pushed the generalized_dice_score branch from 03ca976 to d48dd72 Compare June 20, 2022 09:08
@Borda
Copy link
Member

Borda commented Jun 20, 2022

@jlcsilva shall be resolved now, pls check if I did not make a mistake... 🐰

@mergify mergify bot removed the has conflicts label Jun 20, 2022
@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Attention: Patch coverage is 87.00000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 33%. Comparing base (82ab513) to head (bd375c0).
Report is 125 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1090     +/-   ##
========================================
- Coverage      69%     33%    -35%     
========================================
  Files         307     311      +4     
  Lines       17427   17527    +100     
========================================
- Hits        11989    5849   -6140     
- Misses       5438   11678   +6240     

@Borda Borda added this to the v0.10 milestone Jun 20, 2022
@jlcsilva
Copy link
Contributor Author

@jlcsilva shall be resolved now, pls check if I did not make a mistake... 🐰

Seems ok to me.

Also, I know why the tests are failing, but I'm unsure about what to do. In the file tests/unittests/classification/inputs.py
I changed the data type of some input tensors, such as _input_binary, from int to float, to match the description here. Since the tests are failing, I'm not sure what's wrong, the documentation or the code. Any thoughts from someone with a better overall view of the repo?

@SkafteNicki
Copy link
Member

Hi @jlcsilva, when looking at the changes in the PR there also seems to be some changes to other metrics. Any particular reason for this?

@justusschock
Copy link
Member

@SkafteNicki I believe they are coming from resolving the merge conflicts

@jlcsilva
Copy link
Contributor Author

Hi @jlcsilva, when looking at the changes in the PR there also seems to be some changes to other metrics. Any particular reason for this?

In the StatScore class I added the None option for the reduce argument, which I needed for my generalized dice score implementation, and changed its documentation and that of its subclasses accordingly. Additionally, I corrected some typos and added some missing information to these classes' documentation.

Finally, I changes the data type of some test inputs to match that in the general input type documentation page, and added new multidimensional input tensors. To me, this seems to be what is making the code fail the tests. Currently, I'm out of office, but I'll check it as soon as I go back to work

@mergify mergify bot removed the has conflicts label Apr 12, 2024
@SkafteNicki SkafteNicki changed the title Added generalized dice score metric [Segmentation] Added generalized dice score metric Apr 12, 2024
@SkafteNicki SkafteNicki marked this pull request as draft April 12, 2024 14:39
@SkafteNicki SkafteNicki marked this pull request as ready for review April 23, 2024 08:54
@mergify mergify bot added the ready label Apr 23, 2024
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

So happy to see it landing 🤩

@Borda Borda enabled auto-merge (squash) April 23, 2024 11:43
@Borda Borda merged commit 745c471 into Lightning-AI:master Apr 23, 2024
61 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation New metric Priority Critical task/issue ready topic: Classif
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generalized Dice Score
5 participants