Choubo / DRA

Official PyTorch implementation of the paper “Catching Both Gray and Black Swans: Open-set Supervised Anomaly Detection”, open-set anomaly detection, few-shot anomaly detection.
GNU Affero General Public License v3.0
72 stars 11 forks source link

How to understand the CutMix in this implementation #5

Open PotatoLzy opened 1 year ago

PotatoLzy commented 1 year ago

Hello, I'm curious about how to understand your CutMix implementation. I only see this formular:

1

But when I try to understand the code, I think the latter part of this formula is not used. Can anyone help me solve this problem? Thx.

Atotem commented 1 year ago

https://github.com/Choubo/DRA/blob/3fb0e9cce9bee3c23072caa30c889b905c4830ed/datasets/mvtecad.py#L134

The implementation is in DRA/datasets/cutmix.py

Choubo commented 1 year ago

Hi, @PotatoLzy

Thanks for your question. The formula and codes are different versions. The second half of the formula was indeed abandoned, and in the final implementation version, we directly pasted the patch on the complete image x_n.

Cheers, Choubo