- minor addition to the web demo writeup
[face-privacy-filter.git] / README.md
index 6e32cb8..f218052 100644 (file)
--- a/README.md
+++ b/README.md
@@ -18,8 +18,8 @@ script and has the following arguments.
 
 ```
 usage: run_face-privacy-filter_reference.py [-h] [-p PREDICT_PATH] [-i INPUT]
-                                            [-s] [-a PUSH_ADDRESS]
-                                            [-d DUMP_MODEL]
+                                            [-c] [-s] [-f {detect,pixelate}]
+                                            [-a PUSH_ADDRESS] [-d DUMP_MODEL]
 
 optional arguments:
   -h, --help            show this help message and exit
@@ -27,9 +27,12 @@ optional arguments:
                         save detections from model (model must be provided via
                         'dump_model')
   -i INPUT, --input INPUT
-                        absolute path to input image (only during prediction /
-                        dump)
+                        absolute path to input data (image or csv, only during
+                        prediction / dump)
+  -c, --csv_input       input as CSV format not an image
   -s, --suppress_image  do not create an extra row for a returned image
+  -f {detect,pixelate}, --function {detect,pixelate}
+                        which type of model to generate
   -a PUSH_ADDRESS, --push_address PUSH_ADDRESS
                         server address to push the model (e.g.
                         http://localhost:8887/v2/models)
@@ -39,10 +42,26 @@ optional arguments:
 
 
 ### Examples
-Example for dumping the `detect` model to disk.
+This single repo has a number of different models that can be
+composed together for operation.
+
+* Dump the `detect` model to disk.
+```
+./bin/run_local.sh -d model_detect -f detect
+```
+* Dump the `pixelate` model to disk.
+```
+./bin/run_local.sh -d model_pix -f pixelate
+```
+* Evaluate the `detect` model from disk and a previously produced detect object
 ```
-./bin/run_local.sh -d model
+./bin/run_local.sh -d model_detect -p output.csv -i web_demo/images/face_DiCaprio.jpg
 ```
+* Example for evaluating the `pixelate` model from disk and a previously produced detect object
+```
+./bin/run_local.sh -d model_pix -i detect.csv -p output.jpg --csv_input
+```
+
 
 
 ## Face-based Use Cases
@@ -59,5 +78,13 @@ launched locally.  Afterwards, the sample application found in
 [web_demo](web_demo) uses a `localhost` service to classify
 and visualize the results of image classification.
 
-* [DiCaprio celebrity face sample](web_demo/images/face_DiCaprio.jpg) [wikimedia source](https://en.wikipedia.org/wiki/Celebrity#/media/File:Leonardo_DiCaprio_visited_Goddard_Saturday_to_discuss_Earth_science_with_Piers_Sellers_(26105091624)_cropped.jpg)
-* [Schwarzenegger celebrity face sample](web_demo/images/face_Schwarzenegger.jpg) [wikimedia source](https://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/A._Schwarzenegger.jpg/220px-A._Schwarzenegger.jpg)
\ No newline at end of file
+* [DiCaprio celebrity face sample](web_demo/images/face_DiCaprio.jpg) ([wikimedia source](https://en.wikipedia.org/wiki/Celebrity#/media/File:Leonardo_DiCaprio_visited_Goddard_Saturday_to_discuss_Earth_science_with_Piers_Sellers_(26105091624)_cropped.jpg))
+* [Schwarzenegger celebrity face sample](web_demo/images/face_Schwarzenegger.jpg) ([wikimedia source](https://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/A._Schwarzenegger.jpg/220px-A._Schwarzenegger.jpg))
+* [Commercial example](web_demo/images/commercial.jpg) ([youtube source](https://www.youtube.com/watch?v=34KfCNapnUg))
+* [Reunion face sample](web_demo/images/face_reunion.jpg) ([flickr source](https://flic.kr/p/bEgYbs))
+
+
+before  | after
+------- | -------
+![raw commercial](web_demo/images/commercial.jpg)  | ![pixelated commercial](web_demo/images/commercial_pixelate.jpg)
+![raw face](web_demo/images/face_DiCaprio.jpg)  | ![pixelated commercial](web_demo/images/face_DiCaprio_pixelate.jpg)