freealise commited on
Commit
6206bc6
·
verified ·
1 Parent(s): 1799cdd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -174,7 +174,8 @@ def remove_bg(fl, i):
174
  fr_diff = cv2.dilate(cv2.erode(fr_diff, element), element)
175
 
176
  fl_ = fl.split(".")[0] + "_.png"
177
- if int(i/2) == i/2: # is photo with the flash
 
178
  cv2.imwrite(fl_, fr_diff)
179
  else: # is without
180
  fr = cv2.imread(fl_)
 
174
  fr_diff = cv2.dilate(cv2.erode(fr_diff, element), element)
175
 
176
  fl_ = fl.split(".")[0] + "_.png"
177
+ if float(int(i/2)) == i/2: # is photo with the flash
178
+ print(i)
179
  cv2.imwrite(fl_, fr_diff)
180
  else: # is without
181
  fr = cv2.imread(fl_)