TensorFlow 2.0 Computer Vision Cookbook
eBook - ePub

TensorFlow 2.0 Computer Vision Cookbook

Jesus Martinez

Compartir libro
  1. 542 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

TensorFlow 2.0 Computer Vision Cookbook

Jesus Martinez

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es TensorFlow 2.0 Computer Vision Cookbook un PDF/ePUB en línea?
Sí, puedes acceder a TensorFlow 2.0 Computer Vision Cookbook de Jesus Martinez en formato PDF o ePUB, así como a otros libros populares de Informatique y Vision par ordinateur et reconnaissance de formes. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2021
ISBN
9781838820688

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...

Índice