Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data, fp16=Fals
|
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
-
def inference(image, iou_thres, conf_thres):
|
| 29 |
im = letterbox(image, img_size, stride=stride, auto=auto)[0] # padded resize
|
| 30 |
im = im.transpose((2, 0, 1))[::-1] # HWC to CHW, BGR to RGB
|
| 31 |
im = np.ascontiguousarray(im) # contiguous
|
|
|
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
+
def inference(image, iou_thres=0.5, conf_thres=0.5):
|
| 29 |
im = letterbox(image, img_size, stride=stride, auto=auto)[0] # padded resize
|
| 30 |
im = im.transpose((2, 0, 1))[::-1] # HWC to CHW, BGR to RGB
|
| 31 |
im = np.ascontiguousarray(im) # contiguous
|