Update app.py
Browse files
app.py
CHANGED
@@ -7,12 +7,15 @@ import yaml
|
|
7 |
import numpy as np
|
8 |
from matplotlib import cm
|
9 |
import gradio as gr
|
|
|
|
|
10 |
|
11 |
from PIL import Image, ImageColor, ImageFont, ImageDraw
|
12 |
# check git lfs pull!!
|
13 |
from DLC_models.download_utils import DownloadModel
|
14 |
from dlclive import DLCLive, Processor
|
15 |
|
|
|
16 |
from viz_utils import save_results_as_json, draw_keypoints_on_image, draw_bbox_w_text, save_results_only_dlc
|
17 |
from detection_utils import predict_md, crop_animal_detections, predict_dlc
|
18 |
from ui_utils import gradio_inputs_for_MD_DLC, gradio_outputs_for_MD_DLC, gradio_description_and_examples
|
@@ -25,8 +28,8 @@ MD_models_dict = {'md_v5a': "MD_models/md_v5a.0.0.pt", #
|
|
25 |
'md_v5b': "MD_models/md_v5b.0.0.pt"}
|
26 |
|
27 |
# DLC models target dirs
|
28 |
-
DLC_models_dict = {'supernanimal_quadruped': "DLC_models/
|
29 |
-
'supernanimal_topviewmouse': "DLC_models/
|
30 |
}
|
31 |
|
32 |
def predict_pipeline(img_input,
|
|
|
7 |
import numpy as np
|
8 |
from matplotlib import cm
|
9 |
import gradio as gr
|
10 |
+
import deeplabcut
|
11 |
+
import dlclib
|
12 |
|
13 |
from PIL import Image, ImageColor, ImageFont, ImageDraw
|
14 |
# check git lfs pull!!
|
15 |
from DLC_models.download_utils import DownloadModel
|
16 |
from dlclive import DLCLive, Processor
|
17 |
|
18 |
+
|
19 |
from viz_utils import save_results_as_json, draw_keypoints_on_image, draw_bbox_w_text, save_results_only_dlc
|
20 |
from detection_utils import predict_md, crop_animal_detections, predict_dlc
|
21 |
from ui_utils import gradio_inputs_for_MD_DLC, gradio_outputs_for_MD_DLC, gradio_description_and_examples
|
|
|
28 |
'md_v5b': "MD_models/md_v5b.0.0.pt"}
|
29 |
|
30 |
# DLC models target dirs
|
31 |
+
DLC_models_dict = {'supernanimal_quadruped': "DLC_models/supernanimal_quadruped/",
|
32 |
+
'supernanimal_topviewmouse': "DLC_models/supernanimal_topviewmouse/"
|
33 |
}
|
34 |
|
35 |
def predict_pipeline(img_input,
|