Skip to content

Support MVTec anomaly data and add UnionMerge #810

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

Merged
merged 27 commits into from
Feb 13, 2023

Conversation

wonjuleee
Copy link
Contributor

@wonjuleee wonjuleee commented Feb 10, 2023

Summary

How to test

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2023

Codecov Report

Base: 77.60% // Head: 77.72% // Increases project coverage by +0.12% 🎉

Coverage data is based on head (38f665d) compared to base (3cc2e1c).
Patch coverage: 87.17% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #810      +/-   ##
===========================================
+ Coverage    77.60%   77.72%   +0.12%     
===========================================
  Files          179      184       +5     
  Lines        23238    23570     +332     
  Branches      5023     5082      +59     
===========================================
+ Hits         18034    18320     +286     
- Misses        4141     4169      +28     
- Partials      1063     1081      +18     
Flag Coverage Δ
macos-11_Python-3.10 77.65% <87.17%> (+0.12%) ⬆️
macos-11_Python-3.7 77.23% <86.84%> (+0.13%) ⬆️
macos-11_Python-3.8 77.60% <87.17%> (+0.13%) ⬆️
macos-11_Python-3.9 77.61% <87.17%> (+0.13%) ⬆️
ubuntu-20.04_Python-3.10 ?
ubuntu-20.04_Python-3.7 ?
ubuntu-20.04_Python-3.8 ?
ubuntu-20.04_Python-3.9 ?
windows-2019_Python-3.10 77.60% <87.15%> (+0.13%) ⬆️
windows-2019_Python-3.7 77.17% <86.81%> (+0.13%) ⬆️
windows-2019_Python-3.8 77.54% <87.15%> (+0.13%) ⬆️
windows-2019_Python-3.9 77.54% <87.15%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
datumaro/cli/commands/merge.py 20.20% <0.00%> (ø)
datumaro/cli/contexts/model.py 21.64% <0.00%> (-0.17%) ⬇️
datumaro/components/project.py 79.18% <0.00%> (-0.06%) ⬇️
datumaro/plugins/data_formats/mvtec/exporter.py 72.72% <72.72%> (ø)
datumaro/plugins/transforms.py 76.72% <75.00%> (+0.03%) ⬆️
datumaro/components/merger.py 76.74% <76.74%> (ø)
datumaro/components/visualizer.py 93.39% <87.50%> (+0.25%) ⬆️
datumaro/components/operations.py 83.82% <87.73%> (-0.19%) ⬇️
datumaro/components/dataset.py 82.30% <90.90%> (-0.04%) ⬇️
datumaro/components/annotation.py 91.50% <91.80%> (+<0.01%) ⬆️
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines 860 to 868
Merges several datasets using the "simple" algorithm:
- items are matched by (id, subset) pairs
- matching items share the media info available:

- nothing + nothing = nothing
- nothing + something = something
- something A + something B = conflict
- annotations are matched by value and shared
- in case of conflicts, throws an error
Copy link
Contributor

Choose a reason for hiding this comment

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

Descriptions are not updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I simply updated the description. Do we need to add more comments here?
For instance, "when categories information between subsets, e.g., train and validation, are different, we need to set the merging policy as union. Please refer to the MVTec anomaly dataset."
If so, how about IntersectMerge case?

Copy link
Contributor

@vinnamkim vinnamkim Feb 13, 2023

Choose a reason for hiding this comment

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

I don't know much about it except IntersectMerge do more than this to merge annotations. So let's leave it as it is for now. It would be good to enhance those descriptions afterwards. I think that it can be done with a future work we found for refactoring merger codes to resolve their circular dependency problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree, let me prepare the next PR.

@wonjuleee wonjuleee requested a review from vinnamkim February 13, 2023 07:01
Copy link
Contributor

@vinnamkim vinnamkim left a comment

Choose a reason for hiding this comment

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

LGTM.

@wonjuleee wonjuleee merged commit 6812481 into open-edge-platform:develop Feb 13, 2023
@vinnamkim vinnamkim added this to the 1.0.0 milestone Feb 17, 2023
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.

3 participants