fix: improve couple things #29

Merged
chawanwit.p merged 3 commits from dev into main 2025-10-20 11:25:11 +00:00
2 changed files with 10 additions and 4 deletions
Showing only changes of commit f495b47a96 - Show all commits

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)