Train an Image Classifier with TensorFlow for Poets – Machine Learning Recipes #6


86 Comments

  1. Akmon Ra

    June 19, 2017 at 11:54 pm

    Why don't you go over setup? This doesn't really walk through how to do this in practice.

  2. AlooMinati

    July 7, 2017 at 4:12 am

    Meme classifier to guess the template of the meme.
    https://github.com/VPanjeta/Meme-Classifier

  3. Kamran Ahmed

    July 10, 2017 at 7:19 am

    Is it possible to find the position of detected object with accuracy in given image using tensor flow?

  4. JP OConnor

    July 18, 2017 at 11:33 pm

    I wish my architect would code me with tensorflow so I would be better at deeper learning or at least know when I've been incepted.

  5. hussam shamek

    July 19, 2017 at 11:51 am

    It does not create retrained_graph.pb and retrained_labels.txt but it trained and showed the accuracy

  6. Kimathi Kirimi

    August 4, 2017 at 12:46 pm

    He is over acting ? I don't even see it. Nice work Josh

  7. Ioannis Anifantakis

    August 6, 2017 at 4:14 pm

    One thing I don't understand. If "inception" was already trained by 1.2million images, but we re-train it only for these 4 types of flowers, then why we need to retrain inception and not make a pure train for those images only?

    I mean in the video we saw the coliseum picture, but TF will try to treat it as flower. So all the inception images images are thrown away, so the coliseum picture is treated as flower.

    Also since we will supply those flowers pictures ourselves anyway (and we don't use any of the inception's flowers database), then why retrain inception and not just train a new library just with the flower images from scratch???

    Can someone please explain me this?

  8. Rio Tesa

    August 11, 2017 at 4:08 am

    hello, how many pictures would we need in the database so the machine would start classifying ethnicity correctly?

  9. Beautiful Chinese Eyes

    August 20, 2017 at 10:30 am

    Just got into machine learning, and thanks to the folks at google my experience has been great! Everything is very well documented and both the videos and codelabs' articles are extremely easy to follow. Thanks-a-lot!

  10. 88kenaz

    August 24, 2017 at 8:34 am

    Hello all!! I'm gonna attempt a few world-saving ai things and I'm wondering… are we obliged to have the image files present at storage? Also, where can we download pre-trained scripts??

  11. Shashank Rammoorthy

    August 30, 2017 at 12:08 pm

    How do you find the accuracy of the classifier? Is that even possible?

  12. Pavan Yeddanapudi

    September 4, 2017 at 3:49 pm

    Suppose if the data set images have a rating/score, Is there any algorithm or any way to get a rating/score of a test image using inception V3 model?

  13. kedar nadkarny

    September 11, 2017 at 5:50 pm

    Can I export this model to my iOS App?

  14. Cube Craft

    September 12, 2017 at 8:00 pm

    I am having trouble using the train python command on windows. I am using anaconda to install tensorflow but I can't use the steps in the video. Please help

  15. CS Programmer

    September 14, 2017 at 11:36 am

    Does anybody know how can we fine-tune the model? I mean keep updating the weights while training via backprogation? not only the last layer.

  16. [email protected] [email protected]

    October 6, 2017 at 10:12 am

    Doing it on Python 3?
     Don't want to pause the video and write?
     Find the code here: https://github.com/akanshajainn/Machine-Learning—Google-Developers

  17. Ashley Fernandes

    October 21, 2017 at 6:37 am

    Can somebody please explain how does tensorflow calculate the confidence level (the percentage match) ? On what basis does it give the number?

  18. Japka

    October 22, 2017 at 7:27 am

    So can i sort certain clothing someone is wearing in a picture?

  19. Bel Rick

    October 24, 2017 at 3:00 am

    Trained
    Ran photo of a weird type of rose
    Came back as a tulip
    Added weird types of rose to flower photos (different photos )
    retrained
    Came back as rose
    w00t

  20. Viral Hub

    November 6, 2017 at 5:33 am

    Would you upload the complete series in future ?

  21. MDevel Jexplorer

    November 18, 2017 at 10:55 pm

    If this image classifier uses Inception as a base, I understood that the flowers training data would be an addition to what the model has already learned. Doesn't that mean that the image of the Colosseum would be classified as a 'building' ? or an image of a sunflower (not in the new training data) would be classified as a 'flower' ? (i.e. fallback to the prior learning of Inception, if it had that level of knowledge).

  22. Comp Lovr

    November 25, 2017 at 5:45 am

    The example code shown is broken with the new changes to tensorflow. Can it be changed, so that no one gets a problem when trying out the code?

  23. Rodger Wilson

    November 29, 2017 at 5:54 pm

    I error out on this…

    tensorboard –logdir tf_files/training_summaries &
    [3] 41287
    [1]   Terminated: 15          tensorboard –logdir tf_files/training_summaries
    [2]   Terminated: 15          tensorboard –logdir tf_files/training_summaries
    mac:tensorflow-for-poets-2 rwilson$ /Users/rwilson/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6

  24. Marcel Mersch

    December 1, 2017 at 4:57 pm

    Does the code from the codelab work on Windows?If not where can i find it for Windows?

  25. Jovi World

    December 21, 2017 at 8:34 pm

    Hi, I want to make a character recognition from images using tensorflow that performs somehow like google vision API. How can I implement that. thanks in advance

  26. Sarah R

    December 25, 2017 at 10:43 am

    Hi,

    i have a problem when trying to retrain the network on windows 8 with use of anaconda and python 3.5. When I execute the command "python -m scripts.retrain" within the tensorflow environment in the anaconda prompt, I get the error message "no module named scripts". The installation of tensorflow is located here: "C:Anaconda2envstensorflow" and python 3.5 here: "C:Anaconda2envspy35". I also wondered why I couldn't find any retrain.py file or example folder inside the tensorflow installation.

    Can someone help me?

  27. Srinidhi Sharma

    January 5, 2018 at 2:35 pm

    Great one, can we build an image classifier for gender recognition from face images using inception model is it similar it'd be great if you could make a video on that …

  28. Nick Davenport

    January 11, 2018 at 3:31 pm

    I can't find the images on tensorflow as per script at 1:29!?

  29. mario champion

    January 11, 2018 at 7:50 pm

    i built a python command line app at https://github.com/mariochampion/roboflow to explore tensorflow's image classification from the tutorial (see how hyperparam tweakinga ffected outcomes, etc) by making it easy to download 1000s of images from imgur by tag, auto-sort them, use them to retrain, make a classifer, which sorts new images to make a better classifier, etc etc

    i posted it to github and would love any feedback from how the app works for ya, to how the readme works (tooo much info, too little). issues, PRs, comments are totally welcome!

  30. Shreya Gaddam

    January 14, 2018 at 12:35 pm

    What should I do to increase the accuracy rate? Presently, it is at 48%. I have a dataset of about 40k images, divided into 5 classes. Any help would be appreciated 🙂

  31. Marvin Tong

    January 24, 2018 at 12:37 pm

    i have train the image classifier with the data set from kaggle called "Food 101", and the final accuracy is 55.6%. In the data set, each subfolder have 1000 images. I am using default steps of testing which is 4000 steps and mobilenet 1.0 224px.
    Is there anything I can do to improve the accuracy of the trained image classifier? Thank you.

  32. Gaurav jha

    January 28, 2018 at 5:00 pm

    ineption ketto chai

  33. Gaurav jha

    January 28, 2018 at 5:01 pm

    bato naii bargahi bhai

  34. ahh dragon

    February 7, 2018 at 5:43 pm

    Great video
    Just 1 question. Can you find the coordinates of the matching image? If so how?

  35. Kevin Andres Ortiz Merchan

    February 7, 2018 at 9:42 pm

    Somebody know? If exists some dataset trained in tensorflow to classify faces people?

  36. Elmirrah Lorraine Ola

    February 24, 2018 at 2:14 am

    Hello sir .i am having a problem with my own trained pb file. I placed it in android studio then I installed it in my mobile phone but it crashes everytime I opened it. I already changed INPUT_NAME, OUTPUT, SIZE, STD and MEAN. I don't know what to do. Kindly help me please ………

  37. Jeet Sensarma

    February 26, 2018 at 4:49 pm

    In the code snippet shown as an example , learn.DNNClassifier() takes in an argument feature_columns=[ , ]. can anyone explain why we need this , and dwhat is its significance , as my code is not running without this argument

  38. Ali BV

    March 4, 2018 at 6:48 am

    Excellent videos

  39. José Luis

    March 5, 2018 at 7:29 pm

    how do I deal with false positives?

  40. Tran Cong Quoc

    March 8, 2018 at 11:15 am

    Hi could you show me how to rectangle (object detection) for multiple flowers on an image. thank you!

  41. Chaitanya Dhore

    March 9, 2018 at 7:09 pm

    how can i do this in windows?

  42. Rodney M

    March 31, 2018 at 4:54 pm

    Simple AF and works great. Many thanks from Stuttgart

  43. tennis dingo

    March 31, 2018 at 9:56 pm

    how do you do this to a robot

  44. Xuanxiao Yang

    April 9, 2018 at 12:28 pm

    this is the first so practical Machine learning video series i have ever found. great! thanks.

  45. ravi shankar

    April 10, 2018 at 2:12 pm

    best tutor i have ever seen

  46. Kiran Randhawa

    April 15, 2018 at 8:36 am

    I'm trying to make a sentiment analysis classifier with an RNN. Does anyone have suggestions or information on how to pretrain a model like Google did with inception? I'd like to be able to provide a base model that can be extended / modified without the need to ship the training data.

  47. Hostel Kitchen

    April 23, 2018 at 5:49 pm

    the codelab has changed its sublinks

  48. Carpio Erwin John T.

    April 27, 2018 at 4:12 pm

    Hi, how do i use SaveModel to save the retrained model? I'm prepping the SavedModel for tensorflowjs converter tool so I can deploy it to the web.

  49. bone bone

    May 7, 2018 at 1:47 am

    Thank you.

  50. sukanta kr

    May 16, 2018 at 12:00 pm

    I should comments on every tutorial of you sir!..it just amazing and very very helpful to me!..thank you so much sir!..one request that keep uploading ML projects videos ,so that we will have a very well understanding on ML!😊😊

  51. Prwtogenws

    May 19, 2018 at 12:27 pm

    Nice tutorial!

  52. Junho Lee

    May 21, 2018 at 12:51 pm

    How the hell am I supposed to do this with Windows?

  53. Ajay Rawat

    May 24, 2018 at 3:25 pm

    What could have been the pun at 4:06 🤔

  54. Ekaansh Khosla

    May 30, 2018 at 1:16 pm

    how many layers are in this inception module?

  55. Russell Thurman

    June 13, 2018 at 5:43 pm

    Could not get anything form TensorFlow for Poets to work!

  56. Ritankar Paul

    June 29, 2018 at 2:55 pm

    What does "for poets" mean? does it literally means "poets">

  57. Kshitiz Aryal

    July 1, 2018 at 7:59 am

    I am not being able to download the training datas. It says temporarily unavailable.

  58. Hriteek Bista

    July 2, 2018 at 7:27 am

    This code doesn't work

  59. Hadis Malekie

    July 14, 2018 at 6:18 am

    this series of videos are so useful, it has described ML so easy, thanks

  60. Vishal Borana

    July 14, 2018 at 8:37 pm

    I'm getting the tensorflow: Image Directory not found error
    What is the path for the images?

  61. Aneesh Babu

    August 1, 2018 at 9:17 pm

    where to find the code??

  62. Darshak Mehta

    August 9, 2018 at 3:51 pm

    Tensor-flow doesn't work for me. I am using Anaconda Spyder, Mac OS High Sierra, Python 3.x and Tensorflow 1.10. Keep on getting errors related to attribute not found and module not found. I tried installing everything starting from pip, pip3 to tensorflow and went through many stackoverflow pages related to these all. But at the end, no show. Can somebody please help/

  63. Nagaraju Musini

    August 12, 2018 at 4:58 am

    Its worked great, but when i retrained again, old categories/classifications are gone, can you help me how can i keep old data and train new categories on top of it

  64. Sabyasachi Das

    August 15, 2018 at 4:26 am

    retrain.py isn't working
    an error message saying "Illegal instruction (core dumped)" is being displayed everytime I try to 'retrain'

  65. asmita Shenvi

    August 29, 2018 at 5:00 pm

    can you plz share the code

  66. Dave Brownburg

    September 1, 2018 at 2:09 pm

    Update Note: cross_validation needs to be changed to model_selection because of deprecation.

  67. Li-Pu Chen

    September 6, 2018 at 7:16 am

    Good demonstration, the best video for beginner I've seen so far.

  68. Bia Technologies

    September 13, 2018 at 1:19 pm

    Hi! I'm trying this example (TensorFlow for Poets) with my custom images. I just want to classify, that object in camera view is one type of needed to me document (so it's A4 paper with text and some stamps). I've trained network by 100 images of this documents and 50 images of this document but incorrect (wrong stamps and so on), So,after that I've got the model.pb and two labels ('correct' and 'invalid') and try to use it in android app. But app always says that all I'm seeing in the camera screen (peoples, desks, windows, nature…) – is my CORRECT document label. Only sometimes, if I catch document with wrong stamps in the camera screen I've got INVALID label. So, my question is – what concept of this classifier I don't understand and how should I train model to classify only correct type of my documents? Do I need to have one one label (and one images folder in train so on), or I need to do smh else? Please give me advise about this

  69. ycs jose

    September 29, 2018 at 7:49 am

    super good tutor. very easy to understand the intro for computer science

  70. Chris S

    October 12, 2018 at 7:14 pm

    Excellent presentation.

  71. Muhammad Talha Zaroon

    October 14, 2018 at 7:53 am

    For Windows Users:

    use this tool work like a charm:
    https://docs.docker.com/toolbox/toolbox_install_windows/

    Note: During "git clone" don't forget to change the directory otherwise you will get permission denied…Everything will be the same as described… Enjoy it

  72. Soufiane Fartit

    October 18, 2018 at 3:40 pm

    code updated 18/10/2018 :

    from sklearn import metrics, model_selection
    import tensorflow as tf
    from tensorflow.contrib import learn

    def main(unused_argv):
    #load datasets
    #iris = learn.datasets.load_datasets('iris')
    iris = learn.datasets.load_iris() # use scikit.learn.datasets in the future
    x_train, x_test, y_train, y_test = model_selection.train_test_split(iris.data, iris.target, test_size = .2, random_state = 42)
    #build 3 layer DNN with 10 20 10 units respectively
    feature_columns = [tf.contrib.layers.real_valued_column("", dimension=1)]
    classifier = learn.DNNClassifier(feature_columns=feature_columns, hidden_units=[10,20,10],n_classes=3)
    #fit and predict
    classifier.fit(x_train, y_train, steps = 200)
    x_predict = classifier.predict_classes(x_test)
    x_predict = [x for x in x_predict ]
    score = metrics.accuracy_score(y_test, x_predict)
    print('Accuracy: {0:f}'.format(score))

    main(5)

  73. Endless Void Studios

    October 31, 2018 at 6:18 pm

    great vid but how do i do tensor-flow for poets on windows instead of linux?

  74. Jethro Bodeen

    November 1, 2018 at 3:15 pm

    Your tutorials are impossible to follow. The steps you give do not work. Part of the problem is that you jump between WSL/ubuntu/bash and windows command line, without any indication of which. You also jump between directories within each of those, without any indication when you are doing so.

    I came here hoping to see a walkthrough, but you just talk about a few concepts (for which you have great presentation) but you never actually show the steps needed to get things to work.

  75. Cole9559

    November 9, 2018 at 5:54 am

    all hail josh gordon. google sure knows how to pick em

  76. Sanjar Karshiev

    November 30, 2018 at 9:40 am

    Guys, I am a new comer here and use Windows 10. I never use Mac or Linux. I do not understand the codes written in Linux code.
    Who can help me, please?

  77. Sanjar Karshiev

    November 30, 2018 at 9:54 am

    A basic understanding of Linux commands, this is what I don not know. Please help me guys!

  78. Carlitox

    December 27, 2018 at 8:44 am

    To use it in windows just follow this:

    1) Donwload this file and place it in a folder https://github.com/tensorflow/hub/blob/master/examples/image_retraining/retrain.py

    2) Install tensorflow-hub ("conda install -c conda-forge tensorflow-hub" if you have conda)

    3) Download the images .tar and open it with 7zip or with any file archiver, then unzip it in a folder called "tf_files", the same folder that the file of the 1st step.
    The structure of the folder should look like this:.

    root
    | – tf_files
    | – flower_photos
    | – daisy
    | – …
    | – retrain.py

    4) Run the script from the Tensorflow Poets page. Make sure it is in only one line (you can paste it in a browser url and then copy it again)

    5) To test it you can download the following file https://github.com/tensorflow/tensorflow/raw/master/tensorflow/examples/label_image/label_image.py
    Put it inside the folder "tf_files"
    Then run the script: python label_image.py –graph=retrained_graph.pb –labels=retrained_labels.txt –input_layer=Placeholder –output_layer=final_result –image=my_test_image.jpg

    Good Luck!!

  79. Obed Vazquez Lopez

    January 15, 2019 at 12:01 pm

    Java please? 🙁

  80. anas butt

    February 4, 2019 at 7:44 am

    👍 explanation .You made complex things pretty simple.Thanks.

  81. AwesomeSikh333

    February 7, 2019 at 10:08 am

    I like how his body movement speeds up between 5:09 and 5:11

  82. yuvan bajjurla

    March 17, 2019 at 12:10 pm

    What is retrain.py and why is it used???

  83. Abhijeet Singh

    May 9, 2019 at 7:29 pm

    The CodeLab mentioned in the video description is now deprecated as of TensorFlow 2.0. Can you please update the link to point to a newer article?

  84. Juan Carlos Garcia Lopez

    May 20, 2019 at 6:30 pm

    ok

  85. Johannes Zwilling

    May 22, 2019 at 4:03 pm

    Thank you, Sir! Question though: What is the outlook for successful classification between, let's say, two individual pets from the same species? It's the same class (cats?) I guess, but will the model be able to distinguish between the subtle differences of the two?

  86. Tristan Sun

    July 13, 2019 at 2:09 pm

    How do I use the image classifier on an image in Command Prompt?

  87. Dipu Roy

    September 13, 2019 at 4:10 pm

    Anyone facing trouble following this tutorial actually on copy pasting the retrain.py script from codelab[4:15] ? I couldn't cope up with the steps . That script is not running on my machine. Any suggestion please?

Leave a Reply