Giter Site home page Giter Site logo

ahl's Introduction

AHL

Official implementation of "Anomaly Heterogeneity Learning for Open-set Supervised Anomaly Detection".(accepted by CVPR 2024)

Setup

  • numpy >= 1.22.3
  • python >= 3.10.4
  • pytorch >= 1.12.1
  • torch >= 1.12.1
  • torchvision >= 0.13.1
  • tqdm >= 4.64.0
  • scipy >= 1.10.1
  • scikit-image >= 0.19.2
  • einops >= 0.6.0

Run

Step 1. Setup the Anomaly Detection dataset

Download the Anomaly Detection Dataset and convert it to MVTec AD format. (For datasets we used in the paper, we provided the convert script.) The dataset folder structure should look like:

DATA_PATH/
    subset_1/
        train/
            good/
        test/
            good/
            defect_class_1/
            defect_class_2/
            defect_class_3/
            ...
    ...

Step 2. Running the base model (DRA, DevNet) and save model weights.

Step 3. Save augmentation features and multi-scale features extracted from base model's feature extractor. The dataset folder structure of saved features should look like:

DATA_PATH/
    subset_1/
        feature/
            train/
            test/
        feature_scale/
            train/
            test/
        aug_dream/
            train/
        aug_dream_scale/
            train/
        aug_mix/
            train/
        aug_mix_scale/
            train/
        aug_paste/
            train/
        aug_paste_scale/
            train/
    ...

Step 4. Running AHL

python main.py --dataset_root $path-to-dataset --classname $subset-name --feat_classname $subset-name-for-saved-features --experiment_dir $path-to-save-model-weights

Citation

@inproceedings{zhu2024anomaly,
  title={Anomaly Heterogeneity Learning for Open-set Supervised Anomaly Detection},
  author={Zhu, Jiawen and Ding, Choubo and Tian, Yu and Pang, Guansong},
  booktitle={Proceedings of the IEEE/CVF conference on computer vision and pattern recognition},
  year={2024}
}

ahl's People

Contributors

diana1026 avatar guansongpang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.