With apoc.periodic.iterate you provide 2 statements, the first outer
statement is providing a stream of values to be processed. The second, inner
statement processes one element at a time or with iterateList:true the whole
batch at a time.

With apoc.load.json, it’s now very easy to load JSON data from any file or
URL, to avoid directly inserting the JSON into a script

Technologies Used

Links

Introduction

DeepDetect (DD) is a open source deep-learning server and API designed to
help in bridging the gap toward machine learning as a commodity. It
originates from a series of applications built for a handful of large
corporations and small startups. It has support for Caffe, one of the most
appreciated libraries for deep learning, and it easily connects to a range of
sources and sinks.

This enables deep learning to fit into existing stacks and applications with
reduced effort.

This short tutorial aims to show how to provide a service an image and return
the nearest probabilities of a match from that input, setting up your own
facial recognition server with DD.

Set up DD

First of all, pull & run a DD container using Docker:-

docker run -p 8080:8080 --name dd beniz/deepdetect_cpu

This should take a few minutes to download and run.

Download Classification Model

The VGG descriptors (i.e. descriptions of the visual features of the
contents in images, videos, etc) are evaluated evaluated on the Labeled
Faces in the Wild dataset, a standard de
facto for measuring face recognition performances.

Replace deploy.prototxt file

According to this issue the
VGG_FACE_deploy.prototxt file (i.e. definition of input blobs) is based on
an older version of caffe which has to be updated for DD, thus download
deploy.prototxt and
overwrite VGG_FACE_deploy.prototxt within your extracted directory.

Create corresp.txt file

DD requires a correspondence file to turn vgg_face categories, such as ‘1014’
into textual categories such as ‘Tommy Flanagan’. When training a model with
DD, this file is automatically generated. However, since we are using a
pre-trained model from outside DD, this file has to be explicitly added to
the repository.