fix: increase tracking thread and lower tracking min confidence
All checks were successful
Build Worker Base and Application Images / check-base-changes (push) Successful in 7s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Successful in 3m39s
Build Worker Base and Application Images / deploy-stack (push) Successful in 16s

This commit is contained in:
ziesorx 2025-10-20 18:04:23 +07:00
parent 0dd1b9f5c2
commit f495b47a96
2 changed files with 10 additions and 4 deletions

View file

@ -70,7 +70,8 @@ class TrackingPipelineIntegration:
self.abandonment_timeout = 3.0 # seconds to wait before declaring car abandoned
# Thread pool for pipeline execution
self.executor = ThreadPoolExecutor(max_workers=2)
# Increased to 8 workers to handle 8 concurrent cameras without queuing
self.executor = ThreadPoolExecutor(max_workers=8)
# Min bbox filtering configuration
# TODO: Make this configurable via pipeline.json in the future

View file

@ -56,10 +56,15 @@ class StableCarValidator:
self.config = config or {}
# Validation thresholds
self.min_stable_duration = self.config.get('min_stable_duration', 3.0) # seconds
self.min_stable_frames = self.config.get('min_stable_frames', 10)
# Optimized for 6 FPS RTSP source with 8 concurrent cameras on GPU
# GPU contention reduces effective FPS to ~3-5 per camera
# Reduced from 3.0s to 1.5s to achieve ~2.75s total validation time (was ~4.25s)
self.min_stable_duration = self.config.get('min_stable_duration', 1.5) # seconds
# Reduced from 10 to 5 to align with tracker requirement and reduce validation time
self.min_stable_frames = self.config.get('min_stable_frames', 5)
self.position_variance_threshold = self.config.get('position_variance_threshold', 25.0) # pixels
self.min_confidence = self.config.get('min_confidence', 0.7)
# Reduced from 0.7 to 0.45 to be more permissive under GPU load
self.min_confidence = self.config.get('min_confidence', 0.45)
self.velocity_threshold = self.config.get('velocity_threshold', 5.0) # pixels/frame
self.entering_zone_ratio = self.config.get('entering_zone_ratio', 0.3) # 30% of frame
self.leaving_zone_ratio = self.config.get('leaving_zone_ratio', 0.3)