Views
No views yet
Input: (B, N, T=16, F=10)
│
┌─────┴──────┐
│ Temporal │ Causal Dilated TCN (per-track, parallel)
│ Encoder │ 3 blocks, dilations [1,2,4], RF=15 frames
└─────┬──────┘
│ (B, N, 64)
┌─────┴──────┐
│ Cross-Track │ DeepSets Equivariant × 4
│ Context │ f(x_i) = σ(W·x_i + V·mean(X))
└─────┬──────┘ mean(X) ≈ consensus camera motion
│ (B, N, 64)
┌─────┴──────┐
│ Classifier │ MLP → sigmoid → world_probability
│ Head │
└─────┬──────┘
│ (B, N, 1)| # | Feature | Description |
|---|---|---|
| 0 | vx | Velocity X (pixels/frame) |
| 1 | vy | Velocity Y |
| 2 | speed | ‖velocity‖ |
| 3 | accel | ‖acceleration‖ |
| 4 | residual | RANSAC residual error |
| 5 | inlier | RANSAC inlier flag (0/1) |
| 6 | confidence | Tracking confidence [0,1] |
| 7 | visibility | Visible this frame (0/1) |
| 8 | age_norm | Track age / 60 |
| 9 | angular_vel | Change in motion direction |
| File | Description |
|---|---|
track_classifier.py | Full model + TCN streaming + GRU streaming |
data_generator.py | Synthetic data (world, HUD, weapon, scope, recoil) |
train.py | Training loop with masked BCE, class weighting |
inference.py | Batch/streaming demos + latency benchmark |
1from track_classifier import ModelConfig, create_model, create_streaming
2import torch
3
4# Create and load model
5cfg = ModelConfig()
6model = create_model(cfg, device='cuda')
7checkpoint = torch.load('best_model.pt')
8model.load_state_dict(checkpoint['model_state_dict'])
9
10# Streaming inference
11streamer = create_streaming(model, torch.device('cuda'), use_fp16=True)
12
13# Per frame: push features, get classifications
14for track_id, features in your_ransac_output.items():
15 streamer.push_frame(track_id, features)
16
17results = streamer.classify() # {track_id: world_probability}
18world_tracks = [tid for tid, p in results.items() if p > 0.7]python train.pygenerate_dataset() with your annotated tracks.