Update file path

This commit is contained in:
Haitem
2025-06-30 15:20:19 +02:00
parent d4a5bc5476
commit 38e13d94dd
+3 -3
View File
@@ -43,7 +43,7 @@ try:
for detection in response:
print(str(detection['id']) + " Anonymization Started", flush=True)
img_path = "{}{}".format(base_path, detection['source_image_path'])
img_path = "{}{}".format(base_path, detection['path'])
#print(img_path, flush=True)
#Skip Non existing files
if (not os.path.exists(img_path)):
@@ -57,7 +57,7 @@ try:
if (len(faces) <= 0):
data = {
"id": detection['id'],
"source_image_path": img_path.replace(base_path,""),
"path": img_path.replace(base_path,""),
"face_found": 0,
}
response = requests.post('{}/anonymize'.format(root_api_url), json=data)
@@ -93,7 +93,7 @@ try:
data = {
"id": detection['id'],
"source_image_path": new_img_path.replace(base_path,""),
"path": new_img_path.replace(base_path,""),
"face_found": len(faces),
}
response = requests.post('{}/anonymize'.format(root_api_url), json=data)