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

Updated uflow #2104

Merged
merged 42 commits into from
Jul 16, 2024
Merged

Updated uflow #2104

merged 42 commits into from
Jul 16, 2024

Conversation

mtailanian
Copy link
Contributor

📝 Description

  • Provide a clear summary of the changes and the issue that has been addressed.
  • 🛠️ Fixes # (issue number)

fixed loss computation

✨ Changes

  • added new anomaly segmentation method, from the uflow paper
  • updated readme with final results, images, and paper link and citation

Select what type of change your PR is:

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔨 Refactor (non-breaking change which refactors the code base)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔒 Security update

✅ Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • 📋 I have summarized my changes in the CHANGELOG and followed the guidelines for my type of change (skip for minor changes, documentation updates, and test enhancements).
  • 📚 I have made the necessary updates to the documentation (if applicable).
  • 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).

For more information about code review checklists, see the Code Review Checklist.

mtailanian and others added 30 commits October 15, 2023 14:55
Co-authored-by: Samet Akcay <samet.akcay@intel.com>
Co-authored-by: Samet Akcay <samet.akcay@intel.com>
Co-authored-by: Samet Akcay <samet.akcay@intel.com>
Co-authored-by: Samet Akcay <samet.akcay@intel.com>
…e subnet contructor to a Class, in order to be pickable, that is needed to export the model to torch
@mtailanian
Copy link
Contributor Author

Hello guys, I just wanted to ask: am I supposed to add something or correct something? should I update the branch?

Copy link
Collaborator

@ashwinvaidya17 ashwinvaidya17 left a comment

Choose a reason for hiding this comment

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

Thanks for updating this. I have a few minor comments.

src/anomalib/models/image/uflow/nfa_tree.py Show resolved Hide resolved
src/anomalib/models/image/uflow/nfa_tree.py Show resolved Hide resolved
@mtailanian
Copy link
Contributor Author

I guess it should be fine now... Should I update the branch in order to merge this?


Btw, I have one more question.
As you might have seen in the code, I included a method for finding an automatic segmentation of the anomalies, as this method is part of the paper. But it is unused in the current code.

Is there a good way to include it as part of the default outputs?
I saw that all the segmentations are actually obtained by maximizing some metric in testing sets, so I'm not sure if it's a good idea to try to add this method there... I guess not, but I can't think of any other place.

Or maybe it is just fine as it is... The code is there in case anyone wants to use it...

Any thoughts are appreciated.
Thanks!

@mtailanian
Copy link
Contributor Author

Hi guys, hope everything is well.
Is there anything I could do to get this merged?
Thanks again!

@ashwinvaidya17
Copy link
Collaborator

@mtailanian the PR looks good to me. Do you have access to the logs here: https://github.com/openvinotoolkit/anomalib/actions/runs/9483018344/job/26129442354?pr=2104? If so, can you fix the pre-merge checks. Ideally, you should be able to run these locally as well. Just do pip install pre_commit and then run pre-commit run --all-files

@ashwinvaidya17
Copy link
Collaborator

I guess it should be fine now... Should I update the branch in order to merge this?

Btw, I have one more question. As you might have seen in the code, I included a method for finding an automatic segmentation of the anomalies, as this method is part of the paper. But it is unused in the current code.

Is there a good way to include it as part of the default outputs? I saw that all the segmentations are actually obtained by maximizing some metric in testing sets, so I'm not sure if it's a good idea to try to add this method there... I guess not, but I can't think of any other place.

Or maybe it is just fine as it is... The code is there in case anyone wants to use it...

Any thoughts are appreciated. Thanks!

Maybe you can create an issue for this, and we can refactor this so that users might be able to switch between both. I am not sure what's the priority for this, but it will remain visible until when we finally get around to doing this.

@mtailanian
Copy link
Contributor Author

@mtailanian the PR looks good to me. Do you have access to the logs here: https://github.com/openvinotoolkit/anomalib/actions/runs/9483018344/job/26129442354?pr=2104? If so, can you fix the pre-merge checks. Ideally, you should be able to run these locally as well. Just do pip install pre_commit and then run pre-commit run --all-files

Hi @ashwinvaidya17 , thank you for your response!
I had already run the pre-commit. However, I'm a bit confused. pre-commit suggest to change the typing, for example list -> List, or tuple -> Tuple. I changed it, but the pre-commit itself would revert it to list, tuple, etc...

How should I do? I'm kind of stuck...

Thanks again!

Copy link
Contributor

@samet-akcay samet-akcay left a comment

Choose a reason for hiding this comment

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

@mtailanian thanks for your patience. It took me quite some time to review this PR. I have two comments below

docs/source/reference_guide/algorithms/uflow.rst Outdated Show resolved Hide resolved
src/anomalib/models/image/uflow/nfa_tree.py Show resolved Hide resolved
@mtailanian
Copy link
Contributor Author

Hi @samet-akcay , thanks for your feedback. I just addressed both comments!
Let me know if there is something else...
Best,

@samet-akcay
Copy link
Contributor

Hi @samet-akcay , thanks for your feedback. I just addressed both comments! Let me know if there is something else... Best,

Thanks @mtailanian

@mtailanian
Copy link
Contributor Author

@samet-akcay I see I have again the same pre-commit errors. Please see this comment. I don't really know how to solve it...

@samet-akcay samet-akcay changed the base branch from main to fix/uflow July 16, 2024 13:35
@samet-akcay
Copy link
Contributor

It's alright, I'll merge it to a branch, from which I'll try to fix it

@samet-akcay samet-akcay merged commit dc2291b into openvinotoolkit:fix/uflow Jul 16, 2024
4 of 5 checks passed
@mtailanian
Copy link
Contributor Author

Thanks so much @samet-akcay !
:)

@samet-akcay samet-akcay added this to the v1.1.1 milestone Jul 30, 2024
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.

None yet

3 participants