SMART ROBOTS�CAMP
OAK RIDGE COMPUTER SCIENCE GIRLS
ORCSGirls
ORCSGirls
Smart Robot Camp
RULES
Smart Robot Camp
Introductions
Welcome to our online class.
Today’s instructor and volunteers
Thomas Proffen
Katie Schuman
Addison Malone
Amelie Nagle
Grace Feng
Yvonne Dalschen
Smart Robot Camp
GETTING TO KNOW EACH OTHER�BINGO
Smart Robot Camp
Schedule
Monday | Tuesday | Wednesday | Thursday |
Introduction to Python JupyterLab and Widgets | Machine Learning Katie Schuman | Project: Object detection | Project: Road following |
Lunch | Lunch | Lunch | Lunch |
Getting to know JetBot JetBot Remote Control | Project: Collision Avoidance | Project: Object detection | Project: Road following cont. Parent Showcase |
Smart Robot Camp
This is an Advanced Camp
Things to remember
Smart Robot Camp
Introduction to Python
Day 1 - Morning
Smart Robot Camp
WHAT IS PYTHON?
Source: Wikipedia
?
Smart Robot Camp
WHAT ARE JUPYTER NOTEBOOKS?
The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text.
Analyzing neutron scattering data at ORNL using Jupyter notebooks.
Smart Robot Camp
Jupyter Lab
ls | Lists all files and directories - ls -l | mv | Move file - mv file1 file2 |
cd | Change directory - cd dir, cd .. | sudo <cmd> | Run command <cmd> as administrator |
pwd | Show current working directory | shutdown | Shut down Pi - sudo shutdown now |
mkdir | Make new directory - mkdir newdir | cat | Show content of text file - cat file |
cp | Copy file - cp file1 file2 | top | Show running processes (use ‘q’ to exit) |
Files
New Python Notebook
Open terminal
Smart Robot Camp
Activity
Open a browser and visit
Username:
Your first name, all lower case
Password:
First login you set your password. Do not forget it :)
Python introduction
Objects in Python
Using Widgets
Smart Robot Camp
Smart Robot Camp
Getting to know JetBot
Day 1 - Afternoon
Smart Robot Camp
Pair Programming
Two girls
One laptop
One robot
Unstoppable
Smart Robot Camp
Driver
Smart Robot Camp
Navigator
Responsible for robot safety!
Smart Robot Camp
Both
Smart Robot Camp
Robot rules
Smart Robot Camp
Robot Time!
Make sure you connect to your robot!
Caution - robot will move when running commands in the notebook!
Smart Robot Camp
Project: Movement
Part 1: basic_motion
Part II: teleoperation
Press at the same time to change mode.
Smart Robot Camp
Machine Learning
Day 2 - Afternoon
Smart Robot Camp
Smart Robot Camp
TRADITIONAL PROGRAMMING
Traditional code for “Is this picture a pig?”
if (isPink(picture) and hasTail(picture) and hasPointedEars(picture) and hasFourLegs(picture) and …) � print “Yes!”
else � print “No!”
Rules for
“Is this picture a pig?”
Is it pink?
Does it have a tail?
Pointed ears?
Four legs?
And so on...
Smart Robot Camp
Yes, even in Oak Ridge
?
Smart Robot Camp
HOW DO YOU DECIDE
WHAT THE RULES ARE?
Smart Robot Camp
YOU DON’T!
LET THE COMPUTER DO IT WITH
MACHINE LEARNING!
Smart Robot Camp
MACHINE LEARNING
A machine learning method takes a bunch of data and “learns” from it!
Label: Pig
Label: Not a pig
Label: Pig
Label: Not a pig
Machine
Learning
Method
Machine’s rules for determining whether or not an image is a pig
Data
Smart Robot Camp
WHAT’S THE DIFFERENCE BETWEEN MEMORIZING AND LEARNING?
Smart Robot Camp
DID IT “LEARN” SOMETHING?
Label: Pig
Label: Not a pig
Training Data
The data we give to the machine learning method to learn from
Testing Data
The data we hold out and use to check to see if the method actually learned something!
Label: Pig
Label: Not a pig
Label: Pig
Label: Not a pig
Smart Robot Camp
WHERE IS ML USED?
Smart Robot Camp
WHY DOES IT WORK NOW?
Lots of Data
Powerful Computers
Smart Robot Camp
NEURAL NETWORKS
Smart Robot Camp
NEURAL NETWORK EXPLANATION
30
50
70
2
-1
1
Smart Robot Camp
NEURAL NETWORK EXPLANATION
30
50
70
2
-1
1
30*2
Smart Robot Camp
NEURAL NETWORK EXPLANATION
30
50
70
2
-1
1
30*2 + 50*(-1)
Smart Robot Camp
NEURAL NETWORK EXPLANATION
30
50
70
2
-1
1
30*2 + 50*(-1) +70*1 = 80
80
if number > 0
send number
else
send 0
Smart Robot Camp
NEURAL NETWORK EXPLANATION
-30
30
70
2
-1
1
-30*2 + 30*(-1) +70*1
= -20
0
if number > 0
send number
else
send 0
Smart Robot Camp
NEURAL NETWORK EXPLANATION
-30
30
70
2
-1
1
-30*2 + 30*(-1) +70*1
= -20
0
if number > 0
send number
else
send 0
Weights
Smart Robot Camp
NEURAL NETWORK EXPLANATION
Smart Robot Camp
Neural Network Explanation
0.3
0.7
Guessed
Answer
1
0
Correct
Answer
Smart Robot Camp
Neural Network Explanation
0.3
0.7
Guessed
Answer
1
0
Correct
Answer
Update weights to get closer to the correct answer!
Smart Robot Camp
Neural Network Explanation
Run a data example through
Update weights
Keep repeating until your answers on the training set are good enough!
Smart Robot Camp
Human Neural Network Activity
Smart Robot Camp
Lets try with https://playground.tensorflow.org/
Smart Robot Camp
WHAT IS ALGORITHMIC BIAS?
Smart Robot Camp
Self-Driving Cars
Smart Robot Camp
Self-Driving Cars
Smart Robot Camp
Self-Driving Cars
Smart Robot Camp
Project:
Obstacle Avoidance
Day 2 - Afternoon
Smart Robot Camp
Collision Avoidance
Smart Robot Camp
Step 1 - Training Data Collection
Smart Robot Camp
Collision Avoidance
Step 2
Step 3
Smart Robot Camp
Pair Programming
Two girls
One laptop
One robot
Unstoppable
Smart Robot Camp
Robot Time!
Make sure you connect to your robot!
Caution - robot will move when running commands in the notebook!
Smart Robot Camp
Project:
Object detection and following
Day 3
Smart Robot Camp
Robot Time!
Make sure you connect to your robot!
Caution - robot will move when running commands in the notebook!
Smart Robot Camp
Project:
Road following
Day 4
Smart Robot Camp
Step 1 - Training Data Collection
Notebook
data_collection.ipynb
Smart Robot Camp
Road follow
Step 2
Step 3
Smart Robot Camp
Pair Programming
Two girls
One laptop
One robot
Unstoppable
Smart Robot Camp
Robot Time!
Make sure you connect to your robot!
Caution - robot will move when running commands in the notebook!
Smart Robot Camp
Parent Showcase
Day 4
Smart Robot Camp
THANK YOU SO MUCH FOR ATTENDING
Big thank you to our volunteers and sponsors.
ORCSGirls
ORCSGirls
Smart Robot Camp
Smart Robot Camp