Fix
This commit is contained in:
@@ -54,7 +54,13 @@ try:
|
|||||||
i = i +1
|
i = i +1
|
||||||
|
|
||||||
extension = img_path[img_path.index(".")+1:]
|
extension = img_path[img_path.index(".")+1:]
|
||||||
|
|
||||||
|
new_img_path = img_path
|
||||||
|
if (not img_path.endswith(('_anonym.{}'.format(extension)))):
|
||||||
new_img_path = img_path.replace((".{}".format(extension)), ('_anonym.{}'.format(extension)))
|
new_img_path = img_path.replace((".{}".format(extension)), ('_anonym.{}'.format(extension)))
|
||||||
|
else:
|
||||||
|
print("Path already anonymized !!!")
|
||||||
|
|
||||||
cv2.imwrite(new_img_path, img)
|
cv2.imwrite(new_img_path, img)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user