Skip to content

Machine learning to keep our lab clean and efficient

Notifications You must be signed in to change notification settings

productize/deep-clean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
Oct 8, 2018
Oct 8, 2018
Oct 8, 2018
Oct 8, 2018
Oct 8, 2018
Oct 4, 2018
Oct 8, 2018
Oct 4, 2018
Oct 4, 2018

Repository files navigation

Productize lab deep clean neural network

This project uses the Inception V3 neural network for TensorFlow machine learning framework to build a graph model of clean, dirty and busy rooms.

It is based on the Use Artificial Intelligence to Detect Messy/Clean Rooms! guide by Matt Farley, which in term are based on the TensorFlow image retraining and image recognition examples.

Usage

Set-up

Train the neural network, resulting in the graph model and found labels (best to do this on a fast computer):

pip install -r requirements-label.txt
python retrain.py \
    --image_dir $TRAINING_IMAGES \
    --output_graph=deep-clean-graph.pb \
    --output_labels=deep-clean-labels.txt \
    --tfhub_module https://tfhub.dev/google/imagenet/inception_v3/feature_vector/1

Testing

Label a test image. Best practice is to use an image that was not used during training.

python label_image.py \
    --graph=deep-clean-graph.pb \
    --labels=deep-clean-labels.txt \
    --input_layer=Placeholder \
    --output_layer=final_result \
    --image=$IMAGE

Deploying

Install dependencies on a Raspberry Pi:

sudo apt install libatlas-base-dev
pip3 install -r requirements-server.txt

Run the server:

python3 deep-clean-server.py

TODO: create a service