Blurサイズ問題の修正
This commit is contained in:
@@ -32,6 +32,7 @@ class AsyncBakeGenerator:
|
||||
detections_path: str,
|
||||
output_path: str,
|
||||
blur_size: int,
|
||||
display_scale: float,
|
||||
fmt: str,
|
||||
on_complete: Optional[Callable] = None,
|
||||
on_progress: Optional[Callable] = None,
|
||||
@@ -53,7 +54,7 @@ class AsyncBakeGenerator:
|
||||
|
||||
self.worker_thread = threading.Thread(
|
||||
target=self._worker,
|
||||
args=(video_path, detections_path, output_path, blur_size, fmt),
|
||||
args=(video_path, detections_path, output_path, blur_size, display_scale, fmt),
|
||||
daemon=True,
|
||||
)
|
||||
self.worker_thread.start()
|
||||
@@ -75,6 +76,7 @@ class AsyncBakeGenerator:
|
||||
detections_path: str,
|
||||
output_path: str,
|
||||
blur_size: int,
|
||||
display_scale: float,
|
||||
fmt: str,
|
||||
):
|
||||
import time
|
||||
@@ -88,6 +90,7 @@ class AsyncBakeGenerator:
|
||||
detections_path=detections_path,
|
||||
output_path=output_path,
|
||||
blur_size=blur_size,
|
||||
display_scale=display_scale,
|
||||
fmt=fmt,
|
||||
)
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ class AsyncMaskGenerator:
|
||||
fps: float,
|
||||
conf_threshold: float = 0.5,
|
||||
iou_threshold: float = 0.45,
|
||||
mask_scale: float = 1.5,
|
||||
on_complete: Optional[Callable] = None,
|
||||
on_progress: Optional[Callable] = None,
|
||||
):
|
||||
@@ -94,7 +93,6 @@ class AsyncMaskGenerator:
|
||||
fps,
|
||||
conf_threshold,
|
||||
iou_threshold,
|
||||
mask_scale,
|
||||
),
|
||||
daemon=True,
|
||||
)
|
||||
@@ -121,7 +119,6 @@ class AsyncMaskGenerator:
|
||||
fps: float,
|
||||
conf_threshold: float,
|
||||
iou_threshold: float,
|
||||
mask_scale: float,
|
||||
):
|
||||
"""
|
||||
Worker thread function. Delegates to inference server and polls status.
|
||||
@@ -141,7 +138,6 @@ class AsyncMaskGenerator:
|
||||
end_frame=end_frame,
|
||||
conf_threshold=conf_threshold,
|
||||
iou_threshold=iou_threshold,
|
||||
mask_scale=mask_scale,
|
||||
)
|
||||
print(f"[FaceMask] Task started: {task_id}")
|
||||
|
||||
|
||||
@@ -204,7 +204,6 @@ class InferenceClient:
|
||||
end_frame: int,
|
||||
conf_threshold: float,
|
||||
iou_threshold: float,
|
||||
mask_scale: float,
|
||||
) -> str:
|
||||
"""
|
||||
Request mask generation.
|
||||
@@ -222,7 +221,6 @@ class InferenceClient:
|
||||
"end_frame": end_frame,
|
||||
"conf_threshold": conf_threshold,
|
||||
"iou_threshold": iou_threshold,
|
||||
"mask_scale": mask_scale,
|
||||
}
|
||||
|
||||
req = urllib.request.Request(
|
||||
@@ -255,6 +253,7 @@ class InferenceClient:
|
||||
detections_path: str,
|
||||
output_path: str,
|
||||
blur_size: int,
|
||||
display_scale: float,
|
||||
fmt: str,
|
||||
) -> str:
|
||||
"""
|
||||
@@ -271,6 +270,7 @@ class InferenceClient:
|
||||
"detections_path": detections_path,
|
||||
"output_path": output_path,
|
||||
"blur_size": blur_size,
|
||||
"display_scale": display_scale,
|
||||
"format": fmt,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user