hashb commited on
Commit
96590f8
·
1 Parent(s): 1266117

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -12,6 +12,7 @@ model.setInputParams(scale=1 / 255, size=(416, 416), swapRB=True)
12
 
13
  def detect(image):
14
  img = cv2.imread(image)
 
15
  classIds, scores, boxes = model.detect(img, confThreshold=0.6, nmsThreshold=0.4)
16
 
17
  for (classId, score, box) in zip(classIds, scores, boxes):
 
12
 
13
  def detect(image):
14
  img = cv2.imread(image)
15
+ img = Image.fromarray(img)
16
  classIds, scores, boxes = model.detect(img, confThreshold=0.6, nmsThreshold=0.4)
17
 
18
  for (classId, score, box) in zip(classIds, scores, boxes):