{"id":13712836,"url":"https://github.com/Pilhyeon/BaSNet-pytorch","last_synced_at":"2025-05-06T22:31:36.801Z","repository":{"id":39733789,"uuid":"223139018","full_name":"Pilhyeon/BaSNet-pytorch","owner":"Pilhyeon","description":"Official Pytorch Implementation of 'Background Suppression Network for Weakly-supervised Temporal Action Localization' (AAAI-20 Spotlight)","archived":false,"fork":false,"pushed_at":"2023-09-05T01:28:30.000Z","size":99,"stargazers_count":173,"open_issues_count":12,"forks_count":26,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T23:32:40.261Z","etag":null,"topics":["background-modeling","deep-learning","pytorch","temporal-action-localization","weakly-supervised-learning"],"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/Pilhyeon.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-21T09:38:52.000Z","updated_at":"2024-09-27T08:04:10.000Z","dependencies_parsed_at":"2024-11-13T23:31:03.825Z","dependency_job_id":"ca07d7f6-f23c-4878-bb62-147706054466","html_url":"https://github.com/Pilhyeon/BaSNet-pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilhyeon%2FBaSNet-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilhyeon%2FBaSNet-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilhyeon%2FBaSNet-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilhyeon%2FBaSNet-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pilhyeon","download_url":"https://codeload.github.com/Pilhyeon/BaSNet-pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779109,"owners_count":21802885,"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":["background-modeling","deep-learning","pytorch","temporal-action-localization","weakly-supervised-learning"],"created_at":"2024-08-02T23:01:23.346Z","updated_at":"2025-05-06T22:31:35.828Z","avatar_url":"https://github.com/Pilhyeon.png","language":"Python","funding_links":[],"categories":["Weakly-supervised Action Localization"],"sub_categories":["One-stage Localization"],"readme":"# BaSNet-pytorch\n### Official Pytorch Implementation of '[Background Suppression Network for Weakly-supervised Temporal Action Localization](https://arxiv.org/abs/1911.09963)' (AAAI 2020 Spotlight)\n\n![BaS-Net architecture](https://user-images.githubusercontent.com/16102333/78222568-69945500-7500-11ea-9468-22b1da6d1d77.png)\n\n\u003e **Background Suppression Network for Weakly-supervised Temporal Action Localization**\u003cbr\u003e\n\u003e Pilhyeon Lee (Yonsei Univ.), Youngjung Uh (Clova AI, NAVER Corp.), Hyeran Byun (Yonsei Univ.)\n\u003e\n\u003e Paper: https://arxiv.org/abs/1911.09963\n\u003e\n\u003e **Abstract:** *Weakly-supervised temporal action localization is a very challenging problem because frame-wise labels are not given in the training stage while the only hint is video-level labels: whether each video contains action frames of interest. Previous methods aggregate frame-level class scores to produce video-level prediction and learn from video-level action labels. This formulation does not fully model the problem in that background frames are forced to be misclassified as action classes to predict video-level labels accurately. In this paper, we design Background Suppression Network (BaS-Net) which introduces an auxiliary class for background and has a two-branch weight-sharing architecture with an asymmetrical training strategy. This enables BaS-Net to suppress activations from background frames to improve localization performance. Extensive experiments demonstrate the effectiveness of BaS-Net and its superiority over the state-of-the-art methods on the most popular benchmarks - THUMOS'14 and ActivityNet.*\n\n## (2020/06/16) Our new model is available now!\n### Weakly-supervised Temporal Action Localization by Uncertainty Modeling [[Paper](https://arxiv.org/abs/2006.07006)] [[Code](https://github.com/Pilhyeon/WTAL-Uncertainty-Modeling)]\n\n## Prerequisites\n### Recommended Environment\n* Python 3.5\n* Pytorch 1.0\n* Tensorflow 1.15 (for Tensorboard)\n\n### Depencencies\nYou can set up the environments by using `$ pip3 install -r requirements.txt`.\n\n### Data Preparation\n1. Prepare [THUMOS'14](https://www.crcv.ucf.edu/THUMOS14/) dataset.\n    - We excluded three test videos (270, 1292, 1496) as previous work did.\n\n2. Extract features with two-stream I3D networks\n    - We recommend extracting features using [this repo](https://github.com/piergiaj/pytorch-i3d).\n    - For convenience, we provide the features we used. You can find them [here](https://drive.google.com/file/d/19BIRy53w2H5J2Nc_mpAbYPVzElReJswe/view?usp=sharing).\n    \n3. Place the features inside the `dataset` folder.\n    - Please ensure the data structure is as below.\n   \n~~~~\n├── dataset\n   └── THUMOS14\n       ├── gt.json\n       ├── split_train.txt\n       ├── split_test.txt\n       └── features\n           ├── train\n               ├── rgb\n                   ├── video_validation_0000051.npy\n                   ├── video_validation_0000052.npy\n                   └── ...\n               └── flow\n                   ├── video_validation_0000051.npy\n                   ├── video_validation_0000052.npy\n                   └── ...\n           └── test\n               ├── rgb\n                   ├── video_test_0000004.npy\n                   ├── video_test_0000006.npy\n                   └── ...\n               └── flow\n                   ├── video_test_0000004.npy\n                   ├── video_test_0000006.npy\n                   └── ...\n~~~~\n\n## Usage\n\n### Running\nYou can easily train and evaluate BaS-Net by running the script below.\n\nIf you want to try other training options, please refer to `options.py`.\n\n~~~~\n$ bash run.sh\n~~~~\n\n### Evaulation\nThe pre-trained model can be found [here](https://drive.google.com/file/d/1W9uVOTEvJAOj99RWRUqrk9NS4ahgSOE6/view?usp=sharing).\nYou can evaluate the model by running the command below.\n\n~~~~\n$ bash run_eval.sh\n~~~~\n\n## References\nWe referenced the repos below for the code.\n\n* [STPN](https://github.com/bellos1203/STPN)\n* [ActivityNet](https://github.com/activitynet/ActivityNet)\n\n## Citation\nIf you find this code useful, please cite our paper.\n\n~~~~\n@inproceedings{lee2020BaS-Net,\n  title={Background Suppression Network for Weakly-supervised Temporal Action Localization},\n  author={Lee, Pilhyeon and Uh, Youngjung and Byun, Hyeran},\n  booktitle={The 34th AAAI Conference on Artificial Intelligence},\n  pages={11320--11327},\n  year={2020}\n}\n~~~~\n\n## Contact\nIf you have any question or comment, please contact the first author of the paper - Pilhyeon Lee (lph1114@yonsei.ac.kr).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPilhyeon%2FBaSNet-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPilhyeon%2FBaSNet-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPilhyeon%2FBaSNet-pytorch/lists"}