- Remove session-ses_2f27.md (161KB raw session log) - Remove 49 ROOT_* duplicate files across REFERENCE/ - Remove 14 duplicate files between REFERENCE/ root and history/ - Remove asr_legacy.rs (dead code, replaced by asr.rs) - Remove src/core/worker/ (duplicate JobWorker) - Remove src/core/layers/ (empty directory) - Remove 4 .bak files in src/ - Remove 7 dead private methods in worker/processor.rs - Remove backup directory from git tracking
54 lines
1.3 KiB
Python
54 lines
1.3 KiB
Python
#!/opt/homebrew/bin/python3.11
|
|
"""
|
|
Debug script to test face registration with same arguments Rust uses
|
|
"""
|
|
|
|
import subprocess
|
|
import os
|
|
|
|
# Simulate what Rust would call
|
|
image_path = "/tmp/face_analysis_results/384b0ff44aaaa1f1_frame_019778.jpg"
|
|
output_path = "/tmp/face_registration_debug.json"
|
|
name = "Debug Person"
|
|
database_path = "/tmp/face_database.json"
|
|
|
|
# Create metadata file
|
|
metadata_path = "/tmp/face_metadata_debug.json"
|
|
import json
|
|
|
|
metadata = {"source": "debug", "test": True}
|
|
with open(metadata_path, "w") as f:
|
|
json.dump(metadata, f)
|
|
|
|
# Build command
|
|
cmd = [
|
|
"/opt/homebrew/bin/python3.11",
|
|
"scripts/face_registration.py",
|
|
image_path,
|
|
output_path,
|
|
name,
|
|
"--database",
|
|
database_path,
|
|
"--metadata",
|
|
metadata_path,
|
|
]
|
|
|
|
print(f"Running command: {' '.join(cmd)}")
|
|
print(f"Current directory: {os.getcwd()}")
|
|
|
|
# Run command
|
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
|
|
print(f"Return code: {result.returncode}")
|
|
print(f"Stdout:\n{result.stdout}")
|
|
print(f"Stderr:\n{result.stderr}")
|
|
|
|
# Check if output file was created
|
|
if os.path.exists(output_path):
|
|
print(f"Output file exists: {output_path}")
|
|
with open(output_path, "r") as f:
|
|
content = f.read()
|
|
print(f"Output content: {content}")
|
|
else:
|
|
print(f"Output file does not exist: {output_path}")
|