{"id":24912919,"url":"https://github.com/vt-le/mogup","last_synced_at":"2026-01-06T22:52:57.793Z","repository":{"id":199194186,"uuid":"702327222","full_name":"vt-le/MoGuP","owner":"vt-le","description":"MoGuP: This repo is the official implementation of \"MoGuP: Motion-guided Prediction for Video Anomaly Detection\".","archived":false,"fork":false,"pushed_at":"2023-11-28T05:03:15.000Z","size":4,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T05:28:59.098Z","etag":null,"topics":["anomalydetection","avenue","guidedmotion","hierarchicaltransformer","mogup","opticalflow","ped2","shanghaitech","transformer","videoanomalydetection"],"latest_commit_sha":null,"homepage":"https://moguprediction.github.io/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vt-le.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-09T05:29:43.000Z","updated_at":"2024-04-26T15:08:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6db3519-5f56-44ca-97cf-16507a471cfb","html_url":"https://github.com/vt-le/MoGuP","commit_stats":null,"previous_names":["vt-le/mogup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vt-le%2FMoGuP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vt-le%2FMoGuP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vt-le%2FMoGuP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vt-le%2FMoGuP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vt-le","download_url":"https://codeload.github.com/vt-le/MoGuP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245972642,"owners_count":20702710,"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":["anomalydetection","avenue","guidedmotion","hierarchicaltransformer","mogup","opticalflow","ped2","shanghaitech","transformer","videoanomalydetection"],"created_at":"2025-02-02T05:29:01.090Z","updated_at":"2026-01-06T22:52:57.756Z","avatar_url":"https://github.com/vt-le.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MoGuP\n\nThis repository is the official implementation of [MoGuP](https://moguprediction.github.io/) [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fvt-le%2FMoGuP\u0026count_bg=%2379C83D\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=hits\u0026edge_flat=false)](https://hits.seeyoufarm.com).\n\n**[MoGuP: Motion-Guided Prediction for Video Anomaly Detection](https://moguprediction.github.io/)**\n\u003cbr/\u003e\n[Viet-Tuan Le](https://vt-le.github.io/), \n[Yong-Guk Kim](http://home.sejong.ac.kr/~ykim/)\n\u003cbr/\u003e\n\n[![Project Website](https://img.shields.io/badge/Project-Website-orange)](https://moguprediction.github.io/)\n\n\n## News\n\n- [11/24/2023] Pre-trained MoGuP models are released!\n\u003c!--\n- [XX/XX/2024] Code released!)\n--\u003e\n\n## Setup\n\n### Requirements\n\n```shell\npip install -r requirements.txt\n```\n\nWe evaluate `MoGuP` on:\n| Dataset | Link                                                                                  |\n|--|---------------------------------------------------------------------------------------|\n| UCSD Ped2 | [![Google drive](https://badgen.net/static/Homepage/Ped2/blue)](http://www.svcl.ucsd.edu/projects/anomaly/dataset.html) |\n| CUHK Avenue | [![Google drive](https://badgen.net/badge/Homepage/Avenue/cyan)](http://www.cse.cuhk.edu.hk/leojia/projects/detectabnormal/dataset.html) |\n| ShanghaiTech | [![Google drive](https://badgen.net/badge/Homepage/ShanghaiTech/green?)](https://svip-lab.github.io/dataset/campus_dataset.html) |\n\nA dataset is a directory with the following structure:\n  ```bash\n  $ tree data\n  ped2/avenue\n  ├── training\n  │   └── frames\n  │       ├── ${video_1}$\n  │       │   ├── 000.jpg\n  │       │   ├── 001.jpg\n  │       │   └── ...\n  │       ├── ${video_2}$\n  │       │   ├── 00.jpg\n  │       │   └── ...\n  │       └── ...\n  ├── testing\n  │   └── frames\n  │       ├── ${video_1}$\n  │       │   ├── 000.jpg\n  │       │   ├── 001.jpg\n  │       │   └── ...\n  │       ├── ${video_2}$\n  │       │   ├── 000.jpg\n  │       │   └── ...\n  │       └── ...\n  └── ped2/avenue.mat\n  \n  shanghaitech\n  ├── training\n  │   └── frames\n  │       ├── ${video_1}$\n  │       │   ├── 000.jpg\n  │       │   ├── 001.jpg\n  │       │   └── ...\n  │       ├── ${video_2}$\n  │       │   ├── 00.jpg\n  │       │   └── ...\n  │       └── ...\n  ├── testing\n  │   └── frames\n  │       ├── ${video_1}$\n  │       │   ├── 000.jpg\n  │       │   ├── 001.jpg\n  │       │   └── ...\n  │       ├── ${video_2}$\n  │       │   ├── 000.jpg\n  │       │   └── ...\n  │       └── ...\n  └── test_frame_mask\n      ├── 01_0014.npy\n      ├── 01_0015.npy\n      └── ...  \n  ```\n\n## Data preprocessing\n- Object detecion: [Cascade R-CNN](https://github.com/open-mmlab/mmaction2)\n- Extracting optical flow frames: [FlowNet2.0](https://github.com/NVIDIA/flownet2-pytorch)\n\n\n## Evaluation\nPlease first download the pre-trained model\n\n| Dataset | Pretrained Model                                                                                  |\n|--|---------------------------------------------------------------------------------------|\n| UCSD Ped2 | [![Google drive](https://badgen.net/static/Link/Ped2/blue?icon=chrome)](https://drive.google.com/drive/folders/1Jq8vEGS9eEV2a6rK3TmjhUKcbbbuLcYd?usp=sharing) |\n| CUHK Avenue | [![Google drive](https://badgen.net/badge/Link/Avenue/blue?icon=chrome)](https://drive.google.com/drive/folders/1UxPg9u6Bmhh5YBMfU31Gj4BZmL-ghIeq?usp=sharing) |\n| ShanghaiTech | [![Google drive](https://badgen.net/badge/Link/ShanghaiTech/blue?icon=chrome)](https://drive.google.com/drive/folders/1Jq8vEGS9eEV2a6rK3TmjhUKcbbbuLcYd?usp=sharing) |\n\n## Usage\n\n### Training\n\n```bash\n python hybrid_train.py \\\n    --cfg \u003cpath/to/config/file\u003e\n```   \n\n### Evaluation\n\nOnce the training is done, run inference:\n\n```bash\n python hybrid_eval.py \\\n    --cfg \u003cpath/to/config/file\u003e\n``` \n\n## Visualization\n\n\u003ctable class=\"center\"\u003e\n\u003ctr\u003e\n  \u003ctd style=\"text-align:center;\"\u003e\u003cb\u003eUCSD Ped22\u003c/b\u003e\u003c/td\u003e\n  \u003ctd style=\"text-align:center;\"\u003e\u003cb\u003eCUHK Avenue\u003c/b\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003e\u003cimg src=\"https://github.com/MoGuPrediction/MoGuPrediction.github.io/blob/main/static/images/fig_introduction_error_comparation_ped2.png\"\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"https://github.com/MoGuPrediction/MoGuPrediction.github.io/blob/main/static/images/fig_introduction_error_comparation_avenue.png\"\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003cimg src=\"https://github.com/MoGuPrediction/MoGuPrediction.github.io/blob/main/static/images/fig_introduction_error_comparation_shanghaitech.png\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Citation\nIf you make use of our work, please cite our paper.\n```bibtex\n@article{le2024mogup,\n    title={MoGuP: Motion-guided Prediction for Video Anomaly Detection},\n    author={Le, Viet-Tuan and Kim, Yong-Guk},\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvt-le%2Fmogup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvt-le%2Fmogup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvt-le%2Fmogup/lists"}