import gradio from dp2 import utils from tops.config import instantiate import gradio.inputs from gradio_demos.modules import ExampleDemo, WebcamDemo cfg_body = utils.load_config("configs/anonymizers/FB_cse.py") anonymizer_body = instantiate(cfg_body.anonymizer, load_cache=False) anonymizer_body.initialize_tracker(fps=1) with gradio.Blocks() as demo: gradio.Markdown("#
DeepPrivacy2 - Realistic Image Anonymization
") gradio.Markdown("###
Håkon Hukkelås, Rudolf Mester, Frank Lindseth
") with gradio.Tab("Full-Body CSE Anonymization"): ExampleDemo(anonymizer_body) with gradio.Tab("Full-body CSE Webcam"): WebcamDemo(anonymizer_body) demo.launch()