Use local temp dir during face extraction

This commit is contained in:
Felipe Daragon
2025-04-26 13:28:11 +01:00
parent 99c91d20b2
commit ef87bffe7d
2 changed files with 2 additions and 2 deletions

View File

@@ -342,7 +342,7 @@ class Refacer:
cropped = frame[y1:y2, x1:x2]
pil_img = Image.fromarray(cv2.cvtColor(cropped, cv2.COLOR_BGR2RGB))
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=".png")
temp_file = tempfile.NamedTemporaryFile(delete=False, dir="./tmp", suffix=".png")
pil_img.save(temp_file.name)
cropped_faces.append(temp_file.name)