Skip to content

YisenLiu-Intelligent-Sensing/SSAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Self-Supervised Anomaly Detector of Fruits based on Hyperspectral Imaging ——— A Pytorch Implementation

Requirements

  • python==3.x
  • torch==1.2.0
  • numpy==1.19.5
  • scikit-learn==0.20.2
  • scikit-image==0.17.2

How to run

  • You can now train the SSAD using default parameters using python3 train.py
  • In order to get results. you can run the following command python3 test.py

Anomaly detection results of the blueberry data set

you can check result: result.csv

Methods AUC F1 Score Acc_normal Acc_bruised Acc_infected Acc_chilling Acc_wrinkled
OCSVM 0.744±0.005 0.710±0.005 0.622±0.007 0.789±0.010 0.582±0.013 0.900±0.006 0.614±0.013
AE-1D 0.818±0.028 0.779±0.025 0.712±0.033 0.838±0.044 0.769±0.057 0.743±0.035 0.772±0.027
VAE-1D 0.794±0.008 0.754±0.009 0.678±0.011 0.910±0.014 0.630±0.020 0.823±0.005 0.691±0.013
AE-2D 0.655±0.016 0.643±0.011 0.534±0.015 0.699±0.037 0.991±0.002 0.602±0.031 0.249±0.023
VAE-2D 0.803±0.005 0.768±0.003 0.697±0.004 0.864±0.006 0.963±0.003 0.420±0.006 0.774±0.007
SSAD 0.932±0.015 0.875±0.012 0.837±0.016 0.944±0.018 0.909±0.037 0.838±0.021 0.810±0.027

Anomaly detection results of the strawberry data set

Methods AUC F1 Score Acc_normal Acc_bruised Acc_infected Acc_chilling Acc_contaminated
OCSVM 0.773±0.009 0.758±0.007 0.643±0.009 0.788±0.020 0.594±0.015 0.904±0.005 0.776±0.003
AE-1D 0.748±0.005 0.727±0.005 0.597±0.007 0.684±0.007 0.552±0.009 0.995±0.001 0.902±0.005
VAE-1D 0.829±0.004 0.784±0.005 0.681±0.008 0.742±0.012 0.496±0.016 0.753±0.018 0.869±0.015
AE-2D 0.690±0.024 0.690±0.017 0.543±0.026 0.460±0.051 0.764±0.013 0.949±0.025 0.866±0.021
VAE-2D 0.659±0.021 0.704±0.014 0.542±0.022 0.475±0.014 0.767±0.021 0.914±0.003 0.717±0.015
SSAD 0.913±0.006 0.869±0.005 0.807±0.007 0.835±0.031 0.834±0.025 0.876±0.022 0.945±0.018

License

MIT © Yisen Liu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages