E-Book, Englisch, 294 Seiten
Michelucci Advanced Applied Deep Learning
1. ed
ISBN: 978-1-4842-4976-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Convolutional Neural Networks and Object Detection
E-Book, Englisch, 294 Seiten
ISBN: 978-1-4842-4976-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Develop and optimize deep learning models with advanced architectures. This book teaches you the intricate details and subtleties of the algorithms that are at the core of convolutional neural networks. In Advanced Applied Deep Learning, you will study advanced topics on CNN and object detection using Keras and TensorFlow. Along the way, you will look at the fundamental operations in CNN, such as convolution and pooling, and then look at more advanced architectures such as inception networks, resnets, and many more. While the book discusses theoretical topics, you will discover how to work efficiently with Keras with many tricks and tips, including how to customize logging in Keras with custom callback classes, what is eager execution, and how to use it in your models. Finally, you will study how object detection works, and build a complete implementation of the YOLO (you only look once) algorithm in Keras and TensorFlow. By the end of the book you will have implemented various models in Keras and learned many advanced tricks that will bring your skills to the next level.
What You Will Learn See how convolutional neural networks and object detection workSave weights and models on diskPause training and restart it at a later stage Use hardware acceleration (GPUs) in your codeWork with the Dataset TensorFlow abstraction and use pre-trained models and transfer learningRemove and add layers to pre-trained networks to adapt them to your specific projectApply pre-trained models such as Alexnet and VGG16 to new datasets Who This Book Is For Scientists and researchers with intermediate-to-advanced Python and machine learning know-how. Additionally, intermediate knowledge of Keras and TensorFlow is expected.
Umberto Michelucci studied physics and mathematics. He is an expert in numerical simulation, statistics, data science, and machine learning. In addition to several years of research experience at the George Washington University (USA) and the University of Augsburg (DE), he has 15 years of practical experience in the fields of data warehouse, data science, and machine learning. His last book Applied Deep Learning - A Case-Based Approach to Understanding Deep Neural Networks was published by Apress in 2018. He is very active in research in the field of artificial intelligence and publishes his research results regularly in leading journals and gives regular talks at international conferences.
He teaches as a lecturer at the Zurich University of Applied Sciences and at the HWZ University of Applied Sciences in Business Administration. He is also responsible for AI, research, and new technologies at Helsana Vesicherung AG.
He recently founded TOELT LLC, a company aiming to develop new and modern teaching, coaching, and research methods for AI, to make AI technologies and research accessible to everyone.
Autoren/Hrsg.
Weitere Infos & Material
1;Table of Contents;5
2;About the Author;10
3;About the Technical Reviewer;11
4;Acknowledgments;12
5;Introduction;13
6;Chapter 1: Introduction and Development Environment Setup;15
6.1;GitHub Repository and Companion Website;17
6.2;Mathematical Level Required;17
6.3;Python Development Environment;18
6.3.1;Google Colab;19
6.3.1.1;Benefits and Drawbacks to Google Colab;22
6.3.2;Anaconda;23
6.3.2.1;Installing TensorFlow the Anaconda Way;25
6.3.2.2;Local Jupyter Notebooks;28
6.3.2.3;Benefits and Drawbacks to Anaconda;31
6.3.3;Docker Image;32
6.3.3.1;Benefits and Drawbacks to a Docker Image;38
6.4;Which Option Should You Choose?;39
7;Chapter 2: TensorFlow: Advanced Topics;41
7.1;Tensorflow Eager Execution;42
7.1.1;Enabling Eager Execution;43
7.1.2;Polynomial Fitting with Eager Execution;44
7.1.3;MNIST Classification with Eager Execution;48
7.2;TensorFlow and Numpy Compatibility;53
7.3;Hardware Acceleration;54
7.3.1;Checking the Availability of the GPU;54
7.3.2;Device Names;55
7.3.3;Explicit Device Placement;56
7.3.4;GPU Acceleration Demonstration: Matrix Multiplication;57
7.3.5;Effect of GPU Acceleration on the MNIST Example;59
7.4;Training Only Specific Layers;61
7.4.1;Training Only Specific Layers: An Example;62
7.4.2;Removing Layers;66
7.5;Keras Callback Functions;68
7.5.1;Custom Callback Class;69
7.5.2;Example of a Custom Callback Class;71
7.6;Save and Load Models;75
7.6.1;Save Your Weights Manually;81
7.6.2;Saving the Entire Model;82
7.7;Dataset Abstraction;82
7.7.1;Iterating Over a Dataset;85
7.7.2;Simple Batching;86
7.7.3;Simple Batching with the MNIST Dataset;87
7.7.4;Using tf.data.Dataset in Eager Execution Mode;90
7.8;Conclusions;91
8;Chapter 3: Fundamentals of Convolutional Neural Networks;92
8.1;Kernels and Filters;92
8.2;Convolution;94
8.3;Examples of Convolution;104
8.4;Pooling;112
8.4.1;Padding;117
8.5;Building Blocks of a CNN;118
8.5.1;Convolutional Layers;118
8.5.2;Pooling Layers;121
8.5.3;Stacking Layers Together;121
8.6;Number of Weights in a CNN;122
8.6.1;Convolutional Layer;122
8.6.2;Pooling Layer;123
8.6.3;Dense Layer;123
8.7;Example of a CNN: MNIST Dataset;123
8.8;Visualization of CNN Learning;128
8.8.1;Brief Digression: keras.backend.function();128
8.8.2;Effect of Kernels;131
8.8.3;Effect of Max-Pooling;134
9;Chapter 4: Advanced CNNs and Transfer Learning;137
9.1;Convolution with Multiple Channels;137
9.2;History and Basics of Inception Networks;141
9.2.1;Inception Module: Naïve Version;143
9.2.2;Number of Parameters in the Naïve Inception Module;144
9.2.3;Inception Module with Dimension Reduction;145
9.3;Multiple Cost Functions: GoogLeNet;146
9.4;Example of Inception Modules in Keras;148
9.5;Digression: Custom Losses in Keras;151
9.6;How To Use Pre-Trained Networks;153
9.7;Transfer Learning: An Introduction;157
9.8;A Dog and Cat Problem;161
9.8.1;Classical Approach to Transfer Learning;162
9.8.2;Experimentation with Transfer Learning;169
10;Chapter 5: Cost Functions and Style Transfer;173
10.1;Components of a Neural Network Model;173
10.1.1;Training Seen as an Optimization Problem;174
10.1.2;A Concrete Example: Linear Regression;176
10.2;The Cost Function;177
10.2.1;Mathematical Notation;177
10.2.2;Typical Cost Functions;178
10.2.2.1;Mean Square Error;178
10.2.2.1.1;Intuitive Explanation;179
10.2.2.1.2;MSE as the Second Moment of a Moment-Generating Function;179
10.2.2.2;Cross-Entropy;181
10.2.2.2.1;Self-Information or Suprisal of an Event;181
10.2.2.2.2;Suprisal Associated with an Event X;183
10.2.2.2.3;Cross-Entropy;183
10.2.2.2.4;Cross-Entropy for Binary Classification;185
10.2.2.3;Cost Functions: A Final Word;188
10.3;Neural Style Transfer;188
10.3.1;The Mathematics Behind NST;190
10.3.2;An Example of Style Transfer in Keras;195
10.3.3;NST with Silhouettes;202
10.3.4;Masking;204
11;Chapter 6: Object Classification: An Introduction;206
11.1;What Is Object Localization?;207
11.1.1;Most Important Available Datasets;210
11.1.2;Intersect Over Union (IoU);211
11.2;A Naïve Approach to Solving Object Localization (Sliding Window Approach);213
11.2.1;Problems and Limitations the with Sliding Window Approach;215
11.3;Classification and Localization;222
11.4;Region-Based CNN (R-CNN);224
11.5;Fast R-CNN;228
11.6;Faster R-CNN;230
12;Chapter 7: Object Localization: An Implementation in Python;232
12.1;The You Only Look Once (YOLO) Method;233
12.1.1;How YOLO Works;234
12.1.1.1;Dividing the Image Into Cells;234
12.1.2;YOLOv2 (Also Known As YOLO9000);237
12.1.3;YOLOv3;238
12.1.4;Non-Maxima Suppression;239
12.1.5;Loss Function;239
12.1.5.1;Classification Loss;240
12.1.5.2;Localization Loss;240
12.1.5.3;Confidence Loss;240
12.1.5.4;Total Loss Function;241
12.2;YOLO Implementation in Python and OpenCV;242
12.2.1;Darknet Implementation of YOLO;242
12.2.2;Testing Object Detection with Darknet;244
12.3;Training a Model for YOLO for Your Specific Images;251
12.4;Concluding Remarks;252
13;Chapter 8: Histology Tissue Classification;253
13.1;Data Analysis and Preparation;254
13.2;Model Building;263
13.3;Data Augmentation;274
13.3.1;Horizontal and Vertical Shifts;276
13.3.2;Flipping Images Vertically;279
13.3.3;Randomly Rotating Images;279
13.3.4;Zooming in Images;282
13.3.5;Putting All Together;282
13.4;VGG16 with Data Augmentation;283
13.4.1;The fit() Function;283
13.4.2;The fit_generator() Function;284
13.4.3;The train_on_batch() Function;285
13.4.4;Training the Network;286
13.5;And Now Have Fun…;287
14;Index;288




