Technical Log: Computer Vision and Machine Learning

A project log for ÓSK Squirrel

An Open Smart Kitchen (OSK) assistant for saving resources and meeting dietary goals by better utilizing the food you squirrel away

mepixmepix 08/25/2019 at 06:430 Comments

Since we are using the Jetson Nano as our primary board, we wanted to explore what could be done with the GPU.  We started our explorations with OpenCV and tried a little bit of machine learning with TensorFlow.

Though we knew that our needs would likely be best served with a neural network to classify different food items, we started with the OpenCV fundamentals.  We wrote a basic image segmentation algorithm using a background subtraction technique included in OpenCV.  This algorithm is sufficient to isolate objects placed on a shelf or in a fruit basket.

OSK-SegmentationTest from Mepix Bellcamp on Vimeo.

Next, we began exploring the ways we could improve food identification using TensorFlow. TensorFlow is an open source framework developed by Google for creating Deep Learning models and numerical computation.  TensorFlow is Python-friendly and makes machine learning easy.

TensorFlow allows the development of graphs which are structures that describe how data moves through a series of processing nodes. We used the Fruit 360 dataset to create a TensorFlow trained model to identify fruit.  Code was based on a file found here.  The code to create the model and graph and code to freeze the model into .pb and .pbtxt formats is on GitHub

While we were successful at training the test dataset on our x86 computers, we were having some difficulties getting TensorRT to work on the Nano.  Our future work will close this gap.