TensorFlow 2.0 Computer Vision Cookbook
eBook - ePub

TensorFlow 2.0 Computer Vision Cookbook

Jesus Martinez

Buch teilen
  1. 542 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

TensorFlow 2.0 Computer Vision Cookbook

Jesus Martinez

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Get well versed with state-of-the-art techniques to tailor training processes and boost the performance of computer vision models using machine learning and deep learning techniquesKey Features• Develop, train, and use deep learning algorithms for computer vision tasks using TensorFlow 2.x• Discover practical recipes to overcome various challenges faced while building computer vision models• Enable machines to gain a human level understanding to recognize and analyze digital images and videosBook DescriptionComputer vision is a scientific field that enables machines to identify and process digital images and videos. This book focuses on independent recipes to help you perform various computer vision tasks using TensorFlow. The book begins by taking you through the basics of deep learning for computer vision, along with covering TensorFlow 2.x's key features, such as the Keras and tf.data.Dataset APIs. You'll then learn about the ins and outs of common computer vision tasks, such as image classification, transfer learning, image enhancing and styling, and object detection. The book also covers autoencoders in domains such as inverse image search indexes and image denoising, while offering insights into various architectures used in the recipes, such as convolutional neural networks (CNNs), region-based CNNs (R-CNNs), VGGNet, and You Only Look Once (YOLO). Moving on, you'll discover tips and tricks to solve any problems faced while building various computer vision applications. Finally, you'll delve into more advanced topics such as Generative Adversarial Networks (GANs), video processing, and AutoML, concluding with a section focused on techniques to help you boost the performance of your networks. By the end of this TensorFlow book, you'll be able to confidently tackle a wide range of computer vision problems using TensorFlow 2.x.What you will learn• Understand how to detect objects using state-of-the-art models such as YOLOv3• Use AutoML to predict gender and age from images• Segment images using different approaches such as FCNs and generative models• Learn how to improve your network's performance using rank-N accuracy, label smoothing, and test time augmentation• Enable machines to recognize people's emotions in videos and real-time streams• Access and reuse advanced TensorFlow Hub models to perform image classification and object detection• Generate captions for images using CNNs and RNNsWho this book is forThis book is for computer vision developers and engineers, as well as deep learning practitioners looking for go-to solutions to various problems that commonly arise in computer vision. You will discover how to employ modern machine learning (ML) techniques and deep learning architectures to perform a plethora of computer vision tasks. Basic knowledge of Python programming and computer vision is required.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist TensorFlow 2.0 Computer Vision Cookbook als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu TensorFlow 2.0 Computer Vision Cookbook von Jesus Martinez im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatique & Vision par ordinateur et reconnaissance de formes. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Chapter 1: Getting Started with TensorFlow 2.x for Computer Vision

One of the greatest features of TensorFlow 2.x is that it finally incorporates Keras as its high-level API. Why is this so important? While it's true that Keras and TensorFlow have had very good compatibility for a while, they have remained separate libraries with different development cycles, which causes frequent compatibility issues. Now that the relationship between these two immensely popular tools is official, they'll grow in the same direction, following a single roadmap and making the interoperability between them completely seamless. In the end, Keras is TensorFlow and TensorFlow is Keras.
Perhaps the biggest advantage of this merger is that by using Keras' high-level features, we are not sacrificing performance by any means. Simply put, Keras code is production-ready!
Unless the requirements of a particular project demand otherwise, in the vast majority of the recipes in this book, we'll rely on TensorFlow's Keras API.
The reason behind this decision is twofold:
  • Keras is easier to understand and work with.
  • It's the encouraged way to develop using TensorFlow 2.x.
In this chapter, we will cover the following recipes:
  • Working with the basic building blocks of the Keras API
  • Loading images using the Keras API
  • Loading images using the tf.data.Dataset API
  • Saving and loading a model
  • Visualizing a model's architecture
  • Creating a basic image classifier
Let's get started!

Technical requirements

For this chapter, you will need a working installation of TensorFlow 2.x. If you can access a GPU, either physical or via a cloud provider, your experience will be much more enjoyable. In each recipe, in the Getting ready section, you will find the specific preliminary steps and dependencies to complete it. Finally, all the code shown in this chapter is available in this book's GitHub repository at https://github.com/PacktPublishing/Tensorflow-2.0-Computer-Vision-Cookbook/tree/master/ch1.
Check out the following link to see the Code in Action video:
https://bit.ly/39wkpGN.

Working with the basic building blocks of the Keras API

Keras is the official high-level API for TensorFlow 2.x and its use is highly encouraged for both experimental and production-ready code. Therefore, in this first recipe, we'll review the basic building blocks of Keras by creating a very simple fully connected neural network.
Are you ready? Let's begin!

Getting ready

At the most basic level, a working installation of TensorFlow 2.x is all you need.

How to do it…

In the following sections, we'll go over the sequence of steps required to complete this recipe. Let's get started:
  1. Import the required libraries from the Keras API:
    from sklearn.model_selection import train_test_split
    from sklearn.preprocessing import LabelBinarizer
    from tensorflow.keras import Input
    from tensorflow.keras.datasets import mnist
    from tensorflow.keras.layers import Dense
    from tensorflow.keras.models import Model
    from tensorflow.keras.models import Sequential
  2. Create a model using the Sequential API by passing a list of layers to the Sequential constructor. The numbers in each layer correspond to the n...

Inhaltsverzeichnis