Using Oracle Storage Cloud with Tensorflow

Waslley Souza
Jun 13, 2018 · 3 min read

Do you know Tensorflow? TensorFlow is an open source software library for high performance numerical computation. Maybe nowadays it is the most famous library used for Machine Learning and Deep Learning projects. This kind of solution is responsible for projects like autonomous vehicles and facial recognition.

There are many tutorials about Tensorflow and one of my favorites is the Transfer Learning. Transfer Learning is a technique that allows us to reuse an already trained model in a related task. In other words, we can use a model trained to recognize cats and dogs to recognize human faces. Transfer Learning is a good choice for people that have a computer without a GPU (my case =D).

In an object recognition project, we need to train or retrain our model with a lot of images, and a great storage cloud can be helpful.

In this blog post, you will learn how to use images stored in Oracle Cloud Object Storage Classic to train your models.

Please, look at this blog post to learn how to send your images to Oracle Cloud Object Storage Classic: Upload files to Oracle Object Storage Classic with FTM CLI.

TensorFlow has a good tutorial called “TensorFlow for Poets” and I used it to create this project. Download the files from Github.

git clone https://github.com/waslleysouza/tf4poets-with-oracle-cloud

Inside the tf4poets-with-oracle-cloud folder, start the Jupyter Notebook.

jupyter notebook tf4poets-with-oracle-cloud.ipynb

The Notebook is very simple.
In the third line, I’ve created a code that lists all the images in the local and cloud folders. If you add or remove an image in the cloud folder, this code will update it in your local folder.

Image for post
Image for post

When you run the fourth line for the first time, all images are downloaded and saved into the tf_files folder.

Image for post
Image for post

The last two lines execute the original scripts.
This code retrains the model using the images.

Image for post
Image for post

This code classifies an image. In this case, it tries to identify the type of flower.

Image for post
Image for post

Have a good time!

Originally published at waslleysouza.com.br on May 31, 2018.

Oracle Groundbreakers

Waslley Souza

Written by

Oracle ACE and expert in cloud solutions, Internet of Things, Deep Learning and Mobile for Public Sector at Oracle Brazil.

Oracle Groundbreakers

Aggregation of articles from Oracle engineers, Groundbreaker Ambassadors, ACEs, and the developer community on all things Oracle Cloud. The views expressed are those of the authors and not necessarily of Oracle.

Waslley Souza

Written by

Oracle ACE and expert in cloud solutions, Internet of Things, Deep Learning and Mobile for Public Sector at Oracle Brazil.

Oracle Groundbreakers

Aggregation of articles from Oracle engineers, Groundbreaker Ambassadors, ACEs, and the developer community on all things Oracle Cloud. The views expressed are those of the authors and not necessarily of Oracle.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store