Add Debug Messages
This commit is contained in:
@@ -20,6 +20,8 @@ try:
|
|||||||
response = r.json()
|
response = r.json()
|
||||||
|
|
||||||
for detection in response:
|
for detection in response:
|
||||||
|
print(str(detection['id']) + " Anonymization Started")
|
||||||
|
|
||||||
img_path = "{}{}".format(base_path, detection['source_image_path'])
|
img_path = "{}{}".format(base_path, detection['source_image_path'])
|
||||||
|
|
||||||
#Skip Non existing files
|
#Skip Non existing files
|
||||||
@@ -31,6 +33,7 @@ try:
|
|||||||
faces, rejects, weights = face_cascade.detectMultiScale3(gray, 1.1, 4, outputRejectLevels = 1)
|
faces, rejects, weights = face_cascade.detectMultiScale3(gray, 1.1, 4, outputRejectLevels = 1)
|
||||||
|
|
||||||
#Count faces is null dont anonimize file
|
#Count faces is null dont anonimize file
|
||||||
|
print(len(faces) + " Faces Found" )
|
||||||
if (len(faces) < 0):
|
if (len(faces) < 0):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -58,7 +61,10 @@ try:
|
|||||||
"source_image_path": new_img_path.replace(base_path,"")
|
"source_image_path": new_img_path.replace(base_path,"")
|
||||||
}
|
}
|
||||||
response = requests.post('{}/anonymize'.format(root_api_url), json=data)
|
response = requests.post('{}/anonymize'.format(root_api_url), json=data)
|
||||||
|
print(str(detection['id']) + " Anonymized" )
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
print("sleep")
|
||||||
time.sleep(900)
|
time.sleep(900)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user