Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
indent_style = space
indent_size = 4

[*.{md,yml,yaml,json,toml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ build/
.venv/
venv/
.env
.coverage
coverage.xml
htmlcov/
.pytest_cache/
.mypy_cache/
.ruff_cache/

# ---------- Jupyter ----------
.ipynb_checkpoints/
Expand Down Expand Up @@ -63,3 +69,9 @@ mvtec*/
*.tif
*.tiff
*.gif

# ---------- Local arrays / serialized experiments ----------
*.npy
*.npz
*.pkl
*.pickle
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ PyTorch implementations of FastFlow and SuperSimpleNet (SSN) for image-level
and pixel-level industrial anomaly detection. The data loader supports MVTec AD,
MVTec-style folders and the original VisA layout.

## Repository layout

| Path | Purpose |
| --- | --- |
| `train.py` | Shared training and final-evaluation command-line entry point |
| `inference.py` | FastFlow inference, metrics and visualizations |
| `ssn_inference.py` | SuperSimpleNet inference, metrics and visualizations |
| `dataset.py` | MVTec, MVTec-style and VisA dataset loading |
| `trainer.py` | FastFlow training and evaluation utilities |
| `ssntrainer.py` | SuperSimpleNet training and evaluation utilities |
| `model/` | Model implementations and public model exports |
| `tests/` | Regression tests for evaluation and model behavior |

## Installation

Use Python 3.10 or newer. Install a PyTorch build compatible with your CUDA
Expand Down Expand Up @@ -102,7 +115,12 @@ MVTec `test/good` or `test/<defect>` path.
## Tests

```bash
python -m pip install -r requirements-dev.txt
python -m pytest -q
python -m compileall -q .
python -m pyflakes .
```

Pytest settings are kept in `pyproject.toml`. Generated checkpoints, datasets,
inference outputs and local experiment files are intentionally excluded from
version control through `.gitignore`.
4 changes: 3 additions & 1 deletion model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from model.fastflow import FastFlowModel
from model.supersimplenet import SuperSimpleNetModel

__all__ = [
"FastFlowModel",
"SuperSimpleNetModel",]
"SuperSimpleNetModel",
]
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.pytest.ini_options]
addopts = "-ra"
testpaths = ["tests"]
87 changes: 0 additions & 87 deletions train_test.ipynb

This file was deleted.

Loading