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)
- ์ ์ ์ ํ: ๊ฒฉ์ ํจํด์ ์ ๋ฐํ๊ฒ ๋ณต์ํ์ฌ ์ด์ ์ ์(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์ฐธ์กฐ
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support
