linhcuem commited on
Commit
1336ba6
1 Parent(s): 680ea31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -55,7 +55,7 @@ def yolov8_img_inference(
55
  # obj_id = list(names)[list(names.values()).index([0])]
56
  # count 'car' objects in the results
57
  # count_result = results[0].boxes.cls[0].item()
58
- count_result = results.boxes.data
59
 
60
  object_counts = {x: 0 for x in names}
61
  for r in results:
@@ -85,7 +85,7 @@ def yolov8_img_inference(
85
  # cls.add(model.names[int(cno)])
86
 
87
  # count_result = results.pandas().xyxy[0].value_counts('name')
88
- return render, count_result
89
  # results = model.predict(image, imgsz=image_size, return_outputs=True)
90
  # results = model.predict(image)
91
  # object_prediction_list = []
 
55
  # obj_id = list(names)[list(names.values()).index([0])]
56
  # count 'car' objects in the results
57
  # count_result = results[0].boxes.cls[0].item()
58
+ #count_result = results[0]boxes.cls[0].tolist()
59
 
60
  object_counts = {x: 0 for x in names}
61
  for r in results:
 
85
  # cls.add(model.names[int(cno)])
86
 
87
  # count_result = results.pandas().xyxy[0].value_counts('name')
88
+ return render, type(present_objects)
89
  # results = model.predict(image, imgsz=image_size, return_outputs=True)
90
  # results = model.predict(image)
91
  # object_prediction_list = []