tomaseo2022 commited on
Commit
c5d03b7
Β·
1 Parent(s): 50e4934

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -19,6 +19,7 @@ def remove_background(img):
19
 
20
  def inference(img):
21
  output = remove_background(img)
 
22
  gray = cv2.cvtColor(output, cv2.COLOR_BGR2GRAY)
23
  edges = cv2.Canny(gray, 50, 150)
24
  contours, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
 
19
 
20
  def inference(img):
21
  output = remove_background(img)
22
+ output = np.array(output)
23
  gray = cv2.cvtColor(output, cv2.COLOR_BGR2GRAY)
24
  edges = cv2.Canny(gray, 50, 150)
25
  contours, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)