OSCR

Dynamic spatiotemporal features in action recognition: a multimodal study.

Code ↔ Paper

12 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 12 matches
  1. [1] § Methods › Action classification of the two-stream CNNs and the layer features ↔ figure_data_and_scripts.zip/fig_s2_script/plot_fig_s2_i3d_k400.py, lines 25–97 · score 0.92 · backbone.layer1.2.relu, backbone.layer2.3.relu, backbone.layer3.5.relu, backbone.layer4.2.relu, backbone.maxpool, cls_head.dropout
  2. [2] § Methods › Action classification of the two-stream CNNs and the layer features ↔ figure_data_and_scripts.zip/fig_s2_script/plot_fig_s2_tsn_k400.py, lines 27–101 · score 0.92 · backbone.layer1.2.relu, backbone.layer2.3.relu, backbone.layer3.5.relu, backbone.layer4.2.relu, backbone.maxpool, cls_head.dropout
  3. [3] § Results › Dynamic spatial and temporal features and feature distance ↔ figure_data_and_scripts.zip/fig_s3_s4_data_script/plot_baseline_for_table4_exampleCode.m, lines 8–38 · score 0.78 · movement velocity, motion energy, movement direction, Hu moments, arm, HOF
  4. [4] § Methods › Estimation of dynamic spatial and temporal features ↔ figure_data_and_scripts.zip/fig_4_script/fig_4_script.py, lines 78–118 · score 0.77 · movement velocity, Motion energy, Movement direction, temporal features, HOF, segmentation
  5. [5] § Methods › Estimation of dynamic spatial and temporal features ↔ figure_data_and_scripts.zip/fig_s3_s4_data_script/plot_baseline_for_table4_exampleCode.m, lines 8–38 · score 0.72 · movement velocity, Motion energy, Movement direction, HOF, HOG, silhouettes
  6. [6] § Results › Dynamic spatial and temporal features and feature distance ↔ figure_data_and_scripts.zip/fig_4_script/fig_4_script.py, lines 78–118 · score 0.71 · movement velocity, motion energy, movement direction, temporal features, HOF, flow
  7. [7] § Methods › Action classification of the two-stream CNNs and the layer features ↔ figure_data_and_scripts.zip/fig_s2_script/plot_fig_s2_tsn_ssv2.py, lines 26–98 · score 0.66 · TSN SSV2, I3D K400, epoch, permutation, baseline, models
  8. [8] § Methods › Action classification of the two-stream CNNs and the layer features ↔ figure_data_and_scripts.zip/fig_s2_script/plot_fig_s2_i3d_k400.py, lines 25–97 · score 0.66 · I3D K400, TSN SSV2, epoch, permutation, baseline, models
  9. [9] § Results › Dynamic spatial and temporal features and feature distance ↔ figure_data_and_scripts.zip/fig_s2_script/plot_fig_s2_tsn_k400.py, lines 27–101 · score 0.61 · TSN K400, I3D K400, TSN SSV2, layers, distance, videos
  10. [10] § Results › Dynamic spatial and temporal features and feature distance ↔ figure_data_and_scripts.zip/fig_s2_script/plot_fig_s2_tsn_ssv2.py, lines 26–98 · score 0.61 · TSN SSV2, TSN K400, I3D K400, layers, distance, videos
  11. [11] § Methods › Multivariate ROI-based decoding ↔ figure_data_and_scripts.zip/fig_1_script/MVPA_exampleCode.m, lines 44–60 · score 0.53 · hand static, hand grasp, MVPA, maps
  12. [12] § Methods › Correlation between behavioral performance and stimulus features ↔ figure_data_and_scripts.zip/fig_2_script/plot_fig_2b.py, lines 21–44 · score 0.51 · behavioral bias, confusion matrices, touching, monkeys

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 153 lines · 7.3 KB · CC-BY-4.0 · 2 matches

  1. import numpy as np
  2. from matplotlib import pyplot as plt
  3. import os
  4. import copy
  5. import json
  6. from json import JSONEncoder
  7. from scipy.stats import permutation_test
  8. from scipy.spatial.distance import cosine
  9. class NumpyArrayEncoder(JSONEncoder):
  10. def default(self, obj):
  11. if isinstance(obj, np.ndarray):
  12. return obj.tolist()
  13. return JSONEncoder.default(self, obj)
  14. def stat_cosine(x, y, normalize=False):
  15. x_to_compare = copy.deepcopy(x)
  16. y_to_compare = copy.deepcopy(y)
  17. if normalize:
  18. x_to_compare = (x_to_compare - np.min(x_to_compare)) / (np.max(x_to_compare) - np.min(x_to_compare))
  19. y_to_compare = (y_to_compare - np.min(y_to_compare)) / (np.max(y_to_compare) - np.min(y_to_compare))
  20. return 1 - cosine(x_to_compare, y_to_compare)
  21. # Load data
  22. M1_behavior_index_dist_file = 'M1_behavior_index_distmap.json'
  23. M2_behavior_index_dist_file = 'M2_behavior_index_distmap.json'
  24. Group_behavior_index_dist_file = 'Group_behavior_index_distmap.json'
  25. with open(M1_behavior_index_dist_file, "r") as infile:
  26. M1_behavior_index_distmap = json.load(infile)
  27. with open(M2_behavior_index_dist_file, "r") as infile:
  28. M2_behavior_index_distmap = json.load(infile)
  29. with open(Group_behavior_index_dist_file, "r") as infile:
  30. Group_behavior_index_distmap = json.load(infile)
  31. update_data = False
  32. selected_layer_list = [
  33. 'backbone.maxpool',
  34. 'backbone.layer1.2.relu',
  35. 'backbone.layer2.3.relu',
  36. 'backbone.layer3.5.relu',
  37. 'backbone.layer4.2.relu',
  38. 'cls_head.dropout',
  39. ]
  40. labels = ['grasp', 'touch', 'reach']
  41. root_dir = 'i3d_k400_mean-epoch_150-nonzero'
  42. data_dir = os.path.join(root_dir, 'layers')
  43. output_dir = os.path.join(root_dir, 'figs')
  44. video_name_list = [
  45. 'green', 'small', 'ring', 'flip', 'right_hand', 'actorL', 'actorT', 'monkey_hand', 'monkey_tail',
  46. ]
  47. if update_data:
  48. model_vector_dict = {}
  49. comparison_results = {}
  50. for layer_name in selected_layer_list:
  51. # Check if chd_vector-{layer_name.replace(".", "_")}.json exists
  52. if os.path.exists(os.path.join(data_dir, f'chd_vector-{layer_name.replace(".", "_")}.json')):
  53. model_vector = json.load(open(os.path.join(data_dir, f'chd_vector-{layer_name.replace(".", "_")}.json'), "r"))
  54. else:
  55. model_vector = []
  56. for video_name in video_name_list:
  57. layer_dist_file = os.path.join(data_dir, f'chd_vector-{video_name}-{layer_name.replace(".", "_")}.json')
  58. model_vector.extend(json.load(open(layer_dist_file, "r"))['dist_vector'])
  59. model_vector_dict[layer_name] = model_vector
  60. M1_vector = M1_behavior_index_distmap['index_vector']
  61. M2_vector = M2_behavior_index_distmap['index_vector']
  62. Group_vector = Group_behavior_index_distmap['index_vector']
  63. # Calculate cosine similarity
  64. M1_cosine_perm = permutation_test((model_vector, M1_vector), stat_cosine, permutation_type='independent', vectorized=False, n_resamples=100000, alternative='greater')
  65. M2_cosine_perm = permutation_test((model_vector, M2_vector), stat_cosine, permutation_type='independent', vectorized=False, n_resamples=100000, alternative='greater')
  66. Group_cosine_perm = permutation_test((model_vector, Group_vector), stat_cosine, permutation_type='independent', vectorized=False, n_resamples=100000, alternative='greater')
  67. M1_cosine = M1_cosine_perm.statistic
  68. M1_pvalue = M1_cosine_perm.pvalue
  69. M1_baseline = M1_cosine_perm.null_distribution.mean()
  70. M2_cosine = M2_cosine_perm.statistic
  71. M2_pvalue = M2_cosine_perm.pvalue
  72. M2_baseline = M2_cosine_perm.null_distribution.mean()
  73. Group_cosine = Group_cosine_perm.statistic
  74. Group_pvalue = Group_cosine_perm.pvalue
  75. Group_baseline = Group_cosine_perm.null_distribution.mean()
  76. comparison_results[layer_name] = {
  77. 'M1': {'cosine': M1_cosine, 'pvalue': M1_pvalue, 'baseline': M1_baseline},
  78. 'M2': {'cosine': M2_cosine, 'pvalue': M2_pvalue, 'baseline': M2_baseline},
  79. 'Group': {'cosine': Group_cosine, 'pvalue': Group_pvalue, 'baseline': Group_baseline},
  80. }
  81. # Change keys to ['I3D_K400', 'TSN_K400', 'TSN_SSV2']
  82. # Save data to json
  83. with open(os.path.join(output_dir, 'layer_dist_dict-i3d_k400_mean-epoch_150-nonzero.json'), "w") as outfile:
  84. json.dump(model_vector_dict, outfile, cls=NumpyArrayEncoder, indent=4)
  85. with open(os.path.join(output_dir, 'comparison_results-i3d_k400_mean-epoch_150-nonzero.json'), "w") as outfile:
  86. json.dump(comparison_results, outfile, cls=NumpyArrayEncoder, indent=4)
  87. else:
  88. layer_dist_dict = json.load(open(os.path.join(output_dir, 'layer_dist_dict-i3d_k400_mean-epoch_150-nonzero.json'), "r"))
  89. comparison_results = json.load(open(os.path.join(output_dir, 'comparison_results-i3d_k400_mean-epoch_150-nonzero.json'), "r"))
  90. # Plot results
  91. ann_list = []
  92. ann_cos_group = []
  93. ann_pvalue_group = []
  94. ann_baseline_group = []
  95. ann_cos_m1 = []
  96. ann_pvalue_m1 = []
  97. ann_baseline_m1 = []
  98. ann_cos_m2 = []
  99. ann_pvalue_m2 = []
  100. ann_baseline_m2 = []
  101. for layer_name in selected_layer_list:
  102. ann_list.append(layer_name)
  103. ann_cos_group.append(comparison_results[layer_name]['Group']['cosine'])
  104. ann_pvalue_group.append(comparison_results[layer_name]['Group']['pvalue'])
  105. ann_baseline_group.append(comparison_results[layer_name]['Group']['baseline'])
  106. ann_cos_m1.append(comparison_results[layer_name]['M1']['cosine'])
  107. ann_pvalue_m1.append(comparison_results[layer_name]['M1']['pvalue'])
  108. ann_baseline_m1.append(comparison_results[layer_name]['M1']['baseline'])
  109. ann_cos_m2.append(comparison_results[layer_name]['M2']['cosine'])
  110. ann_pvalue_m2.append(comparison_results[layer_name]['M2']['pvalue'])
  111. ann_baseline_m2.append(comparison_results[layer_name]['M2']['baseline'])
  112. fig, ax = plt.subplots(1, 1, figsize=(10, 8))
  113. bp = ax.bar(ann_list, ann_cos_group, width=0.75)
  114. # bar color
  115. for i, bar in enumerate(bp):
  116. if ann_pvalue_group[i] < 0.05:
  117. # Only edge color, no fill
  118. bar.set_edgecolor('red')
  119. bar.set_facecolor('none')
  120. else:
  121. bar.set_edgecolor('black')
  122. bar.set_facecolor('none')
  123. # Add a short baseline dashed line with x spanning bar left - 0.05 to bar right + 0.05)
  124. ax.plot([bar.get_x() - 0.05, bar.get_x() + 0.8], [ann_baseline_group[i], ann_baseline_group[i]], color='black', linestyle='--', linewidth=1)
  125. for i, x in enumerate(ann_cos_m1):
  126. if ann_pvalue_m1[i] < 0.05:
  127. ax.scatter(i, x, marker='o', s=50, edgecolor='red', facecolor='none')
  128. else:
  129. ax.scatter(i, x, marker='o', s=50, edgecolor='black', facecolor='none')
  130. for i, x in enumerate(ann_cos_m2):
  131. if ann_pvalue_m2[i] < 0.05:
  132. ax.scatter(i, x, marker='^', s=50, edgecolor='red', facecolor='none')
  133. else:
  134. ax.scatter(i, x, marker='^', s=50, edgecolor='black', facecolor='none')
  135. ax.set_xticks([i for i in range(len(ann_list))])
  136. ax.set_xticklabels(ann_list, rotation=30)
  137. ax.set_xlabel('ANN layers')
  138. ax.set_ylabel('Cosine similarity')
  139. ax.set_ylim(0, 1)
  140. ax.set_title('I3D-K400 v.s. monkey behavior pattern similarity')
  141. plt.tight_layout()
  142. plt.savefig(os.path.join(output_dir, 'i3d_k400_mean-epoch_150-nonzero-monkey_behavior-pattern_comparison-selected_layers.png'))
  143. plt.savefig(os.path.join(output_dir, 'i3d_k400_mean-epoch_150-nonzero-monkey_behavior-pattern_comparison-selected_layers.pdf'), format='pdf', dpi=300)
  144. plt.close()

