Spaces:
Runtime error
Runtime error
valentynliubchenko
commited on
Commit
·
0fe0060
1
Parent(s):
6709c36
fixed input parameters
Browse files
app.py
CHANGED
|
@@ -5,9 +5,9 @@ import numpy as np
|
|
| 5 |
|
| 6 |
model_options = ["xViewyolov8n_v8_100e.pt", "xViewyolov8s_v8_100e.pt", "xViewyolov8m_v8_100e.pt"]
|
| 7 |
model_names = ["Nano", "Small", "Medium"]
|
| 8 |
-
print("
|
| 9 |
example_list = [["./examples/" + example] for example in os.listdir("examples")]
|
| 10 |
-
print("
|
| 11 |
models = [YOLO(os.path.join("./saved_model", option)) for option in model_options]
|
| 12 |
print("finish preparation")
|
| 13 |
|
|
@@ -20,12 +20,10 @@ def process_image(input_image, model_name, conf):
|
|
| 20 |
print(f"conf : {conf}")
|
| 21 |
|
| 22 |
if model_name is None:
|
| 23 |
-
|
| 24 |
-
# model_name = model_names[0]
|
| 25 |
|
| 26 |
if conf is None:
|
| 27 |
-
|
| 28 |
-
# conf = 0.6
|
| 29 |
|
| 30 |
model_index = model_names.index(model_name)
|
| 31 |
print('model_index: ')
|
|
|
|
| 5 |
|
| 6 |
model_options = ["xViewyolov8n_v8_100e.pt", "xViewyolov8s_v8_100e.pt", "xViewyolov8m_v8_100e.pt"]
|
| 7 |
model_names = ["Nano", "Small", "Medium"]
|
| 8 |
+
print("before loading examples")
|
| 9 |
example_list = [["./examples/" + example] for example in os.listdir("examples")]
|
| 10 |
+
print("before loading models")
|
| 11 |
models = [YOLO(os.path.join("./saved_model", option)) for option in model_options]
|
| 12 |
print("finish preparation")
|
| 13 |
|
|
|
|
| 20 |
print(f"conf : {conf}")
|
| 21 |
|
| 22 |
if model_name is None:
|
| 23 |
+
model_name = model_names[0]
|
|
|
|
| 24 |
|
| 25 |
if conf is None:
|
| 26 |
+
conf = 0.6
|
|
|
|
| 27 |
|
| 28 |
model_index = model_names.index(model_name)
|
| 29 |
print('model_index: ')
|