File size: 737 Bytes
5d756f1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio
from dp2 import utils
from tops.config import instantiate
import gradio.inputs
from gradio_demos.modules import ExampleDemo, WebcamDemo

cfg_face = utils.load_config("configs/anonymizers/face.py")
anonymizer_face = instantiate(cfg_face.anonymizer, load_cache=False)
print(anonymizer_face.detector)
anonymizer_face.initialize_tracker(fps=1)


with gradio.Blocks() as demo:
    gradio.Markdown("# <center> DeepPrivacy2 - Realistic Image Anonymization </center>")
    gradio.Markdown("### <center> Håkon Hukkelås, Rudolf Mester, Frank Lindseth </center>")
    with gradio.Tab("Face Anonymization"):
        ExampleDemo(anonymizer_face)
    with gradio.Tab("Live Webcam"):
        WebcamDemo(anonymizer_face)

demo.launch()