Refactor: Phase 7: Dead Code Removal & Optimization

This commit is contained in:
ziesorx 2025-09-12 16:15:37 +07:00
parent accefde8a1
commit af34f4fd08
13 changed files with 2654 additions and 2609 deletions

View file

@ -15,8 +15,8 @@ from ..core.constants import (
LIGHTWEIGHT_DETECTION_MIN_BBOX_AREA_RATIO,
DEFAULT_MIN_CONFIDENCE
)
from ..core.exceptions import ValidationError, create_detection_error
from ..detection.detection_result import LightweightDetectionResult, BoundingBox
from ..core.exceptions import create_detection_error
from ..detection.detection_result import LightweightDetectionResult
logger = logging.getLogger(__name__)

View file

@ -9,10 +9,8 @@ import time
import logging
from typing import Dict, List, Any, Optional, Tuple, Set
from dataclasses import dataclass, field
from datetime import datetime
from ..core.constants import SESSION_TIMEOUT_SECONDS
from ..core.exceptions import TrackingError, create_detection_error
logger = logging.getLogger(__name__)

View file

@ -5,15 +5,12 @@ This module provides the main detection functionality combining YOLO object dete
with BoT-SORT tracking for stable track validation.
"""
import cv2
import logging
from typing import Dict, List, Any, Optional, Tuple, Set
from dataclasses import dataclass, field
from datetime import datetime
from ..core.constants import DEFAULT_STABILITY_THRESHOLD, DEFAULT_MIN_CONFIDENCE
from ..core.exceptions import DetectionError, create_detection_error
from ..detection.detection_result import DetectionResult, BoundingBox, DetectionSession
logger = logging.getLogger(__name__)