# Topic 23 – Introduction to Computer Vision

Why do I need to learn about computer vision?

Computer vision has become more and more interesting. Image recognition, autonomous driving, and disease detection are examples of breakthrough achievements in the field.

Nowadays a key skill that is often required from a software developer is the ability to use computer vision algorithms and tools to solve real-world problems related to images and videos.

What can I do after finishing learning about applied computer vision?

You will be to create software that could recognize recognize a face or transform a picture of young person to old person.

That sounds fun! What should I do now?

– audit these Deep Learning Specialization courses and
– read this Francois Chollet (2021). Deep Learning with Python. Manning Publications book, and
– this Michael A. Nielsen (2015). Neural Networks and Deep Learning. Determination Press book.

After that please read this David Foster (2023). Generative Deep Learning – Teaching Machines To Paint, Write, Compose, and Play. O’Reilly Media book.

After that please read this Ian Goodfellow et al. (2016). Deep Learning. The MIT Press book.

Terminology Review:

• Digital Image: f(x, y)
• Intensity (Gray Level): ℓ = f(x, y)
• Gray Scale: ℓ = 0 is considered black and ℓ = L – 1 is considered white.
• Quantization: Digitizing the amplitude values.
• Sampling: Digitizing the coordinate values.
• Representing Digital Images: Matrix or Vector.
• Pixel or Picture Element: An element of matrix or vector.
• Deep Learning.
• Artificial Neural Networks.
• Filter: 2-dimensional matrix commonly square in size containing weights shared all over the input space.
• The Convolution Operation: Element-wise multiply, and add the outputs.
• Stride: Filter step size.
• Upsampling: Nearest Neighbors, Linear Interpolation, Bilinear Interpolation.
• Max Pooling, Average Pooling, Min Pooling.
• Convolutional Layers.
• Feature Maps.
• Convolutional Neural Networks (CNNs).
• Object Detection.
• Face Recognition.
• YOLO Algorithm.
• Latent Variable.
• Autoencoders.
• Variational Autoencoders.
• Generators.
• Discriminators.
• Binary Cross Entropy Loss Function, Log Loss Function.
• Mode Collapse.
• Earth Mover’s Distance.
• Wasserstein Loss (W-Loss).
• 1-Lipschitz Continuous Function.
• CycleGAN.
• Neural Style Transfer.

After finishing learning about computer vision please click Topic 24 – Introduction to Nature Language Processing to continue.

# Topic 22 – Introduction to Machine Learning

Why do I need to learn about machine learning?

Machine learning has solved many important difficult problems recently. A few of them include speech recognition, speech synthesis, image recognition, autonomous driving and chat bots.
Nowadays a key skill of software developer is the ability to use machine learning algorithms solve real-world problems.

What can I do after finishing learning about machine learning?

You will be to create software that could recognize car plate number from an image, identify probability of breast cancer for a patient.

That sounds useful! What should I do now?

– this Machine Learning Specialization (Coursera) courses and
– this Applied Machine Learning in Python (Coursera) course.

– this Aurelien Geron (2022). Hands-On Machine Learning with Scikit-Learn, Keras and TensorFlow. O’Reilly Media book and
– this Brett Lantz (2023). Machine Learning with R. Packt Publishing book.

– this MIT 6.034 – Artificial Intelligence, Fall 2010 course (Readings).

– this Tom M. Mitchell (1997). Machine Learning. McGraw-Hill Education book, and
– this Christopher M. Bishop (2006). Pattern Recognition and Machine Learning. Springer book.

After that please audit this Reinforcement Learning Specialization (Coursera) courses.
At the same time, please read this Richard S. Sutton and Andrew G. Barto (2020). Reinforcement Learning. The MIT Press book.

Supervised Learning Terminology Review:

• Artificial Intelligence.
• Machine Learning.
• Deep Learning.
• Linear Regression: Y = θX + Ε.
• Mean Square Error (MSE) measures the average of the squares of the errors.
• The R-Squared Test measures the proportion of the total variance in the output (y) that can be explained by the variation in x. It can be used to evaluate how good a “fit” some model is on the given data.
• Overfitting: machine learning model gives accurate predictions for training data but not for new data.
• Regularization: Ridge Regression, Lasso Regression, Elastic Net, Early Stopping.
• Normalization.
• Logistic Regression.
• Sigmoid Function.
• Binary Cross Entropy Loss Function, Log Loss Function.
• One Hot Encoding.
• The Softmax function takes an N-dimensional vector of arbitrary real values and produces another N-dimensional vector with real values in the range (0, 1) that add up to 1.0.
• Softmax Regression.
• Support Vector Machines.
• Decision Trees.
• K-Nearest Neighbors.
• McCulloch-Pitts Neuron.
• Linear Threshold Unit with threshold T calculates the weighted sum of its inputs, and then outputs 0 if this sum is less than T, and 1 if the sum is greater than T.
• Perceptron.
• Artificial Neural Networks.
• Backpropagation.
• Activation Functions: Rectified Linear Unit (ReLU), Leaky ReLU, Sigmoid, Hyperbolic Tangent.
• Batch Normalization.
• Regularization: Dropout.
• The Joint Probability Table.
• Bayesian Networks.
• Naive Bayes Inference.

