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

AI-VAD bbox post-processing #1103

Merged
merged 10 commits into from
Jun 5, 2023

Conversation

djdameln
Copy link
Contributor

@djdameln djdameln commented May 24, 2023

Description

  • This PR adds bounding box post-processing operations to the AI-VAD implementation. These operations were not mentioned in the paper, but were included in the original implementation.
  • The post-processing operations consist of:
    • filtering by class label (some datasets benefit from only including person-regions)
    • filtering by bbox surface area
    • Removing overlapping bounding boxes
    • Adding regions that are undetected by the mask rcnn region extractor, but deemed to belong to the foreground by comparing pixel movement between consecutive video frames.
  • Several configurable parameters were added to control the behaviour of the bbox post-processing
  • All combined, these changes increase the image AUROC on ped2 dataset from 0.917 to 0.960

Changes

  • 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)
  • This change requires a documentation update

Checklist

  • My code follows the pre-commit style and check guidelines of this project.
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • I have added a summary of my changes to the CHANGELOG (not for minor changes, docs and tests).

@djdameln djdameln requested a review from ashwinvaidya17 May 24, 2023 13:46
@djdameln djdameln requested a review from samet-akcay as a code owner May 24, 2023 13:46
@github-actions github-actions bot added the Docs label May 24, 2023
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.

Thanks, only a single comment.

src/anomalib/models/ai_vad/regions.py Show resolved Hide resolved
@samet-akcay samet-akcay self-requested a review May 24, 2023 15:29
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! I have a few minor comments

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -37,6 +37,12 @@ class AiVad(AnomalyModule):
def __init__(
self,
box_score_thresh: float = 0.8,
persons_only: bool = False,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the docstring needs to be updated

src/anomalib/models/ai_vad/regions.py Outdated Show resolved Hide resolved
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

@samet-akcay samet-akcay merged commit 52bbb0b into openvinotoolkit:main Jun 5, 2023
NagatoYuki0943 added a commit to NagatoYuki0943/anomalib that referenced this pull request Jun 7, 2023
@samet-akcay samet-akcay mentioned this pull request Jun 15, 2023
@djdameln djdameln deleted the ai-vad-bbox-improvements branch December 4, 2024 08:46
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