Skip to main content

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).

  1. Lower BATCH_WAIT_MS: Set to 10ms.
    • Effect: GPU runs more often with smaller batches. Higher overhead but quicker results.
  2. Increase PROCESS_FPS: Set to 15+.
    • 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.

  1. Increase BATCH_WAIT_MS: Set to 100ms.
    • Effect: Allows the system to group up to 32 images into one huge batch. Extremely efficient utilization of CUDA cores.
  2. Lower PROCESS_FPS: Set to 2 or 3.
    • Effect: Motion looks "choppy" to a human, but the AI still detects "Standing/Lying" perfectly fine. Saves massive CPU/Decodes resources.

Hardware Sizingโ€‹

ScenarioGPU VRAMRecommended CamerasConfig Profile
Dev / Demo4 GB1 - 4Low Latency
Small Stable8 GB5 - 12Balanced
Commercial24 GB (A10G)30 - 50High Throughput