Compare commits
1
Commits
main
...
new-traffiq
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38e13d94dd |
@@ -43,7 +43,7 @@ try:
|
|||||||
for detection in response:
|
for detection in response:
|
||||||
print(str(detection['id']) + " Anonymization Started", flush=True)
|
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)
|
#print(img_path, flush=True)
|
||||||
#Skip Non existing files
|
#Skip Non existing files
|
||||||
if (not os.path.exists(img_path)):
|
if (not os.path.exists(img_path)):
|
||||||
@@ -57,7 +57,7 @@ try:
|
|||||||
if (len(faces) <= 0):
|
if (len(faces) <= 0):
|
||||||
data = {
|
data = {
|
||||||
"id": detection['id'],
|
"id": detection['id'],
|
||||||
"source_image_path": img_path.replace(base_path,""),
|
"path": img_path.replace(base_path,""),
|
||||||
"face_found": 0,
|
"face_found": 0,
|
||||||
}
|
}
|
||||||
response = requests.post('{}/anonymize'.format(root_api_url), json=data)
|
response = requests.post('{}/anonymize'.format(root_api_url), json=data)
|
||||||
@@ -93,7 +93,7 @@ try:
|
|||||||
|
|
||||||
data = {
|
data = {
|
||||||
"id": detection['id'],
|
"id": detection['id'],
|
||||||
"source_image_path": new_img_path.replace(base_path,""),
|
"path": new_img_path.replace(base_path,""),
|
||||||
"face_found": len(faces),
|
"face_found": len(faces),
|
||||||
}
|
}
|
||||||
response = requests.post('{}/anonymize'.format(root_api_url), json=data)
|
response = requests.post('{}/anonymize'.format(root_api_url), json=data)
|
||||||
|
|||||||
Reference in New Issue
Block a user