PyTorch implementation of MULDE, a density-based anomaly detection framework trained using score matching techniques. This method is detailed in the paper:
Micorek, Jakub, et al. "MULDE: Multiscale Log-Density Estimation via Denoising Score Matching for Video Anomaly Detection." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2024. Read the Paper.
Origional Implementation by author can be found here
Following dataset have been used to train and Test the model
MULDE (Multiscale Log-Density Estimation) utilizes denoising score matching to perform effective anomaly detection in video data. By estimating the log-density across multiple scales, MULDE can identify anomalous events with high precision. This repository provides a PyTorch implementation of the MULDE framework, enabling researchers and practitioners to train and evaluate the model on various datasets.
It is recommended to use a Conda environment to manage dependencies efficiently.
-
Clone the Repository:
git clone https://github.com/divyanshm21/MULDE--Video-Anomaly-detection.git cd mulde
-
Create and Activate the Conda Environment:
conda env create -f environment.yml conda activate mulde
Note: Ensure that Conda is installed on your system. If not, download and install it from the official website. Miniconda will also work for Linux Users
To execute the training and evaluation pipeline along with visualizations of densities and the dataset, use the following command:
python main.py --plot_dataset --gmm
To visualize the training process and anomaly detection results, utilize TensorBoard:
tensorboard --logdir=runs/MULDE --samples_per_plugin images=100
Scalars Tab:
View anomaly scores for each individual scale under roc_auc_individual -> Micro.
Aggregate metrics such as max, median, mean, and the negative log-likelihood scores of the GMM are available under roc_auc_aggregate->Macro.
The roc_auc_best section highlights the best-performing individual scales or aggregates