Update ui_utils.py
Browse files11 unmodified lines12131415151617187 unmodified lines262728292930313233333435361 unmodified line383940414142434421 unmodified lines66676869706970717211 unmodified lines gr_mega_model_input = gr.inputs.Dropdown(choices=md_models_list, default='md_v5a', # default option 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. label='Select MegaDetector model') label='Select Detector model') gr_dlc_model_input = gr.inputs.Dropdown(choices=dlc_models_list, # choices default='superanimal_quadruped', # default option 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.7 unmodified lines
gr_slider_conf_bboxes = gr.inputs.Slider(0,1,.02,0.8, label='Set confidence threshold for animal detections') gr_slider_conf_keypoints = gr.inputs.Slider(0,1,.05,0, gr_slider_conf_keypoints = gr.inputs.Slider(0,1,.05,0.4, label='Set confidence threshold for keypoints')
# Data viz gr_keypt_color = gr.ColorPicker(value ="#ff0000", label="choose color for keypoint label") gr_keypt_color = gr.ColorPicker(value ="#862db7", label="choose color for keypoint label")
gr_labels_font_style = gr.inputs.Dropdown(choices=['amiko', 'animals', 'nature', 'painter', 'zen'], default='amiko',1 unmodified line label='Select keypoint label font') gr_slider_font_size = gr.inputs.Slider(5,30,1,8, label='Set font size') gr_slider_marker_size = gr.inputs.Slider(1,20,1,5, gr_slider_marker_size = gr.inputs.Slider(1,20,1,9, label='Set marker size')
# list of inputs21 unmodified lines# User interace: descriptiondef gradio_description_and_examples(): title = "DeepLabCut Model Zoo SuperAnimals" description = " <a href='https://github.com/microsoft/CameraTraps'>MegaDetector v5a</a> + <a href='https://github.com/DeepLabCut/DeepLabCut'>DeepLabCut</a>. \ 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" 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"
examples = [['examples/dog.jpeg', 'md_v5a', 'superanimal_quadruped', False, True, 0.5, 0.00, 'amiko',9, 'red', 3]]ui_utils.py+5-6