{"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/spatial-temporal-transformer-for-dynamic","title":"Spatial-Temporal Transformer for Dynamic Scene Graph Generation","arxiv_id":"2107.12309","date":"2021-07-26","proceeding":"ICCV 2021 10","authors":["Yuren Cong","Wentong Liao","Hanno Ackermann","Bodo Rosenhahn","Michael Ying Yang"],"abstract":"Dynamic scene graph generation aims at generating a scene graph of the given video. Compared to the task of scene graph generation from images, it is more challenging because of the dynamic relationships between objects and the temporal dependencies between frames allowing for a richer semantic interpretation. In this paper, we propose Spatial-temporal Transformer (STTran), a neural network that consists of two core modules: (1) a spatial encoder that takes an input frame to extract spatial context and reason about the visual relationships within a frame, and (2) a temporal decoder which takes the output of the spatial encoder as input in order to capture the temporal dependencies between frames and infer the dynamic relationships. Furthermore, STTran is flexible to take varying lengths of videos as input without clipping, which is especially important for long videos. Our method is validated on the benchmark dataset Action Genome (AG). The experimental results demonstrate the superior performance of our method in terms of dynamic scene graphs. Moreover, a set of ablative studies is conducted and the effect of each proposed module is justified. Code available at: https://github.com/yrcong/STTran.","url_abs":"https://arxiv.org/abs/2107.12309v2","url_pdf":"https://arxiv.org/pdf/2107.12309v2.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":"spatial-temporal-transformer-for-dynamic","repo_url":"https://github.com/yrcong/sttran","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"spatial-temporal-transformer-for-dynamic","repo_url":"https://github.com/lunaproject22/aar","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"scene-graph-generation","task_name":"Scene Graph Generation"},{"task_slug":"video-understanding","task_name":"Video Understanding"},{"task_slug":"video-visual-relation-detection","task_name":"Video Visual Relation Detection"},{"task_slug":"visual-relationship-detection","task_name":"Visual Relationship Detection"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2107.12309","atlas_url":"https://app.syntology.ai/?focus=2107.12309","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.12309"}},"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/lunaproject22/aar","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yrcong/sttran","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/yrcong/STTran","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"unverified":7},"by_repo_kind":{"official":{"samples":9,"ran":2,"repositories":1},"listed":{"samples":5,"ran":5,"repositories":1}},"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":5,"samples":[{"code_sha256_prefix":"22fd84f6ef1eaa10","entry":"TransformerDecoder","repo":"lunaproject22/aar","repo_kind":"listed","path":"lib/transformer.py","file_url":"https://github.com/lunaproject22/aar/blob/HEAD/lib/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"22fd84f6ef1eaa10"}},{"code_sha256_prefix":"65aa79798bcd2990","entry":"TransformerDecoderLayer","repo":"lunaproject22/aar","repo_kind":"listed","path":"lib/transformer.py","file_url":"https://github.com/lunaproject22/aar/blob/HEAD/lib/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"65aa79798bcd2990"}},{"code_sha256_prefix":"040179c6bd8eb32f","entry":"TransformerEncoder","repo":"lunaproject22/aar","repo_kind":"listed","path":"lib/transformer.py","file_url":"https://github.com/lunaproject22/aar/blob/HEAD/lib/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"040179c6bd8eb32f"}},{"code_sha256_prefix":"cf0d96423bcfe244","entry":"TransformerEncoderLayer","repo":"lunaproject22/aar","repo_kind":"listed","path":"lib/transformer.py","file_url":"https://github.com/lunaproject22/aar/blob/HEAD/lib/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cf0d96423bcfe244"}},{"code_sha256_prefix":"a1e587129dd2dfaf","entry":"get_ranking","repo":"yrcong/STTran","repo_kind":"official","path":"lib/pytorch_misc.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/lib/pytorch_misc.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a1e587129dd2dfaf"}},{"code_sha256_prefix":"fef49730c9e9a2b8","entry":"pairwise","repo":"yrcong/STTran","repo_kind":"official","path":"lib/pytorch_misc.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/lib/pytorch_misc.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fef49730c9e9a2b8"}},{"code_sha256_prefix":"1e8a7993eb1f6599","entry":"transformer","repo":"lunaproject22/aar","repo_kind":"listed","path":"lib/transformer.py","file_url":"https://github.com/lunaproject22/aar/blob/HEAD/lib/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1e8a7993eb1f6599"}},{"code_sha256_prefix":"3b53b8b24f740103","entry":"cuda_collate_fn","repo":"yrcong/STTran","repo_kind":"official","path":"dataloader/action_genome.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/dataloader/action_genome.py","link_basis":"first_harvest_node","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":"3b53b8b24f740103"}},{"code_sha256_prefix":"d614ca29b05d68ec","entry":"im_list_to_blob","repo":"yrcong/STTran","repo_kind":"official","path":"lib/funcs.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/lib/funcs.py","link_basis":"first_harvest_node","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":"d614ca29b05d68ec"}},{"code_sha256_prefix":"7fee693dfb2f64b5","entry":"load_word_vectors","repo":"yrcong/STTran","repo_kind":"official","path":"lib/word_vectors.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/lib/word_vectors.py","link_basis":"first_harvest_node","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":"7fee693dfb2f64b5"}},{"code_sha256_prefix":"3b52f8f6c24ea8da","entry":"obj_edge_vectors","repo":"yrcong/STTran","repo_kind":"official","path":"lib/word_vectors.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/lib/word_vectors.py","link_basis":"first_harvest_node","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":"3b52f8f6c24ea8da"}},{"code_sha256_prefix":"6d0daf87a6ec7e39","entry":"optimistic_restore","repo":"yrcong/STTran","repo_kind":"official","path":"lib/pytorch_misc.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/lib/pytorch_misc.py","link_basis":"first_harvest_node","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":"6d0daf87a6ec7e39"}},{"code_sha256_prefix":"e31361e8a2fbb396","entry":"reporthook","repo":"yrcong/STTran","repo_kind":"official","path":"lib/word_vectors.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/lib/word_vectors.py","link_basis":"first_harvest_node","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":"e31361e8a2fbb396"}},{"code_sha256_prefix":"bbdc9c82250ba50d","entry":"transpose_packed_sequence_inds","repo":"yrcong/STTran","repo_kind":"official","path":"lib/funcs.py","file_url":"https://github.com/yrcong/STTran/blob/HEAD/lib/funcs.py","link_basis":"first_harvest_node","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":"bbdc9c82250ba50d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}