{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/temporal-shift-module-for-efficient-video","title":"TSM: Temporal Shift Module for Efficient Video Understanding","arxiv_id":"1811.08383","date":"2018-11-20","proceeding":"ICCV 2019 10","authors":["Ji Lin","Chuang Gan","Song Han"],"abstract":"The explosive growth in video streaming gives rise to challenges on performing video understanding at high accuracy and low computation cost. Conventional 2D CNNs are computationally cheap but cannot capture temporal relationships; 3D CNN based methods can achieve good performance but are computationally intensive, making it expensive to deploy. In this paper, we propose a generic and effective Temporal Shift Module (TSM) that enjoys both high efficiency and high performance. Specifically, it can achieve the performance of 3D CNN but maintain 2D CNN's complexity. TSM shifts part of the channels along the temporal dimension; thus facilitate information exchanged among neighboring frames. It can be inserted into 2D CNNs to achieve temporal modeling at zero computation and zero parameters. We also extended TSM to online setting, which enables real-time low-latency online video recognition and video object detection. TSM is accurate and efficient: it ranks the first place on the Something-Something leaderboard upon publication; on Jetson Nano and Galaxy Note8, it achieves a low latency of 13ms and 35ms for online video recognition. The code is available at: https://github.com/mit-han-lab/temporal-shift-module.","url_abs":"https://arxiv.org/abs/1811.08383v3","url_pdf":"https://arxiv.org/pdf/1811.08383v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/MIT-HAN-LAB/temporal-shift-module","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/PaParaZz1/TemporalShiftModule","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/WavesUR/embedded_TSM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/bespontaneous/ffn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/bespontaneous/mca-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/niveditarahurkar/CS231N-ActionRecognition","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/rijuldhir/TSM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/stevedepp/yolo4asl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/sunutf/TSM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/PaddlePaddle/PaddleVideo/blob/develop/docs/zh-CN/model_zoo/recognition/pp-tsm.md","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":null},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/mindspore-ai/models/tree/master/research/cv/tsm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/open-mmlab/mmaction2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"temporal-shift-module-for-efficient-video","repo_url":"https://github.com/towhee-io/towhee/tree/main/towhee/models/tsm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"3d-human-action-recognition","task_name":"3D Action Recognition"},{"task_slug":"action-classification","task_name":"Action Classification"},{"task_slug":"action-recognition-in-videos","task_name":"Action Recognition"},{"task_slug":"micro-action-recognition","task_name":"Micro-Action Recognition"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"video-object-detection","task_name":"Video Object Detection"},{"task_slug":"video-object-tracking","task_name":"Video Object Tracking"},{"task_slug":"video-recognition","task_name":"Video Recognition"},{"task_slug":"video-understanding","task_name":"Video Understanding"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/3d-action-recognition-on-assembly101","task":"3D Action Recognition","dataset":"Assembly101","model":"TSM","rank_in_archive_order":2,"of":7,"metrics":{"Actions Top-1":"35.27","Object Top-1":"47.45","Verbs Top-1":"58.27"},"uses_additional_data":false},{"leaderboard":"/sota/action-classification-on-kinetics-400","task":"Action Classification","dataset":"Kinetics-400","model":"TSM","rank_in_archive_order":161,"of":207,"metrics":{"Acc@1":"74.7"},"uses_additional_data":false},{"leaderboard":"/sota/action-recognition-in-videos-on-something-1","task":"Action Recognition","dataset":"Something-Something V1","model":"TSM (RGB + Flow)","rank_in_archive_order":50,"of":74,"metrics":{"Top 1 Accuracy":"50.7"},"uses_additional_data":false},{"leaderboard":"/sota/action-recognition-in-videos-on-something-1","task":"Action Recognition","dataset":"Something-Something V1","model":"TSMEn","rank_in_archive_order":54,"of":74,"metrics":{"Top 1 Accuracy":"49.7","Top 5 Accuracy":"78.5"},"uses_additional_data":false},{"leaderboard":"/sota/action-recognition-in-videos-on-something-1","task":"Action Recognition","dataset":"Something-Something V1","model":"TSM","rank_in_archive_order":65,"of":74,"metrics":{"Top 1 Accuracy":"47.2","Top 5 Accuracy":"77.1"},"uses_additional_data":false},{"leaderboard":"/sota/action-recognition-in-videos-on-something","task":"Action Recognition","dataset":"Something-Something V2","model":"TSM (RGB + Flow)","rank_in_archive_order":76,"of":123,"metrics":{"Top-1 Accuracy":"66.6","Top-5 Accuracy":"91.3"},"uses_additional_data":true},{"leaderboard":"/sota/video-object-detection-on-imagenet-vid","task":"Video Object Detection","dataset":"ImageNet VID","model":"Online TSM","rank_in_archive_order":30,"of":33,"metrics":{"MAP ":"76.3"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/1811.08383","atlas_url":"https://app.syntology.ai/?focus=1811.08383","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1811.08383"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/WavesUR/embedded_TSM","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sunutf/TSM","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bespontaneous/ffn","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mindspore-ai/models/tree/master/research/cv/tsm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PaddlePaddle/PaddleVideo/blob/develop/docs/zh-CN/model_zoo/recognition/pp-tsm.md","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/towhee-io/towhee/tree/main/towhee/models/tsm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rijuldhir/TSM","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MIT-HAN-LAB/temporal-shift-module","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PaParaZz1/TemporalShiftModule","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/niveditarahurkar/CS231N-ActionRecognition","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bespontaneous/mca-pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/open-mmlab/mmaction2","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/stevedepp/yolo4asl","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":5,"ran_honours":1,"unverified":10},"by_repo_kind":{"listed":{"samples":13,"ran":4,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":4,"samples":[{"code_sha256_prefix":"d9def42110729a85","entry":"conv1x1","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"d9def42110729a85"}},{"code_sha256_prefix":"dfcfb80c1514fe42","entry":"conv1x1x1","repo":"bespontaneous/mca-pytorch","repo_kind":"listed","path":"2D_Network/ops/backbone/resnet_TSM.py","file_url":"https://github.com/bespontaneous/mca-pytorch/blob/HEAD/2D_Network/ops/backbone/resnet_TSM.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dfcfb80c1514fe42"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"a0131fb70c267a9e","entry":"conv_1x1_bn","repo":"sunutf/TSM","repo_kind":"listed","path":"online_demo/mobilenet_v2_tsm.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/online_demo/mobilenet_v2_tsm.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a0131fb70c267a9e"}},{"code_sha256_prefix":"e087cbfa1e53486d","entry":"conv_bn","repo":"sunutf/TSM","repo_kind":"listed","path":"online_demo/mobilenet_v2_tsm.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/online_demo/mobilenet_v2_tsm.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e087cbfa1e53486d"}},{"code_sha256_prefix":"63ec083689f80f47","entry":"make_divisible","repo":"sunutf/TSM","repo_kind":"listed","path":"online_demo/mobilenet_v2_tsm.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/online_demo/mobilenet_v2_tsm.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"63ec083689f80f47"}},{"code_sha256_prefix":"c89c29bd79c97227","entry":"bninception","repo":"sunutf/TSM","repo_kind":"listed","path":"archs/bn_inception.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/archs/bn_inception.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c89c29bd79c97227"}},{"code_sha256_prefix":"dc07c7d74de65f4f","entry":"build_dataflow","repo":"sunutf/TSM","repo_kind":"listed","path":"main_amp.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/main_amp.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dc07c7d74de65f4f"}},{"code_sha256_prefix":"05f08d45ec764f25","entry":"init_hidden","repo":"sunutf/TSM","repo_kind":"listed","path":"ops/models_rnn.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/ops/models_rnn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"05f08d45ec764f25"}},{"code_sha256_prefix":"a866d9f9275c700a","entry":"input_fn","repo":"sunutf/TSM","repo_kind":"listed","path":"tsm_fpga/fpga_build/model_tf_split/calib_input_split.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/tsm_fpga/fpga_build/model_tf_split/calib_input_split.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a866d9f9275c700a"}},{"code_sha256_prefix":"ea903b20756dc01d","entry":"make_temporal_shift","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"ea903b20756dc01d"}},{"code_sha256_prefix":"0be9a22aa03cb8bb","entry":"process_output","repo":"sunutf/TSM","repo_kind":"listed","path":"tsm_fpga/main_tf.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/tsm_fpga/main_tf.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0be9a22aa03cb8bb"}},{"code_sha256_prefix":"47e316f6d90b3490","entry":"torch_params","repo":"sunutf/TSM","repo_kind":"listed","path":"tsm_fpga/mobilenet_v2_tfslim.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/tsm_fpga/mobilenet_v2_tfslim.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"47e316f6d90b3490"}},{"code_sha256_prefix":"9823b80aaa256ebd","entry":"torch_to_conv_state","repo":"sunutf/TSM","repo_kind":"listed","path":"tsm_fpga/mobilenet_v2_tfslim.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/tsm_fpga/mobilenet_v2_tfslim.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9823b80aaa256ebd"}},{"code_sha256_prefix":"b85fde19d195b87f","entry":"torch_to_linear_state","repo":"sunutf/TSM","repo_kind":"listed","path":"tsm_fpga/mobilenet_v2_tfslim.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/tsm_fpga/mobilenet_v2_tfslim.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b85fde19d195b87f"}},{"code_sha256_prefix":"406596818e861a3d","entry":"transform","repo":"sunutf/TSM","repo_kind":"listed","path":"tsm_fpga/main_tf.py","file_url":"https://github.com/sunutf/TSM/blob/HEAD/tsm_fpga/main_tf.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"406596818e861a3d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}