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

Add Corrector transformation #1006

Merged
merged 12 commits into from
May 22, 2023
Merged

Conversation

wonjuleee
Copy link
Contributor

@wonjuleee wonjuleee commented May 19, 2023

Summary

<style> </style>
anomaly type info task type target method
MissingLabelCategories Metadata (ex. LabelCategories) should be defined common error cat add
MissingAnnotation No annotation found for an Item common warning item remove
MissingAttribute An attribute key is missing for an Item common warning item add
UndefinedLabel A label not defined in the metadata is found for an item common error cat - label add
UndefinedAttribute An attribute not defined in the metadata is found for an item common error cat - attr add
MultiLabelAnnotations Item needs a single label classification error item remove
NegativeLength The width or height of bounding box is negative detection error ann remove
InvalidValue There’s invalid (ex. inf, nan) value for bounding box info. detection error ann remove
FarFromLabelMean An annotation has an too small or large value than average for a label detection, segmentation warning ann remove
FarFromAttrMean An annotation has an too small or large value than average for an attribute detection, segmentation warning ann remove
LabelDefinedButNotFound A label is defined, but not found actually common warning    
AttributeDefinedButNotFound An attribute is defined, but not found actually common warning    
OnlyOneLabel The dataset consists of only label common info    
OnlyOneAttributeValue The dataset consists of only attribute value common info    
FewSamplesInLabel The number of samples in a label might be too low common info    
FewSamplesInAttribute The number of samples in an attribute might be too low common info    
ImbalancedLabels There is an imbalance in the label distribution common info    
ImbalancedAttribute There is an imbalance in the attribute distribution common info    
ImbalancedDistInLabel Values (ex. bbox width) are not evenly distributed for a label detection, segmentation info    
ImbalancedDistInAttribute Values (ex. bbox width) are not evenly distributed for an attribute detection, segmentation info    

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added the description of my changes into CHANGELOG.​
  • I have updated the documentation accordingly

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) 2023 Intel Corporation
#
# SPDX-License-Identifier: MIT

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2023

Codecov Report

Patch coverage: 70.66% and project coverage change: +0.09 🎉

Comparison is base (1c15093) 78.53% compared to head (d4780fc) 78.63%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1006      +/-   ##
===========================================
+ Coverage    78.53%   78.63%   +0.09%     
===========================================
  Files          233      233              
  Lines        26770    26855      +85     
  Branches      5325     5357      +32     
===========================================
+ Hits         21025    21118      +93     
+ Misses        4496     4493       -3     
+ Partials      1249     1244       -5     
Flag Coverage Δ
macos-11_Python-3.8 77.64% <70.66%> (+0.10%) ⬆️
ubuntu-20.04_Python-3.8 78.61% <70.66%> (+0.09%) ⬆️
windows-2019_Python-3.8 78.52% <70.66%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
datumaro/plugins/transforms.py 75.28% <69.86%> (-0.86%) ⬇️
datumaro/components/validator.py 100.00% <100.00%> (ø)
datumaro/plugins/validators.py 94.82% <100.00%> (+4.65%) ⬆️

... and 1 file with indirect coverage changes

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

@wonjuleee wonjuleee requested a review from cih9088 May 19, 2023 06:58
tests/unit/algorithms/test_corrector.py Outdated Show resolved Hide resolved
tests/unit/algorithms/test_corrector.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
datumaro/plugins/transforms.py Outdated Show resolved Hide resolved
vinnamkim
vinnamkim previously approved these changes May 22, 2023
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.

@vinnamkim vinnamkim added the FEATURE New feature & functionality label May 22, 2023
@vinnamkim vinnamkim added this to the 1.3.0 milestone May 22, 2023
class Correct(Transform, CliPlugin):
"""
Correct the dataset from a validation report.
A user can should feed into validation_reports.json from validator to correct the dataset.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A user can should feed into validation_reports.json from validator to correct the dataset.
A user should feed `validation_reports.json` from validator to correct the dataset.

@wonjuleee wonjuleee merged commit e1d4314 into openvinotoolkit:develop May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEATURE New feature & functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants