The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

Tutorial WALKTHROUGH


(^132) The Official Raspberry Pi Projects Book raspberrypi.org/magpi



Camera Module
magpi.cc/
bASFoG
PsyCam
magpi.cc/
2eCSQOD
You’ll
Need
reams can be beautiful, surreal, or even
scary. While we can assume that they play a
role in learning, their exact purpose remains
unknown. What would a computer see if it could
dream? You can find out by installing the amazing
Google DeepDream software on your Raspberry Pi!
DeepDream is derived from a neural network
for object recognition, which has been modified
to express every object it vaguely recognises. The
resulting images are impressively surrealistic,
bearing more than a passing resemblance to the
paintings of artists like Salvador Dalí.
Neural networks are a very versatile technology.
They can be applied to a variety of complex problems
like facial recognition, text translation, or even
playing games like Go.
Caffe, the neural network upon which Google built
DeepDream, was originally developed for identifying
objects in images. To achieve this, the network is
trained on a large set of images to identify the main
features of the objects presented.
Artificial neurons
Artificial neurons mimic their natural counterparts,
the neurons in the human brain. Every artificial
neuron has an activation threshold and numerous
weighted incoming and outgoing connections to other
neurons. If the sum of the weighted signals from
the incoming connections exceeds the activation
threshold, the neuron fires a signal.
Neural networks
Generally, neural networks consist of at least three
layers of neurons. The input layer reads the input, one
or more hidden layers process the information, and
the output layer shows the result.
Consider a neural network for recognising the
numbers zero to nine in images with a size of 28×28
pixels. The input layer would have 784 neurons, one
for every pixel. If an image is presented to the input
layer, every neuron in it produces a signal with a
strength corresponding to the greyscale value of its
pixel, with a darker pixel generating a stronger signal.
D
GOOGLE DEEPDREAM
ON THE RASPBERRY PI
Do computers dream of electric sheep? Find out by making your
Raspberry Pi dream with the amazing Google DeepDream algorithm
JOHANNES BERGS
Johannes Bergs wants to know
more and likes the realm of
humans and machines.
knight-of-pi.org
RASPBERRY PI 2
COMPATIBILITY
Although the
Pi 3 /3B+ with
its advanced
processing
power is
preferable,
the project
will run on a
Pi 2 without
modifications.
Strange critters
roam the Earth on
a chilly winter day


Free download pdf