Unsupervised Learning Terminology Review:

• K-Means.
• Principal Component Analysis.
• User-Based Collaborative Filtering.
• Item-based Collaborative Filtering.
• Matrix Factorization.

Reinforcement Learning Terminology Review:

• k-armed Bandit Problem.
• Bandit Algorithm.
• Exponential Recency-Weighted Average.
• Optimistic Initial Values.
• Upper-Confidence-Bound Action Selection.
• Agent.
• World.
• States, Terminal State.
• Actions.
• Rewards.
• Markov Decision Processes: Agent (π) >> Action (a) >> World >> State (s), Reward >> Agent (π). Model: (current state, action, reward of current state, next state) = (s, a, R(s), s’).
• Episodes.
• Horizon (H): Number of time steps in each episode, can be infinite.
• Expected Return: Sum of rewards from time step t to horizon H.
• Discounted Return: Discounted sum of rewards from time step t to horizon H.
• Discount Factor, Discount Rate: 0 ≤ γ ≤ 1.
• Policy: Mapping from states to actions: π (s) = a or π (a|s) = P(aₜ=a|sₜ=s).
• State Value Function – Vπ(s): The expected return starting from state s following policy π.
• State-Action Value function, also known as the quality function – Qπ(s): The expected return starting from state $$s$$, taking action $$a$$, then following policy $$π$$.
• Bellman Equations.
• Optimal Value Functions.
• Optimal Policies.
• Bellman Optimality Equations.
• Policy Evaluation: (MDP, π) → Linear System Solver, Dynamic Programming → Vπ.
• Iterative Policy Evaluation.
• Policy Control, Policy Improvement.
• Policy Improvement Theorem.
• Greedy Policy.
• Policy Iteration: (MDP) → Dynamic Programming → Vπ-optimal.
• Value Iteration: MDP → (Qopt, πopt).
• Asynchronous Dynamic Programming.
• Generalized Policy Iteration.
• Bootstrapping: Updating estimates on the basis of other estimates.
• First-Visit Monte Carlo Prediction.
• Exploring Starts.
• Monte Carlo Control Exploring Starts.
• On-Policy Methods.
• ϵ-greedy Policies: Most of the time they choose an action that has maximal estimated action value, but with probability ϵ they instead select an action at random.
• ϵ-soft Policies: Policies for which π(a|s) ≥ ϵ/|A(s)| for all states and actions, for some ϵ > 0.
• On-Policy First-Visit MC Control.
• Off-Policy Learning.
• Target Policy.
• Behavior Policy.
• Importance Sampling.
• Off-Policy Monte Carlo Prediction.
• Off-Policy Monte Carlo Control.
• Temporal-Difference Learning.
• SARSA: On-Policy TD Control.
• Q-Learning: Off-Policy TD Control
• Function Approximation.
• Continuous States.
• Learning State Action Value function: Replay Buffer: 10,000 tuples most recent (s, a, R(s), s’). x = (s, a) → Q(θ) → y = R(s) + γmaxQ(s’, a’, θ). Loss = [R(s) + γmaxQ(s’, a’; θ)] − Q(s, a; θ).
• Target Network: A separate neural network for generating the y targets. It has the same architecture as the original Q-Network. Loss = [R(s) + γmaxTargetQ(s’, a’; θ′)] − Q(s, a; θ). Every C time steps we will use the TargetQ-Network to generate the y targets and update the weights of the TargetQ-Network using the weights of the Q-Network.
• Soft Updates: $$θ′$$ $$← 0.001θ + 0.999θ′$$, where $$θ′$$ and $$θ$$ represent the weights of the target network and the current network, respectively.
• Deep Reinforcement Learning, Deep Q-learning.

After finishing learning about machine learning please click Topic 23 – Introduction to Computer Vision to continue.