Skip to content

SCOPUS research paper's codes - Anomaly Detection Control through Zero-Shot Learning in Defect Inspection Systems

Notifications You must be signed in to change notification settings

janggun-jeon/DSVDD-CPM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSVDD-CPM

Anomaly Detection Control through One-clss Learning in Defect Inspection Systems (paper under review)

https://doi.org/10.5302/J.ICROS.2025.24.0280

Journal of Institute of Control, Robotics and Systems (2025) 31(4):328-333
ISSN:1976-5622
eISSN:2233-4335

Usage

Datasets

Our research currently has completed AD experiments on the MNIST (yann.lecun), CIFAR-10 (cs.toronto) and MVTec-AD (mvtec, kaggle) datasets.

MVTec-AD example by shell script

Run shell script (log file output: ~/DSVDD-CPM/log)

sh mecro.sh mvtecad

or default setting (MVTec-AD)

sh mecro.sh

or with options

(dataset | decay coef | linear decay | pretrain | class)

sh mecro.sh mvtecad 0.9 True True 0

MVTec-AD example by python execution

Run python execution (ternimal window output)

python ./src/main.py mvtecad mvtecad_LeNet_ELU ./log/mvtecad_test ./data

or with options

(dataset_name | net_name | xp_path | data_path | seed | device | optimizer_name | lr | n_epochs | lr_milestone | batch_size | weight_decay | decay_coef | linear_decay | pretrain | ae_lr | ae_n_epochs | ae_lr_milestone | ae_batch_size | ae_weight_decay | normal_class | n_jobs_dataloader)

python ./src/main.py mvtecad mvtecad_LeNet_ELU ./log/mvtecad_test ./data --seed 1758683904 --device cuda --optimizer_name adam --lr 0.01 --n_epochs 60 --lr_milestone 20 --lr_milestone 50 --batch_size 32 --weight_decay 0.5e-6 --decay_coef 0.9 --linear_decay True --pretrain True --ae_lr 0.01 --ae_n_epochs 75 --ae_lr_milestone 60 --ae_batch_size 32 --ae_weight_decay 0.5e-3 --normal_class 0 --n_jobs_dataloader 0

Run python execution (log file output: ~/DSVDD-CPM/log)

nohup python ./src/main.py mvtecad mvtecad_LeNet_ELU ./log/mvtecad_test ./data --normal_class 0 --decay_coef 0.9 --linear_decay True ./log/mvtecad_test/0/decay_coef=0.9-linear_decay=True.out 2>&1 &

MVTec-AD experiment

table

CIFAR-10 example by shell script

Run shell script (log file output: ~/DSVDD-CPM/log)

sh mecro.sh cifar10

or with options

(dataset | decay coef | linear decay | pretrain | class)

sh mecro.sh cifar10 0.9 True True 0

CIFAR-10 example by python execution

Run python execution (ternimal window output)

python ./src/main.py cifar10 cifar10_LeNet_ELU ./log/cifar10_test ./data

or with options

(dataset_name | net_name | xp_path | data_path | seed | device | optimizer_name | lr | n_epochs | lr_milestone | batch_size | weight_decay | decay_coef | linear_decay | pretrain | ae_lr | ae_n_epochs | ae_lr_milestone | ae_batch_size | ae_weight_decay | normal_class | n_jobs_dataloader)

python ./src/main.py cifar10 cifar10_LeNet_ELU ./log/cifar10_test ./data --seed 1170014347 --device cuda --optimizer_name adam --lr 0.0001 --n_epochs 150 --lr_milestone 120 --batch_size 256 --weight_decay 0.5e-6 --decay_coef 0.9 --linear_decay True --pretrain True --ae_lr 0.0001 --ae_n_epochs 350 --ae_lr_milestone 280 --ae_batch_size 256 --ae_weight_decay 0.5e-6 --normal_class 0 --n_jobs_dataloader 0

Run python execution (log file output: ~/DSVDD-CPM/log)

nohup python ./src/main.py cifar10 cifar10_LeNet_ELU ./log/cifar10_test ./data --normal_class 0 --decay_coef 0.9 --linear_decay True ./log/cifar10_test/0/decay_coef=0.9-linear_decay=True.out 2>&1 &

CIFAR-10 experiment

cifar

MNIST example by shell script

Run shell script (log file output: ~/DSVDD-CPM/log)

sh mecro.sh mnist

or with options

sh mecro.sh mnist 0.9 True True 0

MNIST example by python execution

Run python execution (ternimal window output)

python ./src/main.py mnist mnist_LeNet ./log/mnist_test ./data --lr 0.0001 --n_epochs 150 --lr_milestone 120 --batch_size 256 --weight_decay 0.5e-6 --decay_coef 0.9 --linear_decay True --pretrain True --ae_lr 0.0001 --ae_n_epochs 150 --ae_lr_milestone 120 --ae_batch_size 256 --ae_weight_decay 0.5e-3 --normal_class 0

Run python execution (log file output: ~/DSVDD-CPM/log)

nohup python ./src/main.py mnist mnist_LeNet ./log/mnist_test ./data --normal_class 0 --decay_coef 0.9 --linear_decay True ./log/mnist_test/0/decay_coef=0.9-linear_decay=True.out 2>&1 &

Reference

If you find this repo helpful to your research, please cite our paper.

@article{,
  title={Anomaly Detection Control through One-class Learning in Defect Inspection Systems},
  author={Janggun Jeon, Namgi Kim},
  journal={Journal of Institute of Control, Robotics and Systems},
  year={2025}
}

About

SCOPUS research paper's codes - Anomaly Detection Control through Zero-Shot Learning in Defect Inspection Systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published