Combining DJL.AI With Apache NiFi for Deep Studying Workflows

Person deep under water with several small fish

NiFi + DJL.AI = A Merry Deep Studying Christmas

Completely happy Mmm…FLaNK Day!

I’ve been experimenting with the superior new Apache 2.Zero licensed Java Deep Studying Library, DJL. In NiFi, I used to be making an attempt to determine a fast use case and demo. So I used my Internet Digicam processor to seize a nonetheless shot from my Powerbook webcam and ship it to the processor. The outcomes are despatched to slack.

Because it’s the vacations, I consider my favourite vacation motion pictures: The Matrix and Blade Runner. So I assumed a Voight-Kampf take a look at could be enjoyable. Since I haven’t got a deep studying QA piece constructed but, let’s begin by seeing when you look human. We’ll name them ‘particular person’. I’m testing to see if I’m a replicant. Generally it is arduous to inform. Let’s have a look at if DJL thinks I’m human.


Okay, so at the least it thinks I’m an individual. The classification of a Christmas tree is vaguely correct. So we are able to see how straightforward and highly effective Deep Studying is in Java, including it to NiFi makes it even simpler.

It didn’t establish my large french bread.

You may also be excited about:  Utilizing Apache Spark and Apache NiFi to Run TensorFlow

Constructing a New Customized Processor for Deep Studying

The toughest half was a very good NiFi Integration take a look at. The DJL crew offers some nice examples, and it is very easy to plug into their fashions.

All of the sources are on GitHub and reference the under DJL websites and repos.

Utilizing a New Customized Processor as A part of a Actual-time Vacation Stream

We first add the DeepLearningProcessor to our canvas.

An instance stream:

  • GetWebCameraProcessor: seize a picture from an connected webcamera
  • UpdateAttribute: Add media kind for picture
  • DeepLearningProcessor: Run our DJL deep studying mannequin from a zoo
  • PutSlack: Put DJL leads to a textual content window in slack
  • PostSlack: Ship our DJL altered picture to slack
  • Funnel: Ship all failures to Valhalla

If we instance the provenance, we are able to see how lengthy it took to run and another attention-grabbing attributes.

We place the outcomes of our picture evaluation in attributes whereas we return a brand new picture that has a bounding field on the discovered object(s).

We now a full classification workflow for real-time deep studying evaluation on photographs, might be used for Santa watching, Safety, Memes and different vital enterprise functions.

The preliminary launch is obtainable right here:

Utilizing library and instance code from the Deep Java Library (

Supply Code:

Additional Studying

Exploring Apache NiFi 1.10: Parameters and Stateless Engine

Apache NiFi Overview

0 Comment

Leave a comment