How Do Machines See?
#002554
#fed141
#007396
#382F2D
#3eb1c8
#f9423a
#C8102E
https://innoeduvation.org/313/vision/tm/
https://innoeduvation.org/313/vision/tmAnimals/index.html
Teachable Machine References
What is Vision?
The Sciences of Making Machines That See
The Phenomenology of Networks
Machine Vision by Stepwise Refinement
Neurons, Real and Artificial
Activation Functions
Automation
Activation Functions Redux
Logic Gates
Going Deep
Teachable Machine
into a representation of
1) light
2) detection
6) external objects
3) multiple stimuli are processed
4) assembled
5) properties
that are processed by the brain
to receive light stimuli
the position, shape, brightness, color of objects in space
Text
properties
external objects
representation of
multiple stimuli are processed
assembled
detection
1) light
dendrites
axon
nucleus
YOU
bit of the world
F01
F03
F06
F02
F04
F05
bit of the world
bit of the world
bit of the world
bit of the world
bit of the world
bit of the world
+ + = OK, then:
Every neuron is a function mapping an arbitrary set of binary inputs to a single binary output
7 of ten friends recommend going to the party instead of studying!
Go!
Go!
Go!
Hmm...
Hmm...
We "weight" our inputs based on how important they are ...
or how dependable they are.
Sumweighted = Input1 x weight1 + input2 x weight2 + ... + inputn x weightn
So Far...
An artificial neuron
if (weightedSum < threshold) do nothing else FIRE!
if (weightedSum < threshold) do nothing else FIRE!
weighted sum of inputs
0 1 2 3 4 5 6 7 8 9
output
1
0
threshold
Here we are on Zoom. Inputs are others turning on their video. Weights are 1 and your threshold is 4. Do you turn your video on?
Think about it: if you get bad advice from one of your friends, how does that affect how you weight their advice next time?
What if you have a friend who ALWAYS seems to give good advice?
A three by three grid of "pixels"
Think of the grid in one dimension
What does this pattern look like in one dimension?
What does this pattern look like in one dimension?
Have three neurons that take the pixels as "inputs"
Redraw to take advantage of the slide orientation
Add a neuron that takes the outputs of the first three neurons as its inputs
How many weights?
Na
Nb
Nc
Nd
P1
P3
P4
P6
P7
P9
P2
P5
P8
w1a w2a w3a w4a w5a w6a w7a w8a w9a
w1b w2b w3b w4b w5b w6b w7b w8b w9b
w1c w2c w3c w4c w5c w6c w7c w8c w9c
wad wbd wcd
Na
Nb
Nc
Nd
P1
P3
P4
P6
P7
P9
P2
P5
P8
w1a w2a w3a w4a w5a w6a w7a w8a w9a
w1b w2b w3b w4b w5b w6b w7b w8b w9b
w1c w2c w3c w4c w5c w6c w7c w8c w9c
wad wbd wcd
Could the network teach itself?
inputs
outputs
truth
feedback
Adjust each weight by some amount, a "delta" or difference depending on whether the sending node gave good advice (that is, got it right).
An artificial neuron converts a weighted sum of multiple inputs into a single output
A perceptron is a network of artificial neurons that can detect visual patterns
A perceptron is tuned by adjusting weights so it yields expected output for each input pattern.
"Learning" happens by increasing weights for neurons that "get it right" and decreasing weights for neurons that "get it wrong."
A system can be set to react more or less strongly to each learning experience.
"Learning" happens via feedback. The error or loss is the difference between the output and the "ground truth."
SIGMOID ACTIVATION FUNCTION
RECTIFIED LINEAR UNIT (ReLU) ACTIVATION FUNCTION
Sum the inputs
If negative return 0
Otherwise return sum
hidden layer
inputs
inputs
output
output
classes
labels
training data
error/loss
weights
predictions
how much attention does a neuron pay to each of its inputs?
in a classification model, the "bins" into which we put items we have classified
the outputs when a model is run on new data
how much we are getting wrong
the "correct" answers that are used to train a model
samples that we "show" the model so it can adjust its weights based on whether it gets it right or wrong
Text
<iframe height="300" style="width: 100%;" scrolling="no" title="" src="https://codepen.io/team/DanR/embed/wvdrORW?default-tab=js%2Cresult&editable=true&theme-id=light" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true" allow="geolocation *; microphone *; camera *; midi *; encrypted-media *">
See the Pen <a href="https://codepen.io/team/DanR/pen/wvdrORW">
</a> by innoeduvation(OLD) (<a href="https://codepen.io/team/DanR">@DanR</a>)
on <a href="https://codepen.io">CodePen</a>.
</iframe>
Here's a JavaScript implementation of the code in the video (Links to an external site.) (the JS code he mentions in the video):
I also have to doctor the CodePen embed a little. Here's what CodePen provides:
<iframe style="width: 100%;" title="Teachable Machine Example 01" src="https://codepen.io/team/DanR/embed/oNxLLyE?height=415&theme-id=light&default-tab=js,result&editable=true" height="415" allowfullscreen="allowfullscreen">
See the Pen <a href="https://codepen.io/team/DanR/pen/oNxLLyE">Teachable Machine Example 01</a> by innoeduvation(OLD)
(<a href="https://codepen.io/DanR">@DanR</a>) on <a href="https://codepen.io">CodePen</a>.</iframe>
And here's what I have to add to the <iframe> element after "allowfullscreen":
allow="geolocation *; microphone *; camera *; midi *; encrypted-media *"
allow="geolocation *; microphone *; camera *; midi *; encrypted-media *"
wnew = wold + learnRate * error
More on Tensors (optional)
A workspace where all the files of a web development project can be kept in an arrangement that mimics what we would do for creating a website.
FORKING a project means copying all the files to your own account so you can continue developing (on a different fork in the road)
original
your fork