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

Update app.py

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