Enhance documentation and UI for HVideoTool: added restoration feature for detected regions, updated layout for collection controls, and improved navigation bar. Clarified tool capabilities and limitations in README and CLAUDE.md.

This commit is contained in:
Leonid Pershin
2026-06-06 15:44:14 +03:00
parent 33f20fe681
commit ddc8543647
8 changed files with 419 additions and 35 deletions
+26
View File
@@ -0,0 +1,26 @@
"""Restorer interface — "un-censor" detected regions of an image.
A Restorer takes an image plus the detected censored regions and returns a new
image with those regions reconstructed/filled. This mirrors the ``Detector``
abstraction so different engines (classic inpaint now; a generative model like
DeepMosaics / LADA later) plug in behind the same interface.
"""
from __future__ import annotations
from abc import ABC, abstractmethod
import numpy as np
from ..detection.types import Detection
class Restorer(ABC):
@property
def name(self) -> str:
return type(self).__name__
@abstractmethod
def restore(self, image: np.ndarray, detections: list[Detection]) -> np.ndarray:
"""Return a copy of ``image`` with the detected regions reconstructed."""
raise NotImplementedError