An multi objective anomaly detection project using deep learning and PyTorch, designed to identify structural and counting anomalies in images.
- Python >= 3.6
- PyTorch == 2.4.1+cu121
- Torchvision == 0.19.1+cu121
- CUDA 12.1 (for GPU support)
-
Clone the repository:
git clone https://github.com/hafizarslanamjad/mo-anomaly-detection.git cd mo-anomaly-detection -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate -
Install dependencies:
please see setup.py file
-
Install PyTorch with CUDA support (if required):
pip install torch==2.4.1+cu121 torchvision==0.19.1+cu121 --extra-index-url https://download.pytorch.org/whl/cu121
To train the anomaly detection model, run:
python train.py --config configs/train_config.yamlTo evaluate the model on the test set:
python test.py --config configs/test_config.yamlFile will be provided soon
To perform anomaly detection on new images:
python inference.py --input /path/to/imageFile will be provided soon
Note: Adjust paths as needed, and make sure the images follow the directory structure specified in the configuration files.
mo-anomaly-detection/
├── checkpoints/ # Model checkpoints
├── dataset/ # Training/testing data
├── models/ # Model architectures
├── utils/ # Helper functions
├── venv/ # Virtual environment (not included in Git)
├── train.py # Training script
├── test.py # Testing script
├── inference.py # Inference script
├── configs/ # Configuration files
└── README.md # Project documentation
Checkpoints and Dataset will be made available soon!
- Convolutional Autoencoder with Attention Mechanisms
- Custom dataset processing for anomaly detection
- Configurable training, testing, and inference pipelines
The model achieves __ __ in unsupervised multi objective anomaly detection. Below are sample results:
- MEASURE 1: TO BE POSTED
- MEASURE 2: TO BE POSTED
Contributions are welcome! Please open an issue or submit a pull request with improvements or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.
