Google I/O 2017: Open Source TensorFlow Models

Posted by


Open Source TensorFlow Models is an open source project launched by Google at Google I/O ’17. It provides a collection of pre-trained models for image recognition, text processing, and other machine learning tasks. In this tutorial, we will go through how to use Open Source TensorFlow Models, how to train your own models, and how to contribute to the project.

  1. Setting up TensorFlow Models

First, you need to install TensorFlow if you haven’t already. You can do this using pip:

pip install tensorflow

Next, clone the TensorFlow Models repository from GitHub:

git clone https://github.com/tensorflow/models.git

Now you have the TensorFlow Models repository on your local machine. Change into the directory:

cd models
  1. Using Pre-trained Models

Open Source TensorFlow Models provides a variety of pre-trained models for image recognition, object detection, and text processing. You can easily use these models in your projects to perform tasks like image classification or text generation.

To use a pre-trained model, first download the model checkpoints from the TensorFlow Models zoo. You can find the model checkpoints at:

https://github.com/tensorflow/models/tree/master/research/slim

Choose a model that fits your task and download the checkpoint files. For example, if you want to use the Inception v3 model for image recognition, download the Inception v3 checkpoint files from the above link.

Once you have the checkpoint files, you can use the TensorFlow Models API to load the model and perform inference. Here is an example code snippet using the Inception v3 model:

import tensorflow as tf
from tensorflow.models.research.slim.nets import inception 

# Load the Inception v3 model
with tf.Session() as sess:
    inputs = tf.placeholder(tf.float32, [None, 299, 299, 3])
    logits, _ = inception.inception_v3(inputs)

    # Restore the model checkpoint
    saver = tf.train.Saver()
    saver.restore(sess, 'path_to_inception_v3_checkpoint')

    # Perform inference
    input_data = ...
    predictions = sess.run(logits, feed_dict={inputs: input_data})
  1. Training Your Own Models

You can also use Open Source TensorFlow Models to train your own models. The repository provides scripts and examples for training models on datasets like ImageNet or COCO. You can modify these scripts to train your own models on custom datasets.

To train a model, first download the training data and prepare it according to the model’s requirements. Next, modify the training script to point to your data and configure the training parameters.

Here is an example of training a model on a custom dataset:

python object_detection/train.py --logdir=/path/to/logs --dataset=/path/to/dataset --num_classes=10 --num_steps=100000

This command trains an object detection model on a custom dataset with 10 classes for 100,000 steps. You can adjust the parameters based on your dataset and task.

  1. Contributing to the Project

Open Source TensorFlow Models is an open source project, and contributions are welcome from the community. If you want to contribute to the project, you can submit pull requests with bug fixes, new models, or improvements to the existing codebase.

To contribute, fork the TensorFlow Models repository on GitHub and make your changes in a feature branch. Once you are done, submit a pull request to the main repository. The project maintainers will review your changes and merge them if they meet the project’s standards.

In this tutorial, we have covered how to use Open Source TensorFlow Models, train your own models, and contribute to the project. With its collection of pre-trained models and tools for training custom models, Open Source TensorFlow Models is a valuable resource for machine learning practitioners.

0 0 votes
Article Rating

Leave a Reply

24 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@EscapeAdventures
3 days ago

Work on dementia and alzheimers prevention 🙂

@tylerbarker4763
3 days ago

from eye to cone , I just took your aligorthym/algorithm name to sound city populationTGB – Tyler Guy Barker

@khrumkashan6954
3 days ago

Thank you Josh ! Such a awesome guy and great video loved it .

@JOKBO1
3 days ago

Such a great presentation!

@diegushio91
3 days ago

no real dogs where caged during this video.

@chenmaus
3 days ago

great content and great presentation, google just have so many amazing people that could keep the company great

@chrissharkeyai
3 days ago

Fantastic talk!

@walterwhite5249
3 days ago

I think all those who have been disliked should be & can be classified as fools By using Tensor flow classifiers….

@lupusk9productions
3 days ago

omg screw watch repair i need to go into this stuff. So exciting!!!

@athuldevin
3 days ago

i have a plan to develop a generative chat bot using tensor flow , from where should i start

@kennedynganga4210
3 days ago

@13:21 is when he touches on the most interesting part of his whole talk>> Transfer Learning. Wish he'd gone into more detail and practice on this.

@jobiej7416
3 days ago

Hi. How can I use tensorflow in a progressive web app.

@nishatsayyed8326
3 days ago

his smile while he is speaking is so engaging……. appreciated🔥👍👍

@gbhall
3 days ago

Thank you Josh, awesome talk. How can you not like this guy?

@gbhall
3 days ago

See Josh in thumbnail, immediately click video.

@lilaiwan3309
3 days ago

a great company

@muhammadhannan6701
3 days ago

Tensorflow re-trained model on Inception-V3 takes longer to predict than the Inceptio-V3 provided. How can we optimize our model?

@lightowl4345
3 days ago

@ approx 23 minutes he describes something that is done by toolwiz photos, one of my favorite apps.

@jcjensenllc
3 days ago

either scale the talk to to the alotted time or schedule more time. I want to see slides when mentioned, I don't need to see speaker.

@GughaGSrinivasan
3 days ago

Hot dog or not a hot dog…. can we use tensor flow for that? 😛

24
0
Would love your thoughts, please comment.x
()
x