mwmathis's picture
Update app.py
c0f6831
raw
history blame
985 Bytes
# Built from https://huggingface.co./spaces/hlydecker/MegaDetector_v5
# Built from https://huggingface.co./spaces/sofmi/MegaDetector_DLClive/blob/main/app.py
# Built from https://huggingface.co./spaces/Neslihan/megadetector_dlcmodels/blob/main/app.py
import os
import yaml
import numpy as np
from matplotlib import cm
import gradio as gr
import deeplabcut
import dlclib
from PIL import Image, ImageColor, ImageFont, ImageDraw
# check git lfs pull!!
from DLC_models.download_utils import DownloadModel
from dlclive import DLCLive, Processor
from viz_utils import save_results_as_json, draw_keypoints_on_image, draw_bbox_w_text, save_results_only_dlc
from detection_utils import predict_md, crop_animal_detections, predict_dlc
from ui_utils import gradio_inputs_for_MD_DLC, gradio_outputs_for_MD_DLC, gradio_description_and_examples
# directly from huggingface
import gradio as gr
model = gr.Interface.load("mwmathis/DeepLabCutModelZoo-SuperAnimal-Quadruped",
)
model.launch()