Refactor HVideoTool to support project-based workflow: introduced project management features, updated UI for project handling, and enhanced documentation in README and CLAUDE.md. The tool now organizes images and settings into projects, improving usability and detection caching.

This commit is contained in:
Leonid Pershin
2026-06-07 04:53:27 +03:00
parent 7f0121b7df
commit e27dfdf518
27 changed files with 2998 additions and 387 deletions
+8 -2
View File
@@ -13,7 +13,7 @@ import cv2
import numpy as np
from ..detection.types import Detection
from .base import Restorer
from .base import CancelCheck, Restorer
from .mask import detections_to_mask
@@ -27,7 +27,13 @@ class InpaintRestorer(Restorer):
def name(self) -> str:
return f"InpaintRestorer({self.method})"
def restore(self, image: np.ndarray, detections: list[Detection]) -> np.ndarray:
def restore(
self,
image: np.ndarray,
detections: list[Detection],
should_cancel: CancelCheck | None = None,
) -> np.ndarray:
# Single cv2.inpaint call — effectively instant, so cancellation is moot.
if not detections:
return image.copy()
mask = detections_to_mask(image.shape, detections, dilate=self.dilate)