Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,6 +21,15 @@ from utils.general import check_img_size, check_requirements, check_imshow, non_
|
|
| 21 |
scale_coords, xyxy2xywh, strip_optimizer, set_logging, increment_path
|
| 22 |
from utils.plots import plot_one_box
|
| 23 |
from utils.torch_utils import select_device, load_classifier, time_synchronized, TracedModel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
from PIL import Image
|
| 25 |
|
| 26 |
|
|
@@ -184,4 +193,4 @@ def detect(img,model):
|
|
| 184 |
return Image.fromarray(im0[:,:,::-1])
|
| 185 |
|
| 186 |
|
| 187 |
-
gr.Interface(detect,[gr.Image(type="pil"),gr.Dropdown(choices=["
|
|
|
|
| 21 |
scale_coords, xyxy2xywh, strip_optimizer, set_logging, increment_path
|
| 22 |
from utils.plots import plot_one_box
|
| 23 |
from utils.torch_utils import select_device, load_classifier, time_synchronized, TracedModel
|
| 24 |
+
|
| 25 |
+
from utils.functions import \
|
| 26 |
+
time_synchronized,select_device, increment_path,\
|
| 27 |
+
scale_coords,xyxy2xywh,non_max_suppression,split_for_trace_model,\
|
| 28 |
+
driving_area_mask,lane_line_mask,plot_one_box,show_seg_result,\
|
| 29 |
+
AverageMeter,\
|
| 30 |
+
LoadImages
|
| 31 |
+
|
| 32 |
+
|
| 33 |
from PIL import Image
|
| 34 |
|
| 35 |
|
|
|
|
| 193 |
return Image.fromarray(im0[:,:,::-1])
|
| 194 |
|
| 195 |
|
| 196 |
+
gr.Interface(detect,[gr.Image(type="pil"),gr.Dropdown(choices=["yolopv2"])], gr.Image(type="pil"),title="Yolopv2",examples=[["horses.jpeg", "yolopv2"]],description="demo for <a href='https://github.com/CAIC-AD/YOLOPv2' style='text-decoration: underline' target='_blank'>WongKinYiu/yolov7</a> Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors").launch()
|