CRICKET / code /config.yaml
d9993r's picture
Add files using upload-large-folder tool
14c58d8 verified
Raw History Blame Contribute Delete
6.46 kB
# Cricket SFT data pipeline - offline prototype.
# Every path here is RELATIVE to the project root (the folder that contains code/).
#
# CRICKET-SFT-DATA/
# code/ scripts (this file)
# datasets/ your video folders, e.g. datasets/1_Full-Net-Sessions-Uncut/*.mp4
# models/ YOLO weights (downloaded here automatically on first run)
# results/ everything the pipeline writes
project:
site_id: DEVYT01
site_short: DEV
pipeline_version: "0.4.3"
experiment_file: experiments/EXP_YT_PIPELINE_DEV_V01.yaml # relative to code/
annotator_default: reviewer_01
paths:
datasets: datasets
models: models
results: results
models:
pose_weights: yolo11n-pose.pt # 17 COCO keypoints per person
det_weights: yolo11n.pt # COCO class 32 = sports ball
bat_weights: null # e.g. bat_cricket_v1.pt from train_bat.py; null = estimate the bat from the hands
device: auto # auto = GPU if it really works, else CPU. Or 0, or "cpu"
half: true # FP16, GPU only
cpu_format: pytorch # set to "openvino" for ~2-3x faster CPU inference (Intel CPUs)
pass1: # whole video, cheap: find shots + release candidates
stride: auto # auto = analyse at least min_analysed_fps frames per video second
min_analysed_fps: 25 # the arm passes over the head in ~0.1 s; sparser sampling misses it
pose_imgsz: 640
pose_conf: 0.25
cut_threshold: 0.45 # HSV histogram correlation below this = camera cut
cpu_overrides: # applied automatically when running on CPU
pass1: {pose_imgsz: 512}
pass2: {pose_imgsz: 512, ball_imgsz: 960}
pass2: # each delivery window, full frame rate
pose_imgsz: 640
ball_imgsz: 1280 # the ball is tiny; detect it at higher resolution
ball_conf: 0.10
ball_track_s: 1.2 # real seconds after release to look for the ball
window: # delivery window around release, in REAL seconds
pre_s: 2.5
post_s: 1.5
min_len_s: 1.0
release:
min_wrist_height: 0.5 # wrist above shoulder, in torso lengths (straight up ~1.1)
min_wrist_speed: 8.0 # torso lengths per real second near release
from_below: 0.2 # before the peak the wrist must have been below this height
refractory_s: 3.0 # one delivery per 3 real seconds at most
ffc: # foot plants, run-up and follow-through
max_ankle_speed: 2.0 # planted foot: torso lengths per real second
search_s: 0.4 # front foot lands within this many real seconds before release
bfc_search_s: 0.5 # back foot lands within this before front-foot contact
run_speed: 1.0 # hips moving faster than this (torso/s) = running in
followthrough_fraction: 0.2 # follow-through ends when wrist speed < this x its peak
followthrough_max_s: 1.5
batter: # batter events (section 7.3)
trigger_speed: 0.8 # hips/feet faster than this (torso/s) after standing still = trigger
trigger_before_s: 0.8 # search window around the bowler's release (real seconds)
trigger_after_s: 0.4
shot_min_speed: 3.0 # hands must move at least this fast for a shot
shot_max_s: 1.5
followthrough_fraction: 0.2
audio:
contact_from_sound: true # confirm or add bat contact from the bat-on-ball sound
min_onset_ratio: 6.0 # onset must be this many times the clip's median sound change
transcribe: false # speech to text (pip install faster-whisper; downloads a model once)
whisper_model: small # tiny | base | small | medium (bigger = slower, more accurate)
language: null # null = auto-detect, or e.g. "en", "hi", "ta"
# One entry per folder inside datasets/. time_scale = how many times slower than
# real life the video plays (slow-motion 240 fps shown at 30 fps -> 8).
categories:
1_Full-Net-Sessions-Uncut:
category: nets_uncut
view_description: "a nets practice session filmed from a fixed or semi-fixed camera"
time_scale: 1.0
2_Bowling-Action-Slow-Motion:
category: slowmo_action
view_description: "a slow-motion close-up of the bowler's action"
time_scale: 4.0
time_scale_verified: false # set true once you know the real slow-down factor
"3_Batter's-View":
category: batter_pov
view_description: "a helmet-camera view from the batter facing the bowler"
time_scale: 1.0
pose_imgsz: 960 # bowler is far away in this view
4_Phone-Sessions:
category: phone_session
view_description: "a phone recording of an academy nets session"
time_scale: 1.0
multiview: # several cameras filming the same session = one delivery, many views
match_tolerance_s: 0.25 # releases this close (after sync) are the same delivery
use_audio: true # coarse sync from the sound (clap at the start helps)
sessions: []
# - id: MV_NETS_20261020 # one entry per recorded session
# reference: C2 # its clock is the session clock
# views: # camera id -> file under datasets/
# C1: 4_Phone-Sessions/2026-10-20_C1_bowler_side.mp4
# C2: 4_Phone-Sessions/2026-10-20_C2_behind_bowler.mp4
# C3: 4_Phone-Sessions/2026-10-20_C3_batter_side.mp4
# C4: 4_Phone-Sessions/2026-10-20_C4_front_of_batter.mp4
labeling:
frames_per_delivery: 4 # frames per delivery offered in the Ball labels tab
overrides: {} # per-file tweaks, matched by filename substring, e.g.
# "1_slow-bowling-21-sec": {time_scale: 8.0, time_scale_verified: true}
rights_default: # standard section 10.2 - recorded on every source
source_category: youtube_download
provider: "YouTube uploader (see title)"
collection_method: downloaded_video
rights_basis: "UNVERIFIED - internal pipeline prototyping only"
training_allowed: false
commercial_use_allowed: false
personal_data: true
sft:
min_confidence: 0.4 # facts below this are not turned into Q/A pairs
system_prompt: >-
You are a cricket video analyst. Answer only from what is visible in the clip.
Measurements are 2D estimates from video, not calibrated 3D values.