plot_fig_s2_i3d_k400.py, under CC-BY-4.0 · at the source

Overview

Authors: Qiuhan Jin1,2, Ding Cui1,2, Koen Nelissen1,2
  1. Laboratory for Neuro- and Psychophysiology, Department of Neurosciences, KU Leuven, Leuven, Belgium
  2. Leuven Brain Institute, KU Leuven, Leuven, Belgium
Institutions: KU Leuven (Belgium)
Journal: Communications biology, volume 9, issue 1, article 734
Dates: received 10 April 2025; accepted 12 March 2026; published online 3 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s42003-026-09917-z · PMID 41933034 · PMCID PMC13219507 · OpenAlex W7148703792
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: non-human primate (organism), cognitive (subfield)
Methods: Statistics, Machine learning, fMRI & imaging, Physiology & signal measures
Keywords: Neural decoding, Perception
MeSH: Brain*, Animals, Brain Mapping, Macaca mulatta, Magnetic Resonance Imaging, Male (* major topic)
Topic: Action Observation and Synchronization (Social Psychology, Psychology), according to OpenAlex
Funding: Fonds Wetenschappelijk Onderzoek (G.0.622.08, G.0.593.09, G.0.854.19, 12AHE24N, V475523N); KU Leuven (Katholieke Universiteit Leuven) (C14/17/109, C14/21/111)
Citations: not cited yet (Europe PMC); 70 references in the paper

