# Layered computer-vision volleyball analysis — `iS3G8p90TYY`

## What I built and ran

I added several machine-vision layers on top of the earlier visual/transcript review:

1. **Bounded dense evidence extraction**
   - 1 fps dense sheets for selected high-activity windows.
   - Avoided random-seeking the full 79-minute file; bounded windows are much faster and more useful.

2. **Classical OpenCV layer**
   - 2 fps extraction on 8 candidate windows.
   - Frame-difference motion/activity metrics.
   - HSV clothing-color blob detection for blue, pink/burgundy, white/light, skin/shirtless, dark clothing.
   - Hough/motion small-object ball-candidate detection.
   - Annotated contact sheets per window.

3. **YOLO object-detection layer**
   - Installed CPU-only Ultralytics/torch in isolated venv: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/cv_env`.
   - Ran `yolov8n.pt` over 5 strongest windows at 1 fps for `person` and `sports ball` candidates.
   - Generated annotated detection sheets.

4. **YOLO pose layer**
   - Ran `yolov8n-pose.pt` at reduced cadence for pose/person-keypoint hints.
   - Useful mainly to confirm person presence; too wide/fisheye for reliable volleyball technique analysis.

5. **Simple tracking layer**
   - Greedy center-distance tracklets over YOLO person detections at 1 fps.
   - Clothing-label heuristic per tracklet.
   - Summaries of long-visible players, person counts, and ball-candidate times.

## Artifacts

Source video:

- `/home/kristjan-variksoo/youtube-downloads/vorkpall_1 [iS3G8p90TYY].mp4`
- SHA-256: `14fbf0e7a8e8e22863a455fa536a07a116dfca8f18c1c316fb2e78454127fb67`
- Duration: `4768.901 s`
- Video: H.264 1920×1080 30 fps

Reports / summaries:

- First pass: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/reports/first_pass_volleyball_analysis.md`
- Enhanced visual pass: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/reports/enhanced_best_effort_volleyball_analysis.md`
- Classical CV summary: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/cv/classical/cv_summary.md`
- YOLO summary: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/cv/yolo/yolo_summary.md`
- Tracklet summary: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/cv/yolo/tracks/tracking_summary.md`

Annotated evidence sheets:

- Classical annotated sheets: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/cv/classical/sheets/`
- YOLO detection sheets: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/cv/yolo/sheets/`
- Dense review sheets: `/home/kristjan-variksoo/volleyball-analysis-iS3G8p90TYY/deep/dense_review/sheets/`

## What the CV layers confirmed

### Player/person detection is useful

YOLO person detections are mostly meaningful. They consistently identify the visible players even with the wide/fisheye view.

Mean YOLO person detections in key windows:

- `00:11:50–00:13:50`: mean `3.58`, max `7`
- `00:34:20–00:36:30`: mean `3.20`, max `6`
- `00:55:20–00:57:20`: mean `3.05`, max `5`
- `01:04:50–01:07:20`: mean `2.88`, max `6`
- `01:12:30–01:13:20`: mean `3.98`, max `7`

Interpretation:

- The active play is generally 3–4 clearly visible participants, with additional detections when players are close to camera, overlapped, or split by the model.
- The late net-action window has the strongest multi-player detection density.

### Tracklets support the same most-involved players

The tracking layer is not robust identity tracking, but it is good enough to support involvement/visibility claims.

Strong long-visible tracklets:

- `00:11:50–00:13:50`
  - blue/turquoise track: `00:11:52–00:13:28`, 89 observations.
  - black/pink tracklets: long and repeated from `00:11:50–00:13:49`.
  - white/light track around `00:12:42–00:12:52`.

- `00:34:20–00:36:30`
  - blue/turquoise: `00:34:39–00:35:46`, 62 observations.
  - white/light: `00:35:37–00:36:29`, 53 observations.
  - black/pink: repeated tracklets across `00:34:20–00:36:26`.

- `00:55:20–00:57:20`
  - blue/turquoise: `00:55:44–00:57:19`, 95 observations.
  - black/pink: `00:55:55–00:56:46`, 51 observations; then `00:56:53–00:57:19`, 26 observations.
  - white/light: `00:55:20–00:56:22`, 50 observations.

- `01:04:50–01:07:20`
  - white/light: `01:05:34–01:07:19`, 105 observations.
  - black/pink: `01:06:19–01:07:06`, 48 observations.
  - blue/turquoise: `01:05:38–01:06:26`, 42 observations.

- `01:12:30–01:13:20`
  - black/pink: `01:12:30–01:13:19`, 47 observations.
  - blue/turquoise: `01:12:30–01:13:16`, 45 observations.
  - additional black/pink/white-light short tracklets around the net/reset.

Interpretation:

- The earlier qualitative involvement ranking is strengthened by machine evidence:
  1. black sleeveless + pink/burgundy shorts
  2. blue/turquoise shirt + black shorts
  3. white/`ENGLAND #7` / white-light participants
