Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,13 +11,13 @@ def yolov8_func(image,
|
|
11 |
|
12 |
# Load the YOLOv8 model
|
13 |
model_path = "best.pt"
|
14 |
-
model = YOLO(model_path)
|
15 |
|
16 |
# Make predictions
|
17 |
result = model.predict(image, conf=conf_thresold, iou=iou_thresold, imgsz=image_size)
|
18 |
|
19 |
# Access object detection results
|
20 |
-
boxes = result[0].boxes
|
21 |
num_boxes = len(boxes) # Count the number of bounding boxes (detections)
|
22 |
|
23 |
# Print object detection details (optional)
|
|
|
11 |
|
12 |
# Load the YOLOv8 model
|
13 |
model_path = "best.pt"
|
14 |
+
model = YOLO(model_path)
|
15 |
|
16 |
# Make predictions
|
17 |
result = model.predict(image, conf=conf_thresold, iou=iou_thresold, imgsz=image_size)
|
18 |
|
19 |
# Access object detection results
|
20 |
+
boxes = result[0].boxes
|
21 |
num_boxes = len(boxes) # Count the number of bounding boxes (detections)
|
22 |
|
23 |
# Print object detection details (optional)
|