-
Notifications
You must be signed in to change notification settings - Fork 82
"Johnny" (CEP)
Wiki ▸ Johnny (CEP)
The Johnny demo simulates a security system that relies on an image-based access code. The idea is that an input stream is monitored for images; if a specific series of images is seen in quick succession, access is granted. The idea came from a classic cyberpunk movie ref.
A TensorFlow model called 'Inception v5' is used to identify the content of images.
Build the flink-tensorflow-examples project:
$ mvn package
This will produce a JAR file suitable for deployment to a Flink cluster.
Start by creating a directory that you'll save images to. Once you run the example, it will monitor that directory for new images, with the expectation of seeing three images in succession:
- a 'cheeseburger'
- a 'ladybug'
- a 'llama'
Next, download and extract the inception5h
model:
$ wget http://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip
$ unzip inception5h.zip
Next, run the example in a Flink cluster.
$ flink run -c \
org.apache.flink.contrib.tensorflow.examples.inception.Johnny \
flink-tensorflow-examples/target/flink-tensorflow-examples_2.11-0.1-SNAPSHOT.jar \
/path/to/inception5h \
/path/to/photos
Finally, browse to the 'stdout' from the TaskManager(s) in your Flink cluster to find the program output.
Getting Started
Reference
Examples