- The `ENGLAND #7` identity is visually clearest to humans, but the simple clothing classifier often groups it as `white/light` rather than preserving the number.

### Ball detection is useful only as a candidate generator

YOLO `sports ball` detections and classical Hough/motion ball candidates are helpful for triage, but not reliable enough for fully automatic point detection.

Reasons:

- the actual ball is small;
- sky/tree texture creates false positives;
- players' heads/hands/sand marks can trigger `sports ball` boxes;
- model sometimes detects a real ball, sometimes a non-ball object.

Best-supported ball/action candidate times:

- `00:11:51`, `00:11:53`, `00:12:18`, `00:12:20`, `00:13:08`
- `00:34:48`, `00:34:49`, `00:35:14`
- `00:55:45`, `00:55:49`, `00:55:52`, `00:56:56`, `00:57:02`, `00:57:09–00:57:12`
- `01:05:00–01:05:03`, `01:05:55–01:05:57`, `01:06:05`, `01:07:03`
- `01:12:38`, `01:12:41`, `01:13:18`

Visual validation result:

- `01:12:38` and `01:12:41` are plausible/meaningful ball detections in the late net-action sequence.
- `01:13:18` is likely the ball during a reset/near-player handling moment.
- Several other model ball hits are candidates only and should be checked visually before claiming contacts/outcomes.

## Strongest machine-supported action windows

### 1. `01:12:38–01:12:45` — strongest late action

Machine evidence:

- High person density in the `01:12:30–01:13:20` window: mean `3.98`, max `7` persons.
- YOLO sports-ball candidates at `01:12:38` and `01:12:41`.
- Long black/pink and blue tracklets throughout the window.
- Visual dense sheet shows black/pink raising arms near net/right side, with blue close, `ENGLAND #7` tracking from left, and a far/right player ending on the sand around `01:12:44–01:12:45`.

Best interpretation:

- A real short rally/exchange with an overhead set/controlled return by black/pink, followed by a defensive scramble/dive or failed save on the far/right side.
- This is the best highlight candidate.
- Point winner is still not visible enough to claim.

### 2. `00:34:31–00:36:10` — strongest middle sustained rally area

Machine evidence:

- YOLO sees 3.2 persons on average, max 6.
- Blue track: `00:34:39–00:35:46`, 62 observations.
- White/light track: `00:35:37–00:36:29`, 53 observations.
- Multiple black/pink tracklets across the window.
- Ball candidates around `00:34:48`, `00:34:49`, `00:35:14` plus visually observed ball-in-air frames.

Best interpretation:

- Sustained informal rally/reset sequence with blue and black/pink central, white/light and shirtless/near-side players involved.
- Several set/return-like moments, but no clean endpoint.

### 3. `00:55:44–00:57:12` — active fragmented rallies

Machine evidence:

- Blue track: `00:55:44–00:57:19`, 95 observations.
- Black/pink track: `00:55:55–00:56:46`, 51 observations, plus later continuation.
- White/light track: `00:55:20–00:56:22`, 50 observations.
- Ball candidates at `00:55:45`, `00:55:49`, `00:55:52`, `00:56:56`, `00:57:02`, `00:57:09–00:57:12`.

Best interpretation:

- Multiple short exchanges and resets.
- Strong involvement by blue and black/pink, with white/light/`ENGLAND #7` participation around the first part.

### 4. `00:11:50–00:13:50` — early active stretch

Machine evidence:

- Mean person count 3.58, max 7.
- Long blue track from `00:11:52–00:13:28`.
- Multiple black/pink tracklets throughout.
- Ball candidates around `00:11:51`, `00:11:53`, `00:12:18`, `00:12:20`, `00:13:08`.

Best interpretation:

- Early real play with multiple low/defensive moments, including the visually identified low/dive-like action around `00:12:17–00:12:22`.

## What remains impossible even with CV

The CV layers do **not** solve scoring.

Still not recoverable without inventing:

- exact score;
- set count;
- final winner;
- rally-by-rally point log;
- kills/blocks/aces/errors counts;
- true best/worst player ranking.

Why:

- no scoreboard;
- no reliable score audio;
- no continuous possession/ball tracking through occlusions;
- net/pole blocks center of play;
- automatic ball detector is only candidate-level, not robust tracking.

## Final CV-backed conclusion

The best evidence-backed analysis is now:

- The most machine-supported participants are black/pink and blue/turquoise, with white/`ENGLAND #7` clearly identifiable and involved in multiple defensive/recovery windows.
- The best highlight candidate is `01:12:38–01:12:45`.
- The best sustained rally-analysis window is `00:34:31–00:36:10`.
- The best fragmented multi-rally cluster is `00:55:44–00:57:12`.
- The best early defensive/low-action cluster is `00:11:50–00:13:50`, especially around `00:12:17–00:12:22` and `00:13:07–00:13:14`.

If pushed further, the next useful step is not another broad scan. It is a **manual/semi-automatic event-tagging pass** over these 4 windows using the original 30 fps video, with the CV outputs as timestamp guides.
