- update with new open source images, minor
authorEric Zavesky <ezavesky@research.att.com>
Thu, 19 Oct 2017 20:09:57 +0000 (15:09 -0500)
committerEric Zavesky <ezavesky@research.att.com>
Thu, 19 Oct 2017 20:09:57 +0000 (15:09 -0500)
functional fix for model name

README.md
face_privacy_filter/_version.py
face_privacy_filter/filter_image.py
face_privacy_filter/transform_detect.py
web_demo/face-privacy.html
web_demo/images/face_dinner.jpg [new file with mode: 0644]
web_demo/images/face_dinner_pixelate.jpg [new file with mode: 0644]
web_demo/images/face_family.jpg [new file with mode: 0644]
web_demo/images/face_family_pixelate.jpg [new file with mode: 0644]
web_demo/images/face_reunion_pixelate.jpg [new file with mode: 0644]

index f218052..580bc45 100644 (file)
--- a/README.md
+++ b/README.md
@@ -78,13 +78,14 @@ 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))
 * [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))
+* [family face example](web_demo/images/face_family.jpg) ([pexel source](https://www.pexels.com/photo/adult-affection-beautiful-beauty-265764/))
+* [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))
 
 
 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)
+![raw face](web_demo/images/face_family.jpg)  | ![pixelated commercial](web_demo/images/face_family_pixelate.jpg)
index 67d38d0..38c9a1d 100644 (file)
@@ -1,3 +1,3 @@
 # -*- coding: utf-8 -*-
-__version__ = "0.1.1"
+__version__ = "0.1.3"
 MODEL_NAME = 'face_privacy_filter'
index 700072f..352b87a 100644 (file)
@@ -50,15 +50,16 @@ def main(config={}):
         pipeline, EXTRA_DEPS = model_create_pipeline(transform, "detect")
 
         # formulate the pipeline to be used
+        model_name = MODEL_NAME+"_"+config['function']
         if 'push_address' in config and config['push_address']:
             from cognita_client.push import push_sklearn_model # push_skkeras_hybrid_model (keras?)
             print("Pushing new model to '{:}'...".format(config['push_address']))
-            push_sklearn_model(pipeline, inputDf, api=config['push_address'], name=MODEL_NAME, extra_deps=EXTRA_DEPS)
+            push_sklearn_model(pipeline, inputDf, api=config['push_address'], name=model_name, extra_deps=EXTRA_DEPS)
 
         if 'dump_model' in config and config['dump_model']:
             from cognita_client.wrap.dump import dump_sklearn_model # dump_skkeras_hybrid_model (keras?)
             print("Dumping new model to '{:}'...".format(config['dump_model']))
-            dump_sklearn_model(pipeline, inputDf, config['dump_model'], name=MODEL_NAME, extra_deps=EXTRA_DEPS)
+            dump_sklearn_model(pipeline, inputDf, config['dump_model'], name=model_name, extra_deps=EXTRA_DEPS)
 
     else:
         if not config['dump_model'] or not os.path.exists(config['dump_model']):
index d4b732e..9dc35f5 100644 (file)
@@ -154,4 +154,4 @@ class FaceDetectTransform(BaseEstimator, ClassifierMixin):
         #    cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2)
         return faces
 
-# FaceDetectTransform.__module__ = '__main__'
+# FaceDetectTransform.__module__ = '__main__'
\ No newline at end of file
index 76de4bc..e4b00f2 100755 (executable)
@@ -34,12 +34,12 @@ Rewrite to utilize simple image-based processing steps.
         <span><a href="https://flic.kr/p/bEgYbs" target="_new">flickr source</a></span>\r
     </div>\r
     <div>\r
-        <img src="images/commercial.jpg" movie="images/commercial.mp4" />\r
-        <span><a href="https://www.youtube.com/watch?v=34KfCNapnUg" target="_new">youtube source</a></span>\r
+        <img src="images/face_family.jpg" />\r
+        <span><a href="https://www.pexels.com/photo/adult-affection-beautiful-beauty-265764/" target="_new">pexels source</a></span>\r
     </div>\r
     <div>\r
-        <img src="images/face_DiCaprio.jpg" />\r
-        <span><a href="https://en.wikipedia.org/wiki/Celebrity#/media/File:Leonardo_DiCaprio_visited_Goddard_Saturday_to_discuss_Earth_science_with_Piers_Sellers_(26105091624)_cropped.jpg" target="_new">wikipedia source</a></span>\r
+        <img src="images/commercial.jpg" movie="images/commercial.mp4" />\r
+        <span><a href="https://www.youtube.com/watch?v=34KfCNapnUg" target="_new">youtube source</a></span>\r
     </div>\r
     <div>\r
         <img src="images/face_Schwarzenegger.jpg" />\r
diff --git a/web_demo/images/face_dinner.jpg b/web_demo/images/face_dinner.jpg
new file mode 100644 (file)
index 0000000..a6fecf1
Binary files /dev/null and b/web_demo/images/face_dinner.jpg differ
diff --git a/web_demo/images/face_dinner_pixelate.jpg b/web_demo/images/face_dinner_pixelate.jpg
new file mode 100644 (file)
index 0000000..b919c81
Binary files /dev/null and b/web_demo/images/face_dinner_pixelate.jpg differ
diff --git a/web_demo/images/face_family.jpg b/web_demo/images/face_family.jpg
new file mode 100644 (file)
index 0000000..1ca2aed
Binary files /dev/null and b/web_demo/images/face_family.jpg differ
diff --git a/web_demo/images/face_family_pixelate.jpg b/web_demo/images/face_family_pixelate.jpg
new file mode 100644 (file)
index 0000000..c9d5d25
Binary files /dev/null and b/web_demo/images/face_family_pixelate.jpg differ
diff --git a/web_demo/images/face_reunion_pixelate.jpg b/web_demo/images/face_reunion_pixelate.jpg
new file mode 100644 (file)
index 0000000..6ec42ee
Binary files /dev/null and b/web_demo/images/face_reunion_pixelate.jpg differ