mlbench123 commited on
Commit
0057fab
·
verified ·
1 Parent(s): c9da937

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -842,7 +842,7 @@ def predict_with_paper(image, paper_size, offset,offset_unit, finger_clearance=F
842
 
843
  # Apply dilation for offset
844
  if offset_mm > 0:
845
- offset_pixels = (float(offset_mm) / scaling_factor # Remove the *2 +1 which was causing excessive dilation
846
  kernel = np.ones((int(offset_pixels), int(offset_pixels)), np.uint8)
847
  dilated_mask = cv2.dilate(rounded_mask, kernel)
848
  else:
 
842
 
843
  # Apply dilation for offset
844
  if offset_mm > 0:
845
+ offset_pixels = (float(offset_mm) / scaling_factor) # Remove the *2 +1 which was causing excessive dilation
846
  kernel = np.ones((int(offset_pixels), int(offset_pixels)), np.uint8)
847
  dilated_mask = cv2.dilate(rounded_mask, kernel)
848
  else: