Plana-Archive commited on
Commit
a43e60d
·
verified ·
1 Parent(s): 7ba1257

Upload anime_object_detection/app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. anime_object_detection/app.py +44 -0
anime_object_detection/app.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ import gradio as gr
4
+
5
+ from detection import EyesDetection, FaceDetection, HeadDetection, PersonDetection, HandDetection, CensorDetection, \
6
+ HalfBodyDetection, NudeNetDetection, BooruYOLODetection
7
+
8
+ _GLOBAL_CSS = """
9
+ .limit-height {
10
+ max-height: 55vh;
11
+ }
12
+ """
13
+
14
+ if __name__ == '__main__':
15
+ with gr.Blocks(css=_GLOBAL_CSS) as demo:
16
+ with gr.Row():
17
+ with gr.Column():
18
+ gr.HTML('<h2 style="text-align: center;">Object Detections For Anime</h2>')
19
+ gr.Markdown('This is the online demo for detection functions of '
20
+ '[imgutils.detect](https://dghs-imgutils.deepghs.org/main/api_doc/detect/index.html). '
21
+ 'You can try them yourselves with `pip install dghs-imgutils`.')
22
+
23
+ with gr.Row():
24
+ with gr.Tabs():
25
+ with gr.Tab('Face Detection'):
26
+ FaceDetection().make_ui()
27
+ with gr.Tab('Head Detection'):
28
+ HeadDetection().make_ui()
29
+ with gr.Tab('Person Detection'):
30
+ PersonDetection().make_ui()
31
+ with gr.Tab('Half Body Detection'):
32
+ HalfBodyDetection().make_ui()
33
+ with gr.Tab('Eyes Detection'):
34
+ EyesDetection().make_ui()
35
+ with gr.Tab('Hand Detection'):
36
+ HandDetection().make_ui()
37
+ with gr.Tab('Censor Point Detection'):
38
+ CensorDetection().make_ui()
39
+ with gr.Tab('NudeNet'):
40
+ NudeNetDetection().make_ui()
41
+ with gr.Tab('BooruYOLO'):
42
+ BooruYOLODetection().make_ui()
43
+
44
+ demo.queue(os.cpu_count()).launch()