https://github.com/jahongir7174/simplenet
SimpleNet: A Simple Network for Image Anomaly Detection and Localization
https://github.com/jahongir7174/simplenet
anomaly-detection damage-detection opencv python pytorch
Last synced: about 2 months ago
JSON representation
SimpleNet: A Simple Network for Image Anomaly Detection and Localization
- Host: GitHub
- URL: https://github.com/jahongir7174/simplenet
- Owner: jahongir7174
- Created: 2023-06-29T22:56:31.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-03T07:37:06.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T12:46:58.510Z (2 months ago)
- Topics: anomaly-detection, damage-detection, opencv, python, pytorch
- Language: Python
- Homepage: https://arxiv.org/abs/2303.15140
- Size: 126 KB
- Stars: 31
- Watchers: 1
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
SimpleNet: A Simple Network for Image Anomaly Detection and Localization
### Note
* The default dataset is `metal_nut` from `MVTec`
### Installation
```
conda create -n PyTorch python=3.8
conda activate PyTorch
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-lts
pip install opencv-python==4.5.5.64
pip install scikit-learn
pip install scipy
pip install tqdm
```### Train
* Configure your dataset path in `main.py` for training
* Download pretrained weights and place it under `weights` folder, see `Pretrained weights`
* Run `python main.py --train` for training### Test
* Configure your dataset path in `main.py` for testing
* Run `python main.py --test` for testing### Results
| Backbone | Epochs | F1 (%) | Accuracy (%) | AUROC (%) | Pretrained weights |
|:--------:|:------:|-------:|-------------:|----------:|------------------------------------------------------------------------------------------:|
| ResNet18 | 150 | 97.4 | 95.7 | 99.1 | [model](https://github.com/jahongir7174/SimpleNet/releases/download/v0.0.1/resnet18.pth) |
| ReNet34 | 150 | 97.4 | 95.7 | 99.3 | [model](https://github.com/jahongir7174/SimpleNet/releases/download/v0.0.1/resnet34.pth) |
| ReNet50 | 150 | 100 | 100 | 100 | [model](https://github.com/jahongir7174/SimpleNet/releases/download/v0.0.1/resnet50.pth) |
| ReNet101 | 150 | - | - | - | [model](https://github.com/jahongir7174/SimpleNet/releases/download/v0.0.1/resnet101.pth) |
| ReNet152 | 150 | - | - | - | [model](https://github.com/jahongir7174/SimpleNet/releases/download/v0.0.1/resnet152.pth) |


#### Reference
* https://github.com/DonaldRR/SimpleNet