File size: 815 Bytes
a5a6a2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
import sys
from detect import detect_face_shape

# Add current dir to path logic if needed, but running from ai_service should be fine
print("Starting simple verification...")

DATASET_DIR = "../dataset"
# Pick a file
if os.path.exists(DATASET_DIR):
    heart_dir = os.path.join(DATASET_DIR, "heart")
    if os.path.exists(heart_dir):
        files = os.listdir(heart_dir)
        if files:
            img_path = os.path.join(heart_dir, files[0])
            print(f"Testing {img_path}")
            try:
                result = detect_face_shape(img_path)
                print(f"Result: {result}")
            except Exception as e:
                print(f"Error: {e}")
        else:
            print("No files in heart dir")
    else:
        print("No heart dir")
else:
    print("No dataset dir")