{"id":18631024,"url":"https://github.com/aimagelab/csl-tal","last_synced_at":"2025-04-11T06:31:22.680Z","repository":{"id":111719315,"uuid":"537434789","full_name":"aimagelab/CSL-TAL","owner":"aimagelab","description":"Pytorch code for ECCVW 2022 paper \"Consistency-based Self-supervised Learning for Temporal Anomaly Localization\"","archived":false,"fork":false,"pushed_at":"2024-07-09T11:44:55.000Z","size":368,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-25T10:37:47.552Z","etag":null,"topics":["computer-vision","deep-learning","eccv2022","pytorch","self-supervised-learning","video-anomaly-detection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aimagelab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-09-16T11:48:19.000Z","updated_at":"2025-03-14T13:52:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4862448-0c76-4d51-b4bf-43f9ce538b86","html_url":"https://github.com/aimagelab/CSL-TAL","commit_stats":null,"previous_names":["aimagelab/csl-tal"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimagelab%2FCSL-TAL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimagelab%2FCSL-TAL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimagelab%2FCSL-TAL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimagelab%2FCSL-TAL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aimagelab","download_url":"https://codeload.github.com/aimagelab/CSL-TAL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248355809,"owners_count":21090088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","deep-learning","eccv2022","pytorch","self-supervised-learning","video-anomaly-detection"],"created_at":"2024-11-07T05:05:35.549Z","updated_at":"2025-04-11T06:31:22.214Z","avatar_url":"https://github.com/aimagelab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Consistency-based Self-Supervised Learning for Temporal Anomaly Localization\n\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/consistency-based-self-supervised-learning/anomaly-detection-in-surveillance-videos-on-2)](https://paperswithcode.com/sota/anomaly-detection-in-surveillance-videos-on-2?p=consistency-based-self-supervised-learning)\n\nThis repository contains Pytorch code for the [WCPA ECCV22](https://sites.google.com/view/wcpa2022/) paper \"Consistency-based Self-Supervised Learning for Temporal Anomaly Localization\" [[arXiv](https://arxiv.org/abs/2208.05251)]\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"images/model.png\" width=80%/\u003e\n\u003c/p\u003e\n\n```bibtex\n@inproceedings{panariello2022consistency,\n    title = {Consistency-based Self-supervised Learning for Temporal Anomaly Localization},\n    author = {Panariello, Aniello and Porrello, Angelo and Calderara, Simone and Cucchiara, Rita},\n    booktitle = {Proceedings of the European Conference on Computer Vision (ECCV) Workshops},\n    month = {October},\n    year = {2022},\n}\n```\n\n## Installation Note\n\nTested with Python 3.8.13 on Ubuntu (22.04).\n\n- Setup an empty pip environment\n- Install packages using ``pip install -r requirements.txt``\n- Place dataset in ``./data/`` [Download Link](https://stuxidianeducn-my.sharepoint.com/:u:/g/personal/pengwu_stu_xidian_edu_cn/EYcpIgLj2TxKhlPlWcfjsZ4Bbe5tz7AbqH_eP3ZzM6Ul-Q?e=yRpwqq)\n- Run main.py\n\nPlease 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``\n\nRun ``python main.py`` to train the model.\n\n## Improvements over the original paper\n\n- [X] Removed smoothness loss as it was in conflict with the alignment loss. This leads to better and more stable results.\n- [x] Add support for gated attention [1] leading to a +3% improvement in AP frame-level.\n\nTo replicate the results of the paper, run:\n\n```bash\npython main.py --batch-size 8 --alpha 2e-8 --gamma 0.5 --no-gated-attention\n```\n\n---\n## References\n[1] Ilse, Maximilian and Tomczak, Jakub and Welling, Max. Attention-based deep multiple instance learning. International conference on machine learning. PMLR, 2018.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimagelab%2Fcsl-tal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faimagelab%2Fcsl-tal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimagelab%2Fcsl-tal/lists"}