Home

Awesome

WinCLIP

This is an unofficial implementation of WinCLIP in AnomalyCLIP

The implementation of CLIP is based on open_clip

Updates

Performance evaluation

Few-shot

MVTec AD (1-shot)

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
carpet99.166.169.495.910099.4100
bottle94.360.964.985.199.498.499.8
hazelnut98.558.961.193.49895.699
leather99.245.439.397.810099.5100
cable86.928.722.86589.286.393.4
capsule96.432.324.789.783.592.496.3
grid94.128.719.182.199.699.199.9
pill92.436.128.789.889.693.398
transistor9041.241.167.589.680.985.7
metal_nut78.536.528.775.398.297.499.6
screw95.923.514.484.581.586.893.1
toothbrush9633.626.382.891.490.696.6
zipper9746.540.890.586.490.395.8
tile91.753.546.277.510099.4100
wood94.556.459.484.59996.899.7
mean93.643.239.184.193.793.797.1

MVTec AD (2-shot)

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
carpet9964.568.295.699.898.999.9
bottle94.862.466.385.999.698.499.9
hazelnut98.761.663.993.697.995.798.9
leather99.245.23997.999.999.5100
cable88.831.525.372.59189.594
capsule95.623.111.986.86692.688.1
grid94.830.320.783.999.499.199.8
pill92.839.532.990.492.995.398.6
transistor89.84140.466.789.579.285.6
metal_nut76.735.226.873.898.598.499.7
screw96.725.61887.582.986.993.5
toothbrush96.436.629.98293.392.197.6
zipper97.25043.991.195.294.898.7
tile9253.946.47899.999.4100
wood94.556.258.58699.598.399.8
mean93.843.839.584.893.794.596.9

MVTec AD (4-shot)

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
carpet9965.168.995.599.999.4100
bottle94.462.165.785.299.497.699.8
hazelnut98.560.762.592.897.69598.8
leather99.345.439.397.8100100100
cable8931.725.871.489.688.492.9
capsule97.235.727.991.186.59496.9
grid95.130228499.798.299.9
pill9340.934.490.992.494.198.5
transistor89.440.639.265.590.480.487.3
metal_nut80.23831.17899.398.499.8
screw962215.18581.489.191.6
toothbrush98.255.150.888.698.196.799.3
zipper97.451.346.291.295.594.898.8
tile91.753.145.377.710099.4100
wood94.556.659.386.699.397.599.8
mean94.245.942.285.495.394.997.6

MVTec AD (8-shot)

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
carpet98.964.868.594.799.899.499.9
bottle94.861.965.985.399.598.499.8
hazelnut98.862.364.393.898.496.499.1
leather99.244.838.297.4100100100
cable89.732.926.873.991.489.894
capsule96.934.62790.685.593.696.6
grid95.63123.685.999.699.199.9
pill93.442.435.991.493.394.498.7
transistor90.842.641.668.691.181.486.8
metal_nut79.937.930.677.999.298.999.8
screw96.817.912.48680.488.891.1
toothbrush98.355.451.889.498.996.799.6
zipper97.451.245.591.697.69699.4
tile91.6534576.610099.4100
wood94.856.159.287.399.698.499.9
mean94.545.942.48695.695.497.6

VisA (1-shot)

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
candle94.816.8890.596.49196.9
capsules95.932.322.465.480.280.287.8
cashew96.632.322.290.395.491.897.9
chewinggum995754.685.997.794.899
fryum94.432.4268687.786.694.4
macaroni191.513478.985.678.887.7
macaroni291.640.972.175.472.474.6
pcb19616.17.376.885.683.784.5
pcb291.56.62.966.459.667.957
pcb392.913.47.677.668.971.268.9
pcb495.322.415.982.485.57985.6
pipe_fryum96.42818.994.18885.694.2
mean94.722.915.980.583.881.985.7

VisA (2-shot)

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
candle95.518.28.791.29690.996.7
capsules95.831.822.565.482.48389.8
cashew96.934.22489.193.489.497
chewinggum9957.45686.598.295.999.2
fryum9535.527.986.184.784.892.7
macaroni193.813.44.583.88881.589.6
macaroni291.43.70.870.273.372.673.4
pcb196.2178.177.785.483.783.6
pcb292.17.13.265.95869.257.7
pcb393.819.210.380.77270.370.5
pcb495.921.914.184.179.380.770.1
pipe_fryum96.22818.793.989.787.995
mean95.123.916.681.283.482.584.6

VisA (4-shot)

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
candle95.819.29.391.296.790.797.2
capsules96.132.223.166.682.281.789.3
cashew96.732.422.289.493.489.397
chewinggum9957.255.585.99896.599.2
fryum94.934.327.887.587.186.693.8
macaroni193.914.24.883.689.182.990.7
macaroni2904.8168.97673.276.1
pcb196.216.9877.186.884.284.2
pcb291.79.84.565.459.668.859.4
pcb394.623.313.281.169.970.768.7
pcb496.730.823.486.180.776.679.5
pipe_fryum96.328.119.194.489.887.195
mean95.225.317.781.484.182.485.8

VisA (8-shot)

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
candle95.919.29.491.196.991.597.3
capsules96.232.223.266.982.68389.3
cashew96.934.224.489.595.692.298
chewinggum9956.754.585.897.99699.1
fryum9535.42888.289.786.795.3
macaroni193.913.74.782.989.68290.8
macaroni2893.80.668.376.773.576.1
pcb196.2178.376.887.484.785.4
pcb292.510.84.96663.770.161
pcb395.223.914.781.776.174.874
pcb497.233.525.88884.681.883.1
pipe_fryum96.529.319.794.391.289.395.7
mean95.325.818.281.68683.887.1

Zero-shot

MVTec AD

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
carpet90.933.92666.399.397.899.8
bottle85.749.449.869.998.697.699.5
hazelnut95.739.133.381.392.388.696
leather95.530.820.586100100100
cable61.312.26.239.48584.889.8
capsule8714.38.663.868.793.590.5
grid79.413.75.749.399.298.299.7
pill72.711.8766.981.591.696.4
transistor83.72720.245.589.18084.9
metal_nut49.323.810.839.796.295.399.1
screw91.111.35.470.271.785.987.7
toothbrush86.210.55.567.985.388.994.5
zipper91.727.819.47291.293.497.5
tile79.130.821.254.599.999.4100
wood85.135.432.956.397.695.299.3
mean82.324.818.261.990.492.795.6

VisA

objectsauroc_pxf1_pxap_pxauproauroc_spf1_spap_sp
candle878.92.377.794.990.695.4
capsules804.21.439.479.480.587.9
cashew84.89.64.878.491.288.996
chewinggum95.431.52469.695.593.898.2
fryum87.716.211.174.473.68086.9
macaroni150.30.1024.77974.280
macaroni244.70.10867.168.865.1
pcb138.70.90.420.772.170.273
pcb258.71.50.420.64767.146.1
pcb3762.10.743.763.967.663
pcb491.424.615.574.574.275.770.1
pipe_fryum83.68.34.480.367.880.382.1
mean73.295.45175.578.278.7

Quick start

Zero-shot anomaly detection

bash zero_shot.sh

Few-shot anomaly detection

bash few_shot.sh

BibTex Citation

If you find this paper and repository useful, please cite our paper.

@article{zhou2024anomalyclip,
  title={AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detection},
  author={Zhou, Qihang and Pang, Guansong and Tian, Yu and He, Shibo and Chen, Jiming},
  journal={The Twelfth International Conference on Learning Representations},
  year={2024}
}