linhcuem commited on
Commit
6665333
1 Parent(s): a81bec5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,8 +47,8 @@ def yolov8_img_inference(
47
  # image = read_image
48
  results = model.predict(image)
49
  render = render_result(model=model, image=image, result=results[0])
50
- # count_result = results[0].boxes.cls.tolist().count('name')
51
- count_result = results.pandas().xyxy[0].value_counts('name')
52
  return render, count_result
53
 
54
  # results = model.predict(image, imgsz=image_size, return_outputs=True)
 
47
  # image = read_image
48
  results = model.predict(image)
49
  render = render_result(model=model, image=image, result=results[0])
50
+ count_result = results[0].boxes.cls.tolist().count('name')
51
+ # count_result = results.pandas().xyxy[0].value_counts('name')
52
  return render, count_result
53
 
54
  # results = model.predict(image, imgsz=image_size, return_outputs=True)