openvinotoolkit / anomalib

An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge inference.
https://anomalib.readthedocs.io/en/latest/
Apache License 2.0
3.41k stars 616 forks source link

๐Ÿ”จ Refactor Export #2057

Closed ashwinvaidya17 closed 1 month ago

ashwinvaidya17 commented 1 month ago

๐Ÿ“ Description

โœจ Changes

Select what type of change your PR is:

โœ… Checklist

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

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

review-notebook-app[bot] commented 1 month ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 96.59091% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 81.22%. Comparing base (e95dbe8) to head (b283e78). Report is 1 commits behind head on main.

Files Patch % Lines
...rc/anomalib/models/components/base/export_mixin.py 96.20% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2057 +/- ## ======================================= Coverage 81.21% 81.22% ======================================= Files 225 226 +1 Lines 10233 10245 +12 ======================================= + Hits 8311 8321 +10 - Misses 1922 1924 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

CarlosNacher commented 1 month ago

Hi @ashwinvaidya17 @samet-akcay One question, perhaps is a Pytorch general doubt, when you model.to_onnx (or to_torch for example), the model you are exporting does use the best weights or the last ones? And when in Anomalib we use the export method of the Engine class, what happens? If the last ones, how should we act to export the best weights taking advantage of the Anomalib's methods?

Thank you so much.

ashwinvaidya17 commented 1 month ago

@CarlosNacher can you create a discussion for this (https://github.com/openvinotoolkit/anomalib/discussions) so that it does not get lost in the PRs.

CarlosNacher commented 1 month ago

@ashwinvaidya17 got it, thank you!

Dicussion: https://github.com/openvinotoolkit/anomalib/discussions/2110