Things used in this project

Hardware components:
Pack pro mobile lgnchugrkz
Walabot
×1
Chip%20v1
C.H.I.P.
×1

Code

An image Classification example Python
Such an easy script can be used to classify images gathered by walabot.
import os
import numpy as np
from keras.models import Sequential
from keras.layers import Activation, Dropout, Flatten, Dense
from keras.preprocessing.image import ImageDataGenerator
from keras.layers import Convolution2D, MaxPooling2D, ZeroPadding2D
from keras import optimizers

img_width, img_height = 150, 150

train_data_dir = 'data/train_small'
validation_data_dir = 'data/validation_small'


# loading the images in two groups: training and validation
datagen = ImageDataGenerator(
    rescale=1./255,
    shear_range=0.2,
    zoom_range=0.2,
    horizontal_flip=True)

train_generator = datagen.flow_from_directory(
    train_data_dir,
    target_size=(img_width, img_height),
    batch_size=32,
    class_mode='binary'
)

validation_generator = datagen.flow_from_directory(
    validation_data_dir,
    target_size=(img_width, img_height),
    batch_size=32,
    class_mode='binary'
)

# building the brain
model = Sequential()
model.add(Convolution2D(32, (3, 3), input_shape=(img_width, img_height, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Convolution2D(32, (3, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Convolution2D(64, (3, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Flatten())
model.add(Dense(64))
model.add(Activation('relu'))
model.add(Dropout(0.5))
model.add(Dense(1))
model.add(Activation('sigmoid'))

model.compile(loss='binary_crossentropy',
             optimizer='rmsprop',
             metrics=['accuracy'])

# training the model
nb_epoch = 30
nb_train_samples = 2048
nb_validation_samples = 832

model.fit_generator(
    train_generator,
    steps_per_epoch=nb_train_samples/32,
    epochs=nb_epoch,
    validation_steps=nb_validation_samples/32)

# validate the weights
model.evaluate_generator(validation_generator, nb_validation_samples)

Credits

69655715399db5fa781b35bde1984fdb
Enrico Colautti

Software developer, DIYer, scuba diver

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Pre-Collision Assist with Pedestrian Detection - Honda Civic
Intermediate
  • 1,652
  • 19

Full instructions

Combine Walabot's RF radar with real-time hazard detection and classification from camera, powered by TensorFlow with YOLO approach.

FAM
Intermediate
  • 236
  • 3

Work in progress

Super Secret Messaging with pocketCHIP!

El Wire T-shirt: Connected to a LightBlue Bean
Intermediate
  • 99
  • 6

Work in progress

A custom Internet connected shirt using a LightBlue Bean to light up the shirt's El Wire graphics.

Pulsecounting and Deepsleep Based IoT Water Meter
Intermediate
  • 86
  • 2

This project creates a way to monitor water usage, to reduce water costs.

Walabot Target Visualization in WebVR
Intermediate
  • 178
  • 6

Full instructions

Using Intel Compute Stick & Walabot, host a website to visualize Walabot sensor data in VR. Create NodeJS bindings for Walabot.

Walabot Wheelchair
Intermediate
  • 187
  • 2

Full instructions

An early alert system for wheelchair users to avoid collisions

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Feedback