Spaces:
Build error
Build error
sfmig
commited on
Commit
β’
9a8a433
1
Parent(s):
539c6b9
fix for examples
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ import math
|
|
18 |
import os
|
19 |
import yaml
|
20 |
|
21 |
-
|
22 |
|
23 |
#########################################
|
24 |
# Input params
|
@@ -184,6 +184,7 @@ def predict_pipeline(img_input,
|
|
184 |
############################################################
|
185 |
## Get DLC model and labels as strings
|
186 |
# TODO: make a dict as for megadetector
|
|
|
187 |
path_to_DLCmodel = DLC_models[dlc_model_input_str]
|
188 |
pose_cfg_path = os.path.join(path_to_DLCmodel,'pose_cfg.yaml')
|
189 |
|
@@ -336,9 +337,9 @@ gr_description = "Contributed by Sofia Minano, Neslihan Wittek, Nirel Kadzo, Vic
|
|
336 |
|
337 |
# article = "<p style='text-align: center'>This app makes predictions using a YOLOv5x6 model that was trained to detect animals, humans, and vehicles in camera trap images; find out more about the project on <a href='https://github.com/microsoft/CameraTraps'>GitHub</a>. This app was built by Henry Lydecker but really depends on code and models developed by <a href='http://ecologize.org/'>Ecologize</a> and <a href='http://aka.ms/aiforearth'>Microsoft AI for Earth</a>. Find out more about the YOLO model from the original creator, <a href='https://pjreddie.com/darknet/yolo/'>Joseph Redmon</a>. YOLOv5 is a family of compound-scaled object detection models trained on the COCO dataset and developed by Ultralytics, and includes simple functionality for Test Time Augmentation (TTA), model ensembling, hyperparameter evolution, and export to ONNX, CoreML and TFLite. <a href='https://github.com/ultralytics/yolov5'>Source code</a> | <a href='https://pytorch.org/hub/ultralytics_yolov5'>PyTorch Hub</a></p>"
|
338 |
|
339 |
-
examples = [['example/monkey_full.jpg', 'full_macaque', False, True, 0.5, 0.3, 'amiko', 5, 'blue', 3
|
340 |
-
['example/dog.jpeg', 'full_dog', False, True, 0.5, 0.05, 'amiko', 5, 'yellow', 3
|
341 |
-
['example/cat.jpg', 'full_cat', False, True, 0.5, 0.05, 'amiko', 5, 'purple', 3
|
342 |
|
343 |
################################################
|
344 |
# %% Define and launch gradio interface
|
|
|
18 |
import os
|
19 |
import yaml
|
20 |
|
21 |
+
import pdb
|
22 |
|
23 |
#########################################
|
24 |
# Input params
|
|
|
184 |
############################################################
|
185 |
## Get DLC model and labels as strings
|
186 |
# TODO: make a dict as for megadetector
|
187 |
+
# pdb.set_trace()
|
188 |
path_to_DLCmodel = DLC_models[dlc_model_input_str]
|
189 |
pose_cfg_path = os.path.join(path_to_DLCmodel,'pose_cfg.yaml')
|
190 |
|
|
|
337 |
|
338 |
# article = "<p style='text-align: center'>This app makes predictions using a YOLOv5x6 model that was trained to detect animals, humans, and vehicles in camera trap images; find out more about the project on <a href='https://github.com/microsoft/CameraTraps'>GitHub</a>. This app was built by Henry Lydecker but really depends on code and models developed by <a href='http://ecologize.org/'>Ecologize</a> and <a href='http://aka.ms/aiforearth'>Microsoft AI for Earth</a>. Find out more about the YOLO model from the original creator, <a href='https://pjreddie.com/darknet/yolo/'>Joseph Redmon</a>. YOLOv5 is a family of compound-scaled object detection models trained on the COCO dataset and developed by Ultralytics, and includes simple functionality for Test Time Augmentation (TTA), model ensembling, hyperparameter evolution, and export to ONNX, CoreML and TFLite. <a href='https://github.com/ultralytics/yolov5'>Source code</a> | <a href='https://pytorch.org/hub/ultralytics_yolov5'>PyTorch Hub</a></p>"
|
339 |
|
340 |
+
examples = [['example/monkey_full.jpg', 'md_v5a','full_macaque', False, True, 0.5, 0.3, 'amiko', 5, 'blue', 3],
|
341 |
+
['example/dog.jpeg', 'md_v5a', 'full_dog', False, True, 0.5, 0.05, 'amiko', 5, 'yellow', 3],
|
342 |
+
['example/cat.jpg', 'md_v5a', 'full_cat', False, True, 0.5, 0.05, 'amiko', 5, 'purple', 3]]
|
343 |
|
344 |
################################################
|
345 |
# %% Define and launch gradio interface
|