fix: pass FACE_MIN_CONFIDENCE and FACE_MIN_SIZE env vars to swift_face subprocess
- executor.rs: Add cmd.env() for FACE_MIN_CONFIDENCE and FACE_MIN_SIZE in all 4 run methods - face_processor.py: Pass os.environ to subprocess.Popen to inherit env vars - Fixes multi-face detection issue where second face was being filtered out - Tested: CONFIDENCE=0.5 preserves both faces (392 total), CONFIDENCE=0.75 filters second face (196 total), SIZE=100 filters small faces (201 total)
This commit is contained in:
@@ -150,7 +150,8 @@ class FaceProcessorVision:
|
||||
t0 = time.time()
|
||||
log_path = swift_face_out + ".log"
|
||||
log_f = open(log_path, "w")
|
||||
proc = subprocess.Popen(cmd, stdout=log_f, stderr=subprocess.STDOUT, text=True)
|
||||
# Pass environment variables to swift_face subprocess (FACE_MIN_CONFIDENCE, FACE_MIN_SIZE)
|
||||
proc = subprocess.Popen(cmd, stdout=log_f, stderr=subprocess.STDOUT, text=True, env=os.environ)
|
||||
last_pct = -1
|
||||
while proc.poll() is None:
|
||||
time.sleep(10)
|
||||
|
||||
Reference in New Issue
Block a user