Добавлено описание и документация для HVideoTool, включая функционал, требования, установку и запуск приложения для обнаружения цензуры на изображениях.

This commit is contained in:
Leonid Pershin
2026-06-06 15:11:53 +03:00
parent 10bf87aa47
commit 33f20fe681
28 changed files with 2256 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"""Detector interface. Implement this to plug in a new model (e.g. YOLO)."""
from __future__ import annotations
from abc import ABC, abstractmethod
from ..video.frame import Frame
from .types import Detection
class Detector(ABC):
"""Abstract censorship detector.
Implementations must be safe to call repeatedly on consecutive frames. They
receive a :class:`Frame` and return detections in *source-frame* pixel
coordinates (the same resolution as ``frame.image``).
"""
@property
def name(self) -> str:
return type(self).__name__
@abstractmethod
def detect(self, frame: Frame) -> list[Detection]:
"""Return detected censored regions for ``frame`` (possibly empty)."""
raise NotImplementedError