File size: 866 Bytes
8fb6272
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from abc import ABC, abstractmethod
from typing import List, Tuple, Dict, Any
from ..entities.detection import DetectionResult

class DetectorInterface(ABC):
    """Interface base para detectores de objetos perigosos."""
    
    @abstractmethod
    def process_video(self, video_path: str, fps: int, threshold: float, resolution: int) -> Tuple[str, DetectionResult]:
        """Processa um vídeo e retorna as detecções encontradas."""
        pass
    
    @abstractmethod
    def clean_memory(self) -> None:
        """Limpa a memória utilizada pelo detector."""
        pass
    
    @abstractmethod
    def get_device_info(self) -> Dict[str, Any]:
        """Retorna informações sobre o dispositivo em uso."""
        pass
    
    @abstractmethod
    def get_cache_stats(self) -> Dict[str, Any]:
        """Retorna estatísticas do cache."""
        pass