-
Notifications
You must be signed in to change notification settings - Fork 854
π Add MVTec LOCO dataset and sPRO metric #1967
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
Closed
Closed
Changes from 66 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
c5c6bc7
add FROM_DIR option to `val split mode` to support a provided val dirβ¦
willyfh 4c76092
add a conditional check for the FROM_DIR option of val split mode
willyfh ecc7169
add the mvtec loco ad dataset classes
willyfh 9d89a68
add the default config file for mvtec loco ad dataset
willyfh a312be0
update initialization files to include MVTec LOCO dataset
willyfh 37a6f6b
remove unnecessary Path conversion
willyfh a733bf7
add mvtec_loco.yaml to the readme documentation of configs
willyfh 38ad1f4
add dummy image generation for mvtec loco dataset
willyfh 05e3558
add unit test for mvtec loco dataset
willyfh 519780a
update changelog to include the addition of mvtec loco dataset
willyfh c3c6a39
add mvtec loco dataset to the sphinx-based docs
willyfh ca91b8e
fix the malformed table
willyfh 37f4dbc
binarize the masks and avoid the possibility of the merge_mask is None
willyfh 3559a7c
Merge the masks using sum operation without binarization
willyfh 83539b4
override getitem method to handle binarization and to add additional β¦
willyfh ddd33c5
Add saturation config to the datamodule
willyfh 3af6eeb
Update the saturation config on the metrics based on the loaded confiβ¦
willyfh 53f2297
add masks as a keyword args to the update method of the AnomalibMetriβ¦
willyfh 3d00d69
Shorten the comments to solve ruff issues
willyfh f024e91
Add sPro metric implementation
willyfh 9b8ca3b
Change the saturation threshold to tensor
willyfh 29aaf46
Handle case with only background/normal images in scoring
willyfh f432753
rename spro metric and change the default value of saturation_config β¦
willyfh 7d348d8
add unit test for spro metric
willyfh 5597bfc
fix pre-commit issues
willyfh 7b02863
handle file not found error when loading saturation config
willyfh 6048a08
validate path before processing
willyfh e237347
update changelog with new PR
willyfh f9b67b8
Update src/anomalib/data/image/mvtec_loco.py
willyfh 63bf8de
Update src/anomalib/data/image/mvtec_loco.py
willyfh 0310e1b
Update tests/helpers/data.py
willyfh 4eb2ec3
change assert to raise error
willyfh f3bccb8
return list of masks instead of merging the multiple masks from the dβ¦
willyfh ac1ecb1
collate masks as a list of tensor to avoid stack error due to unequalβ¦
willyfh 3bbc750
update spro to handle list of masks and remove the _ args
willyfh e8e7360
update unit test to use list of masks as the target
willyfh ccef95c
update type and docstring of spro_score function
willyfh 2cdeb82
remove _saturation_config attribute from metric collection module
willyfh d2cbcf3
remove unnecessary lines
willyfh 829289b
add unit test to make sure the `mask` is binary
willyfh 53aa07f
add warning when the saturation threshold is larger than the defect area
willyfh d9a2333
Move the loading process of saturation config from dataset to metric
willyfh c1b7a28
merge main
djdameln 8785aa2
merge main
djdameln a767052
Merge branch 'mvtec_loco' into feature/mvtec-loco
djdameln 930cfe2
Update src/anomalib/metrics/spro.py
samet-akcay a2c529c
update hashsum
djdameln 0c68c90
update example
djdameln d6bd7fb
remove duplicate parameter
djdameln 4a8e487
Merge branch 'feature/mvtec-loco' of github.com:openvinotoolkit/anomaβ¦
djdameln 934f753
Update src/anomalib/data/base/datamodule.py
djdameln 63f210e
move and update loco config
djdameln 98cd7f6
Merge branch 'feature/mvtec-loco' of github.com:openvinotoolkit/anomaβ¦
djdameln ba371c4
Update tests/unit/data/image/test_mvtec_loco.py
djdameln 114f8e6
Update tests/unit/metrics/test_spro.py
djdameln 7dbb983
Update src/anomalib/data/image/mvtec_loco.py
djdameln 6587cac
Update src/anomalib/cli/cli.py
djdameln 36ebf1c
Update src/anomalib/metrics/spro.py
djdameln b998823
Update src/anomalib/metrics/spro.py
djdameln c844c1d
fix mask loading
djdameln 501c116
Merge branch 'feature/mvtec-loco' of github.com:openvinotoolkit/anomaβ¦
djdameln 58c3b3f
ruff
djdameln 4028b9a
fix multiple mask loading
djdameln c87f742
masks -> semantic_mask
djdameln eabb755
Merge branch 'main' into feature/mvtec-loco
djdameln 15e1e74
add metric collection for semantic pixel metrics
djdameln 69953ed
add comment
djdameln 38d98c2
merge main
djdameln 3ffee16
check if val_data is assigned for val_split_mode from_dir
djdameln b7c0d94
initialize semantic pixel metric names as list
djdameln 9da8a68
Merge branch 'main' of github.com:openvinotoolkit/anomalib into featuβ¦
samet-akcay 1cc19d7
Merge branch 'main' into feature/mvtec-loco
ashwinvaidya17 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| class_path: anomalib.data.MVTecLoco | ||
| init_args: | ||
| root: ./datasets/MVTec_LOCO | ||
| category: breakfast_box | ||
| train_batch_size: 32 | ||
| eval_batch_size: 32 | ||
| num_workers: 8 | ||
| task: SEGMENTATION | ||
| test_split_mode: FROM_DIR | ||
| test_split_ratio: 0.2 | ||
| val_split_mode: FROM_DIR | ||
| val_split_ratio: 0.5 | ||
| seed: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
docs/source/markdown/guides/reference/data/image/mvtec_loco.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # MVTec LOCO Data | ||
|
|
||
| ```{eval-rst} | ||
| .. automodule:: anomalib.data.image.mvtec_loco | ||
| :members: | ||
| :show-inheritance: | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.