From edad12841f3be2070e5e06cd4e61ad01e94d91f9 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Thu, 24 Apr 2025 16:55:44 +0200 Subject: [PATCH] fix: some minor errors --- secure_pixelation/pixelation_process.py | 2 +- secure_pixelation/simple_lama_bindings.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/secure_pixelation/pixelation_process.py b/secure_pixelation/pixelation_process.py index 8f38394..3bb17dd 100644 --- a/secure_pixelation/pixelation_process.py +++ b/secure_pixelation/pixelation_process.py @@ -62,7 +62,7 @@ def pixelate_regions(raw_image: RawImage, image: Optional[np.ndarray] = None, pi return image -def pixelate(to_detect: str, generative_impaint: bool = True, debug_drawings: bool = True): +def pixelate(to_detect: str, generative_impaint: bool = True, debug_drawings: bool = False): raw_image = RawImage(to_detect) step_dir = raw_image.get_dir("steps") diff --git a/secure_pixelation/simple_lama_bindings.py b/secure_pixelation/simple_lama_bindings.py index 654aa12..bb3ecd9 100644 --- a/secure_pixelation/simple_lama_bindings.py +++ b/secure_pixelation/simple_lama_bindings.py @@ -1,5 +1,5 @@ import os -from typing import Optional +from typing import Tuple import torch import cv2 @@ -11,7 +11,7 @@ from huggingface_hub import hf_hub_download os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1" -def prepare_img_and_mask(image: np.ndarray, mask: np.ndarray, device: torch.device, pad_out_to_modulo: int = 8, scale_factor: float = 1) -> tuple[torch.Tensor, torch.Tensor]: +def prepare_img_and_mask(image: np.ndarray, mask: np.ndarray, device: torch.device, pad_out_to_modulo: int = 8, scale_factor: float = 1) -> Tuple[torch.Tensor, torch.Tensor]: def get_image(img: np.ndarray): img = img.copy()