mirror of
https://github.com/s0md3v/roop.git
synced 2025-09-26 20:31:16 +08:00
Hotfix enhancer as of empty bbox
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
name = 'roop'
|
name = 'roop'
|
||||||
version = '1.2.0'
|
version = '1.2.1'
|
||||||
|
@@ -60,12 +60,14 @@ def post_process() -> None:
|
|||||||
|
|
||||||
def enhance_face(target_face: Face, temp_frame: Frame) -> Frame:
|
def enhance_face(target_face: Face, temp_frame: Frame) -> Frame:
|
||||||
start_x, start_y, end_x, end_y = map(int, target_face['bbox'])
|
start_x, start_y, end_x, end_y = map(int, target_face['bbox'])
|
||||||
with THREAD_SEMAPHORE:
|
temp_face = temp_frame[start_y:end_y, start_x:end_x]
|
||||||
_, _, temp_face = get_face_enhancer().enhance(
|
if temp_face.size:
|
||||||
temp_frame[start_y:end_y, start_x:end_x],
|
with THREAD_SEMAPHORE:
|
||||||
paste_back=True
|
_, _, temp_face = get_face_enhancer().enhance(
|
||||||
)
|
temp_face,
|
||||||
temp_frame[start_y:end_y, start_x:end_x] = temp_face
|
paste_back=True
|
||||||
|
)
|
||||||
|
temp_frame[start_y:end_y, start_x:end_x] = temp_face
|
||||||
return temp_frame
|
return temp_frame
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user