EfficientAd: Accurate Visual Anomaly Detection at Millisecond-Level Latencies.
The Pytorch implementation is openvinotoolkit/anomalib.
GTX3080 / Windows10 22H2 / cuda11.8 / cudnn8.9.7 / TensorRT8.5.3 / OpenCV4.6
-
training to generate weight files (
efficientAD_[category].pt)// Please refer to Anomalib's tutorial for details: // https://github.com/openvinotoolkit/anomalib?tab=readme-ov-file#-training -
generate
.wtsfrom pytorch with.ptcd ./datas/models/ // copy your `.pt` file to the current directory. python gen_wts.py // a file `efficientAD_[category].wts` will be generated. -
build and run
mkdir build cd build cmake .. make sudo ./EfficientAD-M -s [.wts] // serialize model to plan file sudo ./EfficientAD-M -d [.engine] [image folder] // deserialize and run inference, the images in [image folder] will be processed
average cost of doInference(in efficientad_detect.cpp) from second time with batch=1 under the windows environment above
| FP32 | |
|---|---|
| EfficientAD-M | 12ms |
