IntelLabs / MART

Modular Adversarial Robustness Toolkit
BSD 3-Clause "New" or "Revised" License
16 stars 0 forks source link

Semantic Robustness #259

Closed dxoigmn closed 1 month ago

dxoigmn commented 1 month ago

What does this PR do?

This PR implements a semantic robustness callback for anomalib as described in https://arxiv.org/abs/2405.07969. We make one critical design choice different from the paper: we supply the model with an augmented image and mask for computing metrics. Additionally, anomalib does not implement patching, so all images are square by default. We believe these changes shouldn't significantly alter results since 1) rotating masks is fine so long as we impute pixel mask values as "non-anomalous" or 0 valued.

Type of change

Please check all relevant options.

Testing

Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.

Before submitting

Did you have fun?

Make sure you had fun coding 🙃

dxoigmn commented 1 month ago

@mzweilin @mariusarvinte: This is ready for review.

dxoigmn commented 1 month ago

@mzweilin: Would be nice to get this merged. Really need help on how to package this.

dxoigmn commented 1 month ago

LGTM! Thanks for the README updates!