Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
import cv2
|
3 |
import torch
|
4 |
-
|
5 |
from sahi.prediction import ObjectPrediction
|
6 |
from sahi.utils.cv import visualize_object_predictions, read_image
|
7 |
-
#import requests
|
8 |
-
import os
|
9 |
from ultralyticsplus import YOLO
|
10 |
|
|
|
11 |
image_path = [['test_images/2a998cfb0901db5f8210.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45],['test_images/2ce19ce0191acb44920b.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45],
|
12 |
['test_images/2daab6ea3310e14eb801.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45], ['test_images/4a137deefb14294a7005 (1).jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45],
|
13 |
['test_images/7e77c596436c9132c87d.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45], ['test_images/170f914014bac6e49fab.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45],
|
@@ -19,7 +16,7 @@ image_path = [['test_images/2a998cfb0901db5f8210.jpg','linhcuem/chamdiem_yolov8_
|
|
19 |
['test_images/ee106392e56837366e79.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45], ['test_images/f88d2214a4ee76b02fff.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45]]
|
20 |
|
21 |
# Load YOLO model
|
22 |
-
model = YOLO('linhcuem/chamdiem_yolov8_ver10')
|
23 |
|
24 |
###################################################
|
25 |
def yolov8_img_inference(
|
|
|
1 |
import gradio as gr
|
|
|
2 |
import torch
|
|
|
3 |
from sahi.prediction import ObjectPrediction
|
4 |
from sahi.utils.cv import visualize_object_predictions, read_image
|
|
|
|
|
5 |
from ultralyticsplus import YOLO
|
6 |
|
7 |
+
|
8 |
image_path = [['test_images/2a998cfb0901db5f8210.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45],['test_images/2ce19ce0191acb44920b.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45],
|
9 |
['test_images/2daab6ea3310e14eb801.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45], ['test_images/4a137deefb14294a7005 (1).jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45],
|
10 |
['test_images/7e77c596436c9132c87d.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45], ['test_images/170f914014bac6e49fab.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45],
|
|
|
16 |
['test_images/ee106392e56837366e79.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45], ['test_images/f88d2214a4ee76b02fff.jpg','linhcuem/chamdiem_yolov8_ver10', 640, 0.25, 0.45]]
|
17 |
|
18 |
# Load YOLO model
|
19 |
+
# model = YOLO('linhcuem/chamdiem_yolov8_ver10')
|
20 |
|
21 |
###################################################
|
22 |
def yolov8_img_inference(
|