Spaces:
Sleeping
Sleeping
fix: try to reduce the confidence threshold
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ async def inference(file: UploadFile):
|
|
| 28 |
image_bytes = await file.read()
|
| 29 |
img = np.frombuffer(image_bytes, dtype=np.uint8)
|
| 30 |
img = cv2.imdecode(img, cv2.IMREAD_COLOR)
|
| 31 |
-
results = model.predict(source=img, conf=0.
|
| 32 |
detections = []
|
| 33 |
for r in results:
|
| 34 |
boxes = r.boxes
|
|
|
|
| 28 |
image_bytes = await file.read()
|
| 29 |
img = np.frombuffer(image_bytes, dtype=np.uint8)
|
| 30 |
img = cv2.imdecode(img, cv2.IMREAD_COLOR)
|
| 31 |
+
results = model.predict(source=img, conf=0.3)
|
| 32 |
detections = []
|
| 33 |
for r in results:
|
| 34 |
boxes = r.boxes
|