riciii7 commited on
Commit
7d71b96
·
verified ·
1 Parent(s): fc3eb6d

fix: try to reduce the confidence threshold

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.5)
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