2 This directory provides a simple web server for demonstrating a face-privacy filter example.
3 This web demo will launch an application with a swagger page.
6 This repo provides multiple models that can be created. Thanks to the
7 generic transform i/o specifications, you can run either one or two
8 models in composition together.
11 usage: app.py [-h] [-p PORT] [-d MODELDIR_DETECT] [-a MODELDIR_ANALYZE]
14 -h, --help show this help message and exit
15 -p PORT, --port PORT port to launch the simple web server
16 -d MODELDIR_DETECT, --modeldir_detect MODELDIR_DETECT
17 model directory for detection
18 -a MODELDIR_ANALYZE, --modeldir_analyze MODELDIR_ANALYZE
19 model directory for detection
23 This repo provides multiple models that can be created.
25 * detect output - The first set, called
26 `detect` will analyze an image, detect face regions, and echo both the
27 regions and the face back to the user. The region marked with `-1`
28 and a valid `mime_type` parameter will
29 always be the region with the original image.
37 "base64_data": "/9j/4AAQSkZJRgABA....",
41 "mime_type": "image/jpeg"
68 * analyzed output - The second type of output produces processed
69 images as an output. These images are base64 encoded with a decoding
74 "base64_data": "/9j/4AAQSkZJRgABAQAAAQABAAD....",
75 "mime_type": "image/jpeg"
81 ## Face Privacy Filtering
83 * For a graphical experience, view the swagger-generated UI at [http://localhost:8884/ui].
84 * Additionally, a simple command-line utility could be used to post an image
85 and mime type to the main interface. Additional examples for posting base64 encoded
86 images from javascript can be [found on StackOverflow](https://stackoverflow.com/a/20285053).
88 curl -F base64_data=@../web_demo/images/face_renion.jpg -F mime_type="image/jpeg" "http://localhost:8884/transform"