File size: 447 Bytes
0aba763
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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