Abstract

Recognizing and distinguishing actions is a complex cognitive process that relies on integrating various spatiotemporal information. However, the specific contributions of spatial and temporal features to action recognition remain unclear. To address this gap, we conducted fMRI recordings in monkeys as they observed videos of grasping, touching, and reaching actions. Using multivariate pattern analysis (MVPA), we identified distinct action representation patterns across the brain, with most regions of the action observation network (AON) exhibiting a grasping-dominant pattern. This neural representation was consistent with the monkeys’ behavioral differentiation of these actions in subsequent categorization tasks. Building on computer vision approaches, we systematically extracted dynamic spatial and temporal features from action videos, capturing evolution of feature information over time, and compared these features with the monkeys’ behavioral performance. Our results demonstrate that these features are utilized across a hierarchy and selectively correlate with behavior, reflecting a complex interplay between feature information and key action components. These findings imply a distributed coding strategy in which diverse spatial and temporal features are selectively integrated to form action representations that facilitate recognition or discrimination. Our study provides empirical evidence for current action recognition models and introduces advanced computational tools for analyzing high-dimensional and multimodal data.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 12 matches between paragraphs and lines of code.

Zenodo 18978813

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 4 files
Software Heritage: not checked
Found in: “Code availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (8 files), NumPy (8 files), SciPy (6 files), Parallel Computing Toolbox (1 file), Statistics and Machine Learning Toolbox (1 file), OpenCV (1 file), pandas (1 file), SPM (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
11 files
At the source:

Code availability

The code that supports the findings of this study is available online on Zenodo: 10.5281/zenodo.18978813.

Reproduced under the paper's license (CC BY), from the paper cited above.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 10 scripts, each with its path and the digest of its content;
  • 12 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability

The data that support the findings of this study are partially available online on Zenodo: 10.5281/zenodo.18978813. Full data will be available from the corresponding author upon reasonable request.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 2 keywords, 6 MeSH terms, 2 funders, 51 references.

Cite

This paper

Jin, Q., Cui, D., & Nelissen, K. (2026). Dynamic spatiotemporal features in action recognition: a multimodal study. Communications biology, 9(1), 734. https://doi.org/10.1038/s42003-026-09917-z

BibTeX

@article{jin2026dynamic,
author = {Jin, Qiuhan and Cui, Ding and Nelissen, Koen},
title = {{Dynamic spatiotemporal features in action recognition: a multimodal study}},
journal = {Communications biology},
year = {2026},
month = apr,
volume = {9},
number = {1},
pages = {734},
publisher = {Nature Publishing Group},
issn = {2399-3642},
doi = {10.1038/s42003-026-09917-z},
url = {https://doi.org/10.1038/s42003-026-09917-z},
pmid = {41933034},
pmcid = {PMC13219507}
}

RIS

TY - JOUR
AU - Jin, Qiuhan
AU - Cui, Ding
AU - Nelissen, Koen
TI - Dynamic spatiotemporal features in action recognition: a multimodal study
T2 - Communications biology
J2 - Commun Biol
PY - 2026
DA - 2026/04/03
VL - 9
IS - 1
SP - 734
SN - 2399-3642
PB - Nature Publishing Group
DO - 10.1038/s42003-026-09917-z
UR - https://doi.org/10.1038/s42003-026-09917-z
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s42003-026-09917-z",
"type": "article-journal",
"title": "Dynamic spatiotemporal features in action recognition: a multimodal study",
"container-title": "Communications biology",
"author": [
{
"family": "Jin",
"given": "Qiuhan"
},
{
"family": "Cui",
"given": "Ding"
},
{
"family": "Nelissen",
"given": "Koen"
}
],
"container-title-short": "Commun Biol",
"volume": "9",
"issue": "1",
"page": "734",
"DOI": "10.1038/s42003-026-09917-z",
"PMID": "41933034",
"PMCID": "PMC13219507",
"ISSN": "2399-3642",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s42003-026-09917-z",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
3
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s42003-026-09834-1 [code]
Distinct perceptual and conceptual representations of natural actions along the lateral and dorsal visual streams.
Journal: Communications biology
In common: cognitive, 8 references
[2] doi:10.1007/s00429-026-03111-x [code]
Direction selectivity in naturalistic action observation: distributed representations across the action observation network.
Journal: Brain structure & function
In common: SPM, Statistics and Machine Learning Toolbox, 5 references
[3] doi:10.1162/imag.a.1207 [code]
Investigating the temporal dynamics and modeling of mid-level feature representations in humans.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: OpenCV, pandas, SciPy, 2 other tools, cognitive, 3 references
[4] doi:10.1038/s41467-026-71151-2 [code]
Common and distinct neural correlates of social interaction processing and theory of mind in narratives.
Journal: Nature communications
In common: Parallel Computing Toolbox, SPM, Statistics and Machine Learning Toolbox, 4 other tools, cognitive, 1 reference
[5] doi:10.1038/s42003-026-10276-y [code]
The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset.
Journal: Communications biology
In common: Parallel Computing Toolbox, SPM, Statistics and Machine Learning Toolbox, 4 other tools, non-human primate
[6] doi:10.1038/s41593-026-02205-3 [code]
Competitive interactions shape mammalian brain network dynamics and computation.
Journal: Nature neuroscience
In common: Parallel Computing Toolbox, SPM, Statistics and Machine Learning Toolbox, 4 other tools, non-human primate
[7] doi:10.1038/s41467-026-71568-9 [code]
Convergent and selective representations of pain, appetitive processes, aversive processes, and cognitive control in the insula.
Journal: Nature communications
In common: Parallel Computing Toolbox, SPM, Statistics and Machine Learning Toolbox, 4 other tools, cognitive
[8] doi:10.1162/imag.a.1309 [code]
Probing the content of semantic representations in body-selective regions.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: OpenCV, pandas, SciPy, 2 other tools, 2 references
[9] doi:10.1016/j.bbih.2026.101299 [code]
Multimodal approach to identify neuropsychophysiological subgroups in myalgic encephalomyelitis/chronic fatigue syndrome and their relevance for rehabilitation: protocol for a mechanistic cross-sectional and longitudinal study.
Journal: Brain, behavior, & immunity - health
In common: Parallel Computing Toolbox, SPM, Statistics and Machine Learning Toolbox, 2 other tools, 1 reference
[10] doi:10.1038/s41597-026-07676-4 [code]
A neuroimaging dataset combining movie-watching, eye-tracking, sensorimotor mapping, and cognitive tasks.
Journal: Scientific data
In common: Parallel Computing Toolbox, SPM, Statistics and Machine Learning Toolbox, 4 other tools

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.