This document discusses machine learning and deep learning concepts like convolutional neural networks. It provides an overview of ML.NET, an open source machine learning framework, and shows how to build and train models with ML.NET including training a deep learning model to classify images into categories like rock, paper, or scissors. Examples of loading data, defining the model architecture, training the model, exporting it and using it for predictions are provided.
5. #GlobalAILisboa #GlobalAIBootcamp #GlobalAICommunity
DeepLearning
• Deeplearning is a subfield of Machine Learning concernedwith
algorithms inspired by the structure and function of the brain
called artificial neuralnetworks.
• It is exceptionally effective in discovering patterns.
• Algorithms learn through a multi-layered hierarchy.
• If you supply the system with tons of information, it will begin to
understand and respond in helpful ways.
6. #GlobalAILisboa #GlobalAIBootcamp #GlobalAICommunity
Deep learning hasan inbuilt automatic multi stage feature learning process that learns rich
hierarchicalrepresentations (i.e. features).
Low-level
features
Mid-level
features
Output (e.g. exterior,
interior)
High-level
features
Trainable
Classifier
7. #GlobalAILisboa #GlobalAIBootcamp #GlobalAICommunity
Image
Pixel EdgeTexture Motif Part Object
Text
Character Word Word-group Clause Sentence Story
Each module in DeepLearning transforms its input representation into a higher-level one, in a way similar to human
cortex.
Low Level
Features
Mid Level
Features Output
High
Level
Features
Trainable
Classifier
Input
11. #GlobalAILisboa #GlobalAIBootcamp #GlobalAICommunity
Pooling
Max pooling: reports the maximum output within a rectangular neighborhood.
Average pooling: reports the average output of a rectangular neighborhood.
1 3 5 3
4 2 3 1
3 1 1 3
0 1 0 4
MaxPool with 2X2 filter with
stride of 2
Input Matrix Output Matrix
4 5
3 4
16. #GlobalAILisboa #GlobalAIBootcamp #GlobalAICommunity
MLContext
Starting point for all ML.NET operations which provides mechanisms to create components for:
• Data preparation
• Feature Engineering
• Training
• Prediction
• Model Validation
• Logging
• Execution control
• Initialization
26. #GlobalAILisboa #GlobalAIBootcamp #GlobalAICommunity
Main program
Loading data for
supervised learning
(images include tags) Training and Validation sets
Load pipeline:
Images loaded in memory
Training options:
ImageClassificationTrainer
chosen, based on the
InceptionV3 architecture
Training pipeline:
Trying to predict a
category
Both pipelines are combined
27. #GlobalAILisboa #GlobalAIBootcamp #GlobalAICommunity
Perform training
Model precision is validated
using validation dataset
Model Metrics calculated
Test the classification model using the new images
Prepare new images for prediction
Export the model
Consume the model
37. #GlobalAILisboa #GlobalAIBootcamp #GlobalAICommunity
Unable to find an entry point named 'TF_StringEncodedSize' in DLL 'tensorflow'
“I think ml.net support tensorflow 2.3.1 not yet support 2.4,
so you must download SciSharp.TensorFlow.Redist 2.3.1”
https://github.com/dotnet/machinelearning-samples/issues/880
Deep learning can be considered as a subset of machine learning. It is a field that is based on learning and improving on its own by examining computer algorithms. While machine learning uses simpler concepts, deep learning works with artificial neural networks, which are designed to imitate how humans think and learn. Until recently, neural networks were limited by computing power and thus were limited in complexity. However, advancements in Big Data analytics have permitted larger, sophisticated neural networks, allowing computers to observe, learn, and react to complex situations faster than humans. Deep learning has aided image classification, language translation, speech recognition. It can be used to solve any pattern recognition problem and without human intervention.
Artificial neural networks, comprising many layers, drive deep learning. Deep Neural Networks (DNNs) are such types of networks where each layer can perform complex operations such as representation and abstraction that make sense of images, sound, and text.
Low-level features are minor details of the image, like lines or dots, that can be picked up by, say, a convolutional filter (for really low-level things) or (for more abstract things like edges). High-level features are built on top of low-level features to detect objects and larger shapes in the image.
Convolutional neural networks use both types of features: the first couple convolutional layers will learn filters for finding lines, dots, curves etc. while the later layers will learn to recognize common objects and shapes.
Convolution is a general purpose filter effect for images
In Convolutional Neural Networks, Filters detect spatial patterns such as edges in an image by detecting the changes in intensity values of the image.
In terms of an image, a high-frequency image is the one where the intensity of the pixels changes by a large amount, whereas a low-frequency image is the one where the intensity is almost uniform. Usually, an image has both high and low frequency components. The high-frequency components correspond to the edges of an object because at the edges the rate of change of intensity of pixel values is high.
Convolution is a simple mathematical operation which is fundamental to many common image processing operators. Convolution provides a way of `multiplying together' two arrays of numbers, generally of different sizes, but of the same dimensionality, to produce a third array of numbers of the same dimensionality.
3. Now when you apply a set of filters on top of that (pass it through the 2nd conv. layer), the output will be activations that represent higher-level features. Types of these features could be semicircles (a combination of a curve and straight edge) or squares (a combination of several straight edges). As you go through the network and go through more conv. layers, you get activation maps that represent more and more complex features.
Es el conjunto de columnas, sus nombres, tipos y otras anotaciones.
Antes de cargar datos, debes definir cómo se verá el esquema de datos (nombres y tipos de columna)
Utiliza definiciones de clase para definir esquemas IDV
Pooling layers provide an approach to down sampling feature maps by summarizing the presence of features in patches of the feature map. Two common pooling methods are average pooling and max pooling that summarize the average presence of a feature and the most activated presence of a feature respectively.
A pooling layer is a new layer added after the convolutional layer. Specifically, after a nonlinearity (e.g. ReLU) h