- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Created on 03-23-2018 03:02 PM - edited 08-17-2019 08:18 AM
Integrating TensorFlow 1.6 Image Labelling with HDF 3.1 and Apache NiFi 1.5
This is community Apache NiFi custom processor that I have written with help from Simon Ball. This is after his original change, I converted the results to a different style and incorporated changes to Google's TensorFlow Label_Image in Java example.
Images Supported as Flow Files
JPG, PNG, GIF
Versions
Updated TensorFlowProcessor to TF 1.6.
Summary
I added more tests, did more clode cleanup, change the top 5 returned with cleaner naming. This processor has been tested in a few environments, please give it a try and let me know your results. The performance and stability seem quite good, hopefully enough for your use cases. You can also use the MiniFi C++ Agent's built-in C++ TensorFlow support if you wish to have fast local TensorFlow at the edge.
Video
JUNit Test for TensorFlow Processor
Here is another flow where I am send an image to two Apache MXNet Model Servers and the local TensorFlow processor.
This is an example of the attributes returned by the processor. You pass in the image as a flowfile and it adds attributes without changing the contents.
In Apache NiFi, we can monitor how long the tasks are taking. After the first run the time of the processor goes down as we have cached the labels and the TensorFlow pre-built graph.
This is an example of an actual flow. I use this to grab images from Twitter, download them and run TensorFlow on them.
Installation
- Download NAR here: https://github.com/tspannhw/nifi-tensorflow-processor/releases/tag/1.6
- Install nar file to /usr/hdf/current/nifi/lib/
- Create a model directory
- wget https://raw.githubusercontent.com/tspannhw/nifi-tensorflow-processor/master/nifi-tensorflow-processo...
- wget https://github.com/tspannhw/nifi-tensorflow-processor/blob/master/nifi-tensorflow-processors/src/tes...
- Restart Apache NiFi via Ambari
References
- https://community.hortonworks.com/articles/116803/building-a-custom-processor-in-apache-nifi-12-for....
- https://community.hortonworks.com/articles/178196/integrating-lucene-geo-gazetteer-for-geo-parsing-w...
- https://github.com/tspannhw/nifi-tensorflow-processor
- https://community.hortonworks.com/articles/80339/iot-capturing-photos-and-analyzing-the-image-with.h...
- https://community.hortonworks.com/articles/104649/using-cloudbreak-recipes-to-deploy-anaconda-and-te...
- https://github.com/aymericdamien/TensorFlow-Examples
- https://community.hortonworks.com/articles/142686/real-time-ingesting-and-transforming-sensor-and-so...
- https://community.hortonworks.com/articles/118132/minifi-capturing-converting-tensorflow-inception-t...
- https://community.hortonworks.com/articles/130814/sensors-and-image-capture-and-deep-learning-analys...
- https://community.hortonworks.com/articles/103863/using-an-asus-tinkerboard-with-tensorflow-and-pyth...
- https://community.hortonworks.com/articles/83872/data-lake-30-containerization-erasure-coding-gpu-p....