kkirchheim / pytorch-ood

👽 Out-of-Distribution Detection with PyTorch
https://pytorch-ood.readthedocs.io/
Apache License 2.0
259 stars 24 forks source link

feat: added Distance2Cluster detector. This detector is to be used wi… #60

Closed YacineBelHadj closed 4 months ago

YacineBelHadj commented 4 months ago

Description: This pull request introduces a new detector (Angle-Based Detector).

Motivation: Angular loss functions, such as Additive Angular Margin Loss (ArcFace), have demonstrated significant improvements in discriminative power for tasks like face recognition by optimizing angular margins between classes. Applying similar principles to OOD detection could improve the model's ability to distinguish between in-distribution and out-of-distribution samples. An Angle-Based Detector utilizes angular distances between feature representations and class centers to identify OOD samples, potentially providing a more robust method for OOD detection.