Skip to Content
Mastering Computer Vision with TensorFlow 2.x
book

Mastering Computer Vision with TensorFlow 2.x

by Krishnendu Kar
May 2020
Beginner to intermediate
430 pages
10h 39m
English
Packt Publishing
Content preview from Mastering Computer Vision with TensorFlow 2.x

Downloading weights

The code for downloading the weights is as follows:

from tensorflow.keras.applications import VGG16from keras.applications.vgg16 import preprocess_inputfrom tensorflow.keras.applications.resnet50 import ResNet50, preprocess_inputfrom tensorflow.keras.applications import InceptionV3from keras.applications.inception_v3 import preprocess_input

The preceding code performs the following two tasks:

  1. The weights will be downloaded as follows as part of the output from the preceding code:
  • Download VGG16 weight, the *.h5 file
  • Download Resnet50 weight, the *.h5 file
  • Download InceptionV3 weight, the *.h5 file
  1. It does the preprocessing of the image to normalize the current image to the ImageNet RGB dataset. Since the model is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres

Publisher Resources

ISBN: 9781838827069Supplemental Content