33This repository contains action classification and statistical analysis for
44locomotion and repetitive motor movement behaviors in the SAILS video dataset.
55
6- The project is organized as a research pipeline :
6+ The project is organized as:
77
881 . Detect people and estimate whole-body pose from videos.
992 . Track people across frames and identify the target child.
@@ -40,7 +40,9 @@ The project is organized as a research pipeline:
4040Code: ` src/sailsprep/id_tracking_model/ `
4141
4242This part of the repository generates detection and pose caches, tracks people
43- across frames, and selects the target child track.
43+ across frames, and selects the target child track. See
44+ [ ` src/sailsprep/id_tracking_model/README.md ` ] ( src/sailsprep/id_tracking_model/README.md )
45+ for the full pipeline and command reference.
4446
4547Important modules:
4648
@@ -57,7 +59,10 @@ Important modules:
5759Code: ` src/sailsprep/tracking_pose_model_testing/ `
5860
5961This directory contains scripts for testing or wrapping individual tracking and
60- pose-estimation methods:
62+ pose-estimation methods. See
63+ [ ` src/sailsprep/tracking_pose_model_testing/README.md ` ] ( src/sailsprep/tracking_pose_model_testing/README.md )
64+ for which scripts are single-video demos versus CSV/SLURM batch pipelines,
65+ and the corresponding install groups:
6166
6267- YOLO pose
6368- HRNet
@@ -76,29 +81,37 @@ and visualized outputs.
7681Code: ` src/sailsprep/action_model_testing/ `
7782
7883This directory contains the model-training and inference scripts used for action
79- classification experiments.
84+ classification experiments. See
85+ [ ` src/sailsprep/action_model_testing/README.md ` ] ( src/sailsprep/action_model_testing/README.md )
86+ for the full list of model folders, and each model folder's own README for
87+ setup and usage specific to that model.
8088
8189Included model families:
8290
83- - ` Video_Swin /` - clip-based, binary sliding-window, full-video sliding-window,
91+ - ` video_swin /` - clip-based, binary sliding-window, full-video sliding-window,
8492 and two-stage Video Swin pipelines.
85- - ` Videomaev2 /` - VideoMAE v2 finetuning and sliding-window variants.
86- - ` InternVideo_v2 /` - InternVideo2 finetuning and inference.
93+ - ` videomae2 /` - VideoMAE v2 finetuning and sliding-window variants.
94+ - ` internvideo2 /` - InternVideo2 finetuning and inference.
8795- ` slow_fast/ ` - SlowFast finetuning.
8896- ` motionbert/ ` - MotionBERT pose/action pipeline.
8997- ` mstcn2/ ` - MS-TCN++ sequence model over extracted features.
90- - ` OpenTAD/ ` - temporal action detection experiments.
91- - ` pyskl/ ` - PySKL config/logit utilities.
92- - ` vlm_models/ ` - Qwen/Ovis vision-language model classifiers.
93- - ` feature_extraction/ ` - I3D/R(2+1)D and V-JEPA feature extraction.
94- - ` vjepa/ ` - vjepa model variants.
95- - ` dlc_action/ ` - DLC2Action data preparation workflow.
98+ - ` open_tad/ ` - temporal action detection experiments (requires the OpenTAD
99+ codebase).
100+ - ` pyskl/ ` - PySKL config generation, training helpers, and logit fusion
101+ (requires the PySKL codebase).
102+ - ` vlm_models/ ` - Qwen2.5-VL/Ovis2 vision-language model classifiers.
103+ - ` feature_extraction/ ` - I3D/R(2+1)D and V-JEPA2 feature extraction.
104+ - ` vjepa/ ` - V-JEPA2 feature extraction, probe training, and fine-tuning
105+ variants.
106+ - ` dlc_action/ ` - DLC2Action data preparation and training pipeline.
96107
97108### Fusion Models
98109
99110Code: ` src/sailsprep/fusion_model/ `
100111
101- Fusion scripts combine predictions from multiple model families.
112+ Fusion scripts combine predictions from multiple model families. See
113+ [ ` src/sailsprep/fusion_model/README.md ` ] ( src/sailsprep/fusion_model/README.md )
114+ for full usage.
102115
103116- ` late_fusion/two_model.py ` - late fusion between two prediction sources.
104117- ` late_fusion/three_model.py ` - late fusion among three prediction sources.
@@ -111,7 +124,9 @@ Fusion scripts combine predictions from multiple model families.
111124Code: ` src/sailsprep/analysis/ `
112125
113126Behavior-specific analysis scripts extract kinematic features from pose tracks
114- and run statistical analyses. Behaviors include:
127+ and run statistical analyses. See
128+ [ ` src/sailsprep/analysis/README.md ` ] ( src/sailsprep/analysis/README.md ) for
129+ run order, inputs, and outputs. Behaviors include:
115130
116131- walking
117132- running
@@ -133,7 +148,9 @@ leave-one-subject-out classification.
133148Code: ` src/sailsprep/annotation/ `
134149
135150The annotation tool is a FastAPI application with a browser UI for reviewing
136- videos and assigning frame-level behavior labels.
151+ videos and assigning frame-level behavior labels. See
152+ [ ` src/sailsprep/annotation/README.md ` ] ( src/sailsprep/annotation/README.md )
153+ for the API endpoints and label set.
137154
138155``` bash
139156uvicorn sailsprep.annotation.annotation:app --reload
@@ -159,40 +176,54 @@ poetry install --with dev
159176poetry run pytest
160177```
161178
162- Many model pipelines require optional heavy dependencies. Install only the
163- groups needed for the experiment you want to reproduce.
164-
165- Examples:
179+ Many model pipelines require optional heavy dependencies. ` pyproject.toml `
180+ defines the following optional Poetry groups; install only the ones needed
181+ for the experiment you want to reproduce.
166182
167183``` bash
168184# Pose/tracking experiments
169185poetry install --with dev,pose-estimation,tracking
170186
187+ # EntitySAM
188+ poetry install --with dev,entity-sam
189+
190+ # ViTPose
191+ poetry install --with dev,vitpose
192+
193+ # Clip-level tracker (MMDetection/MMPose-based)
194+ poetry install --with dev,clip_tracker
195+
196+ # DLC2Action
197+ poetry install --with dev,dlc2action
198+
171199# Video Swin experiments
172- poetry install --with dev,Video_Swin
200+ poetry install --with dev,video_swin
173201
174- # VideoMAE / feature extraction style experiments
202+ # I3D / R(2+1)D / V-JEPA2 feature extraction
175203poetry install --with dev,feature-extraction
176204
177- # Vision-language model experiments
205+ # Vision-language model experiments (Qwen2.5-VL / Ovis2)
178206poetry install --with dev,vlm
179207
180208# OpenTAD experiments
181209poetry install --with dev,opentad
182210
211+ # Statistical analysis (statsmodels, optionally rpy2/pymc/arviz)
212+ poetry install --with dev,stats-analysis
213+
183214# Documentation
184215poetry install --with docs
185216```
186217
187- Some third-party model stacks, especially PySKL, OpenTAD, MMDetection, MMPose,
188- and CUDA-specific video libraries, may require separate environment setup on an
189- HPC system. The job scripts in ` jobs/ ` show the environments used for the
190- original experiments.
218+ There is no Poetry group for VideoMAE2, InternVideo2, SlowFast, MotionBERT,
219+ MS-TCN++, or PySKL — those model folders list their own dependencies to
220+ ` pip install ` directly in their README. Some third-party model stacks,
221+ especially PySKL, OpenTAD, MMDetection, MMPose, and CUDA-specific video
222+ libraries, may require separate environment setup.
191223
192224## Data Requirements
193225
194- The SAILS videos and derived data are not included in this repository. To
195- reproduce the full results, prepare the following inputs:
226+ To reproduce the full results, prepare the following inputs:
196227
1972281 . Raw or standardized SAILS videos (this repo used videos from bids preprocessed folder).
1982292 . A split CSV with train/validation/test assignments.
@@ -314,40 +345,35 @@ need to be generated.
314345
315346### 5. Train Action Models
316347
317- Representative examples:
348+ The scripts in ` action_model_testing/ ` mostly import their shared helpers with
349+ bare imports (e.g. ` from common.utils import ... ` , `from utils.bbox import
350+ ...`), so each script is meant to be run with its own folder as the current
351+ directory, not as a ` python -m ` module. See the model's own README (linked
352+ from
353+ [ ` src/sailsprep/action_model_testing/README.md ` ] ( src/sailsprep/action_model_testing/README.md ) )
354+ for exact commands. Representative examples:
318355
319356``` bash
320357# Video Swin full-video sliding-window classifier
321- python -m sailsprep.action_model_testing.Video_Swin.sliding_window.video_swin_fullvideo_sliding \
322- --task loco \
323- --seed 42
358+ cd src/sailsprep/action_model_testing/video_swin/sliding_window
359+ python video_swin_fullvideo_sliding.py --task loco --seed 42
324360
325361# Video Swin binary N/A vs non-N/A classifier
326- python -m sailsprep.action_model_testing.Video_Swin.sliding_window.video_swin_binary_sliding \
327- --task rmm \
328- --seed 42
362+ python video_swin_binary_sliding.py --task rmm --seed 42
329363
330364# Video Swin two-stage classifier
331- python -m sailsprep.action_model_testing.Video_Swin.sliding_window.video_swin_twostage_joint \
332- --task loco \
333- --seed 42
365+ python video_swin_twostage_joint.py --task loco --seed 42
334366
335367# VideoMAE2 full-video sliding-window classifier
336- python -m sailsprep.action_model_testing.Videomaev2.videomae2_fullvideo_sliding \
337- --task loco \
338- --seed 42
368+ cd ../../videomae2
369+ python videomae2_fullvideo_sliding.py --task loco --seed 42
339370
340371# VideoMAE2 two-stage classifier
341- python -m sailsprep.action_model_testing.Videomaev2.videomae2_twostage_sliding \
342- --task rmm \
343- --seed 42
372+ python videomae2_twostage_sliding.py --task rmm --seed 42
344373
345374# MS-TCN++ over extracted features
346- python -m sailsprep.action_model_testing.mstcn2.mstcn2 \
347- --label loco \
348- --feature_type i3d \
349- --action train \
350- --seed 42
375+ cd ../mstcn2
376+ python mstcn2.py --label loco --feature_type i3d --action train --seed 42
351377```
352378
353379Most reported model experiments are run over three seeds:
@@ -451,14 +477,22 @@ Common edits:
451477
452478Representative job scripts:
453479
454- - ` jobs/action_model_testing/Video_Swin/sliding_window/Video_Swin_full_video_multi_job .sh `
455- - ` jobs/action_model_testing/Video_Swin/sliding_window/Video_Swin_full_video_multi_job_twostage .sh `
480+ - ` jobs/action_model_testing/Video_Swin/sliding_window/video_swin_full_video_multi_job .sh `
481+ - ` jobs/action_model_testing/Video_Swin/sliding_window/video_swin_full_video_multi_job_twostage .sh `
456482- ` jobs/action_model_testing/Video_Swin/sliding_window/full_video_window_job_video_swin.sh `
457- - ` jobs/action_model_testing/Videomaev2/Videomaev2_submit_all.sh `
483+ - ` jobs/action_model_testing/videomae2/videomae2_job.sh `
484+ - ` jobs/action_model_testing/videomae2/videomae2_submit_all.sh `
485+ - ` jobs/action_model_testing/internvideo2/internvideo2_finetune.sh `
486+ - ` jobs/action_model_testing/motionbert/motionbert.sh `
458487- ` jobs/action_model_testing/mstcn2/mstcn2.sh `
459488- ` jobs/action_model_testing/slow_fast/slow_fast.sh `
489+ - ` jobs/action_model_testing/slow_fast/ablation/slowfast_ablation_job.sh `
490+ - ` jobs/action_model_testing/feature_extraction/i3d_r2p1d_feature_extracion.sh `
491+ - ` jobs/action_model_testing/feature_extraction/vjepa_feature_extracion.sh `
460492- ` jobs/action_model_testing/vlm_models/clips/submit_qwen_clip.sh `
461493- ` jobs/action_model_testing/vlm_models/clips/submit_ovis_clip.sh `
494+ - ` jobs/action_model_testing/pyskl/pyskl_job.sh `
495+ - ` jobs/action_model_testing/pyskl/test_job.sh `
462496- ` jobs/fusion_model/pyskl/train_pyskl_sw.sh `
463497- ` jobs/fusion_model/pyskl/test_pyskl_sw.sh `
464498- ` jobs/analysis/analysis_job.sh `
0 commit comments