Performance Tuning
Balancing Latency vs. Throughput is the key challenge in computer vision.
Strategiesโ
๐๏ธ "I need Speed" (Low Latency)โ
Use this profile if you are demoing the system and need immediate feedback (e.g., <100ms lag).
- Lower
BATCH_WAIT_MS: Set to10ms.- Effect: GPU runs more often with smaller batches. Higher overhead but quicker results.
- Increase
PROCESS_FPS: Set to15+.- Effect: Smoother movements, provided the GPU can keep up.
๐ญ "I need Scale" (High Throughput)โ
Use this profile if you are deploying to a stable with 20+ cameras on limited hardware.
- Increase
BATCH_WAIT_MS: Set to100ms.- Effect: Allows the system to group up to 32 images into one huge batch. Extremely efficient utilization of CUDA cores.
- Lower
PROCESS_FPS: Set to2or3.- Effect: Motion looks "choppy" to a human, but the AI still detects "Standing/Lying" perfectly fine. Saves massive CPU/Decodes resources.
Hardware Sizingโ
| Scenario | GPU VRAM | Recommended Cameras | Config Profile |
|---|---|---|---|
| Dev / Demo | 4 GB | 1 - 4 | Low Latency |
| Small Stable | 8 GB | 5 - 12 | Balanced |
| Commercial | 24 GB (A10G) | 30 - 50 | High Throughput |