mwmathis commited on
Commit
781dbd9
Β·
1 Parent(s): 5c9a665

Update ui_utils.py

Browse files
Files changed (1) hide show
  1. ui_utils.py +5 -6
ui_utils.py CHANGED
@@ -12,7 +12,7 @@ def gradio_inputs_for_MD_DLC(md_models_list, # list(MD_models_dict.keys())
12
  gr_mega_model_input = gr.inputs.Dropdown(choices=md_models_list,
13
  default='md_v5a', # default option
14
  type='value', # Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.
15
- label='Select MegaDetector model')
16
  gr_dlc_model_input = gr.inputs.Dropdown(choices=dlc_models_list, # choices
17
  default='superanimal_quadruped', # default option
18
  type='value', # Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.
@@ -26,11 +26,11 @@ def gradio_inputs_for_MD_DLC(md_models_list, # list(MD_models_dict.keys())
26
 
27
  gr_slider_conf_bboxes = gr.inputs.Slider(0,1,.02,0.8,
28
  label='Set confidence threshold for animal detections')
29
- gr_slider_conf_keypoints = gr.inputs.Slider(0,1,.05,0,
30
  label='Set confidence threshold for keypoints')
31
 
32
  # Data viz
33
- gr_keypt_color = gr.ColorPicker(value ="#ff0000", label="choose color for keypoint label")
34
 
35
  gr_labels_font_style = gr.inputs.Dropdown(choices=['amiko', 'animals', 'nature', 'painter', 'zen'],
36
  default='amiko',
@@ -38,7 +38,7 @@ def gradio_inputs_for_MD_DLC(md_models_list, # list(MD_models_dict.keys())
38
  label='Select keypoint label font')
39
  gr_slider_font_size = gr.inputs.Slider(5,30,1,8,
40
  label='Set font size')
41
- gr_slider_marker_size = gr.inputs.Slider(1,20,1,5,
42
  label='Set marker size')
43
 
44
  # list of inputs
@@ -66,8 +66,7 @@ def gradio_outputs_for_MD_DLC():
66
  # User interace: description
67
  def gradio_description_and_examples():
68
  title = "DeepLabCut Model Zoo SuperAnimals"
69
- description = " <a href='https://github.com/microsoft/CameraTraps'>MegaDetector v5a</a> + <a href='https://github.com/DeepLabCut/DeepLabCut'>DeepLabCut</a>. \
70
- We host SuperAnimal models from the <a href='http://www.mackenziemathislab.org/dlc-modelzoo'>DeepLabCut ModelZoo Project</a>\, and two <a href='https://github.com/microsoft/CameraTraps/blob/main/megadetector.md'>Mega Detector Models</a>. This repo is based on https://huggingface.co/spaces/DeepLabCut/MegaDetector_DeepLabCut"
71
 
72
 
73
  examples = [['examples/dog.jpeg', 'md_v5a', 'superanimal_quadruped', False, True, 0.5, 0.00, 'amiko',9, 'red', 3]]
 
12
  gr_mega_model_input = gr.inputs.Dropdown(choices=md_models_list,
13
  default='md_v5a', # default option
14
  type='value', # Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.
15
+ label='Select Detector model')
16
  gr_dlc_model_input = gr.inputs.Dropdown(choices=dlc_models_list, # choices
17
  default='superanimal_quadruped', # default option
18
  type='value', # Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.
 
26
 
27
  gr_slider_conf_bboxes = gr.inputs.Slider(0,1,.02,0.8,
28
  label='Set confidence threshold for animal detections')
29
+ gr_slider_conf_keypoints = gr.inputs.Slider(0,1,.05,0.4,
30
  label='Set confidence threshold for keypoints')
31
 
32
  # Data viz
33
+ gr_keypt_color = gr.ColorPicker(value ="#862db7", label="choose color for keypoint label")
34
 
35
  gr_labels_font_style = gr.inputs.Dropdown(choices=['amiko', 'animals', 'nature', 'painter', 'zen'],
36
  default='amiko',
 
38
  label='Select keypoint label font')
39
  gr_slider_font_size = gr.inputs.Slider(5,30,1,8,
40
  label='Set font size')
41
+ gr_slider_marker_size = gr.inputs.Slider(1,20,1,9,
42
  label='Set marker size')
43
 
44
  # list of inputs
 
66
  # User interace: description
67
  def gradio_description_and_examples():
68
  title = "DeepLabCut Model Zoo SuperAnimals"
69
+ description = "Test the SuperAnimal models from the <a href='http://www.mackenziemathislab.org/dlc-modelzoo'>DeepLabCut ModelZoo Project</a>\! Simply upload an image and see how it does. Want to run on videos on the cloud or locally? See the <a href='http://www.mackenziemathislab.org/dlc-modelzoo'>DeepLabCut ModelZoo</a>\. This repo is adapted from https://huggingface.co/spaces/DeepLabCut/MegaDetector_DeepLabCut"
 
70
 
71
 
72
  examples = [['examples/dog.jpeg', 'md_v5a', 'superanimal_quadruped', False, True, 0.5, 0.00, 'amiko',9, 'red', 3]]