Skip to content

Pytorch code for ECCVW 2022 paper "Consistency-based Self-supervised Learning for Temporal Anomaly Localization"

License

Notifications You must be signed in to change notification settings

aimagelab/CSL-TAL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Consistency-based Self-Supervised Learning for Temporal Anomaly Localization

PWC

This repository contains Pytorch code for the WCPA ECCV22 paper "Consistency-based Self-Supervised Learning for Temporal Anomaly Localization" [arXiv]

@inproceedings{panariello2022consistency,
    title = {Consistency-based Self-supervised Learning for Temporal Anomaly Localization},
    author = {Panariello, Aniello and Porrello, Angelo and Calderara, Simone and Cucchiara, Rita},
    booktitle = {Proceedings of the European Conference on Computer Vision (ECCV) Workshops},
    month = {October},
    year = {2022},
}

Installation Note

Tested with Python 3.8.13 on Ubuntu (22.04).

  • Setup an empty pip environment
  • Install packages using pip install -r requirements.txt
  • Place dataset in ./data/ Download Link
  • Run main.py

Please note that if you're running the code from Pycharm (or another IDE) you may need to manually set the working path to PROJECT_PATH

Run python main.py to train the model.

Improvements over the original paper

  • Removed smoothness loss as it was in conflict with the alignment loss. This leads to better and more stable results.
  • Add support for gated attention [1] leading to a +3% improvement in AP frame-level.

To replicate the results of the paper, run:

python main.py --batch-size 8 --alpha 2e-8 --gamma 0.5 --no-gated-attention

References

[1] Ilse, Maximilian and Tomczak, Jakub and Welling, Max. Attention-based deep multiple instance learning. International conference on machine learning. PMLR, 2018.

About

Pytorch code for ECCVW 2022 paper "Consistency-based Self-supervised Learning for Temporal Anomaly Localization"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages