Industrial Vision Defect Anomaly Detection with Line-Scan LSTM Autoencoder

MVTec AD Grid ๋ฐ์ดํ„ฐ์…‹์„ ํ™œ์šฉํ•œ ์‚ฐ์—…์šฉ ๋น„์ „ ํ‘œ๋ฉด ๊ฒฐํ•จ ์ด์ƒํƒ์ง€(Anomaly Detection) PyTorch ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค.

๋ฐ˜๋„์ฒด ์›จ์ดํผ, ๋””์Šคํ”Œ๋ ˆ์ด, ๋กคํˆฌ๋กค ์ง๋ฌผ ๋ฐ ๊ธˆ์† ํ‘œ๋ฉด ๊ฒ€์‚ฌ์—์„œ ๋„๋ฆฌ ์“ฐ์ด๋Š” ๋ผ์ธ์Šค์บ”(Line-Scan) ๋ฐฉ์‹์„ ๋ชจ์‚ฌํ•˜์—ฌ 2D ์ด๋ฏธ์ง€๋ฅผ ์‹œ๊ณ„์—ด ๋ผ์ธ ์‹œํ€€์Šค๋กœ ๋ณ€ํ™˜ํ•˜๊ณ , ์ •์ƒ(Good) ์ œํ’ˆ์˜ ๊ณต๊ฐ„-์‹œ๊ฐ„ ์ „์ด ํŒจํ„ด๋งŒ์„ ๋น„์ง€๋„ ํ•™์Šต(One-Class Unsupervised Learning)ํ•˜์—ฌ ๋ถˆ๋Ÿ‰ํ’ˆ์„ ์ •๋ฐ€ํ•˜๊ฒŒ ํƒ์ง€ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ“Š ๋ชจ๋ธ ์„ฑ๋Šฅ ์ง€ํ‘œ (Evaluation Results)

Metric Score Note
ROC-AUC 99.00% ์ •์ƒ/๋ถˆ๋Ÿ‰ ๋ถ„๋ฅ˜ ๋ถ„๋ณ„๋ ฅ
Precision (์ •๋ฐ€๋„) 100.00% ๋ถˆ๋Ÿ‰ ํŒ์ • ์‹œ ์‹ค์ œ ๋ถˆ๋Ÿ‰ ๋น„์œจ
Recall (์žฌํ˜„์œจ) 90.00% ์‹ค์ œ ๋ถˆ๋Ÿ‰ํ’ˆ ๊ฒ€์ถœ์œจ
F1-Score 94.74% ์ข…ํ•ฉ ์„ฑ๋Šฅ ์ง€ํ‘œ
Normal Mean Score 0.012851 ์ •์ƒ ์ œํ’ˆ ๋ณต์› ์˜ค์ฐจ
Defect Mean Score 0.022506 ๋ถˆ๋Ÿ‰ ์ œํ’ˆ ๋ณต์› ์˜ค์ฐจ (์•ฝ 2๋ฐฐ ์ƒ์Šน)
Optimal Threshold 0.019805 ์ด์ƒ ํŒ์ • ๊ธฐ์ค€ ์ž„๊ณ„๊ฐ’

๐Ÿ“ˆ ์ด์ƒํƒ์ง€ ๋ฐ ๊ฒฐํ•จ ์œ„์น˜ ๊ฒ€์ถœ (Localization Heatmap)

Vision Anomaly Detection Results

  • ์ •์ƒ ์ œํ’ˆ: ๊ฒฉ์ž ํŒจํ„ด์„ ์ •๋ฐ€ํ•˜๊ฒŒ ๋ณต์›ํ•˜์—ฌ ์ด์ƒ ์ ์ˆ˜(Anomaly Score)๊ฐ€ ๋งค์šฐ ๋‚ฎ์Œ
  • ๋ถˆ๋Ÿ‰ ์ œํ’ˆ (๋‹จ์„ , ์ด๋ฌผ์งˆ, ํœจ, ๊ตฌ๋ฉ ๋“ฑ): ๋น„์ •์ƒ ๋ถ€์œ„ ๋ณต์› ์‹คํŒจ๋กœ ์ด์ƒ ์ ์ˆ˜๊ฐ€ ์น˜์†Ÿ์œผ๋ฉฐ, ์šฐ์ธก ํ•˜๋‹จ ํžˆํŠธ๋งต์—์„œ ๊ฒฐํ•จ ์œ„์น˜๊ฐ€ ๋ช…ํ™•ํ•˜๊ฒŒ ๊ฐ•์กฐ๋จ

๐Ÿ—๏ธ ๋ชจ๋ธ ์•„ํ‚คํ…์ฒ˜ (Line-Scan LSTM Autoencoder)

LineScanLSTMAutoencoder(
  (encoder): LSTM(input_dim=64, hidden_dim=128, num_layers=2, batch_first=True, dropout=0.1)
  (encoder_fc): Linear(in_features=128, out_features=64, bias=True)
  (decoder_fc): Linear(in_features=64, out_features=128, bias=True)
  (decoder): LSTM(input_dim=128, hidden_dim=128, num_layers=2, batch_first=True, dropout=0.1)
  (output_fc): Linear(in_features=128, out_features=64, bias=True)
)

๐Ÿ› ๏ธ ํ•™์Šต ๋ฐ ํ…Œ์ŠคํŠธ

  • ํ•™์Šต ๋ฐ์ดํ„ฐ: MVTec AD Grid Normal 30์žฅ (One-Class ํ•™์Šต)
  • ํ…Œ์ŠคํŠธ ๋ฐ์ดํ„ฐ: Normal 10์žฅ vs Defect 10์žฅ (Broken wire, Contamination, Bent wire, Hole)
  • ์†Œ์Šค ์ฝ”๋“œ: train_vision_anomaly.py ์ฐธ์กฐ
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support