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