| import subprocess | |
| import json | |
| import os | |
| get_face_path = os.path.join("C:\\Users\\owner\\Documents\\pythons\\yolox-examples\\get_face_rect.py") | |
| def detect_yolox_face(file_path): | |
| command = ["python",get_face_path,"-i",file_path] | |
| result=subprocess.run(command,capture_output=True, text=True) | |
| json_data = json.loads(result.stdout) | |
| #print(f"x {json_data[0]},y {json_data[1]},w {json_data[2]},h {json_data[3]}, ") | |
| return json_data |