Skip to main content

Introduction to Machine Learning and Application of Image Classification

introduction to machine learning

Machine Intelligence is the last invention that humanity will ever need to make - Nick Bostrom

Machine learning#

Machine Learning (ML) is a process of learning through data. Machines develop the ability to understand, predict, detect and generate.

How does Machine Learning work?#

Machine Learning works through a sequence of steps.

  1. Fetch Data: To collect required user data and check whether this data is suitable for the ML model.
  2. Clean and Manipulate Data: The data fetched is used to check if any cleaning is required for the data for training and testing. Then you divide the data into 2 sets, the training set, and the testing set.
  3. Train Model: To train the model with the given data, you train the data with different algorithms and see which algorithm worked and which did not. In simple words, you train the model using the training set and find out the best algorithm which fits the model.
  4. Test Model: Once training is done, you are now ready to deploy the model. Before deploying, you need to test the model to get its accuracy. In simple words, you test the model using the testing set.
  5. Improvement or Optimization: If there are any improvements in any areas such as accuracy, precision, and also to check if the model is the best fit to solve the problem and evaluate the model performance and its mistakes. Most importantly, does the model satisfy end-user goals? If ‘not’ then there needs to be a collection of more data then train and test it.

ML is used mainly for Three Reasons-#

categories of ML applications Image credit- https://nordcloud.com/three-main-uses-of-machine-learning/

Applications of ML:#

Out of tens and billions of applications by ML, we listed some of the applications in a figure below

applications of ml
Image credit- javapoint.com

Challenges for ML applications#

1.Store and collect data: Data is like fuel to the ML so getting quality fuel from different sources and storing the fuel is a huge challenge for ML Engineers. If the Model is trained and tested with insufficient data then the whole model will be less efficient and the prediction accuracy will degrade. Hence data is collected and stored for further analysis.

2.Data Versioning: The data gets updated over a while due to the data growing in nature and you see a lot of new data coming up but the algorithm is the same and it affects the prediction rate. So you need to regularly monitor and maintain the data. Data versioning doesn't happen in every case.

3.Choosing correct algorithm: If we can understand the problem statement better then choosing the right algorithm will be less complex. We need to pick the algorithm by considering some factors like variables, parameters, user data, accuracy, and processing speed. If prediction scores and accuracy give good exactness and that can accommodate fewer errors, we can choose the algorithm. It is important to know the problem statement before selecting the algorithm.

4.Overfitting and underfitting training dataset:

Overfitting - When the model is tested with lots of data, the model gets trained with a lot of inaccurate data. For the training data, the accuracy is very high but for test data, the accuracy is very low

Underfitting - The model finds it hard to capture the relationship between the input and output variables accurately, generating a high error rate on the training sets. overfitting_underfitting
Image credit-https://greyatom.com/

However the above challenges are the challenges for ML engineers as a whole, but they may change from one sector to another sector. Challenges in the health sector are different from challenges in Agriculture.

  • Are Artificial Intelligence and Machine learning the same?

    Ans: ‘It is neither the same nor different’

Artificial Intelligence is an intellect( can understand, ability to do reasoning ) where a machine gets intelligence by the process or by humans inducing it into machines. Example: When we ask a question to Sophia(Robot), Sophia answers with its intelligence which is programmed by humans. Here humans are not feeding the answers, the machine is giving the answers by using its intelligence

Machine Learning happens when we create algorithms and train them. It learns from Data and the AI gets intelligence through Machine Learning Models so Machine Learning acts like a brain to AI.

Deep Learning is an area where the model trains the way the human brain makes decisions. We can even call it Deep Neural Networks.

ai_ml_dl

Introduction to Computer vision#

'Era of data' is the phrase that aptly tells us that we live in a world in which we are surrounded by loads of data. The data is in the form of speech, text, and image. Images make up a significant share of the global data pool

Computer vision is the process of converting digital images into meaningful data in the form of mathematical arrays and digits.

  • Image Classification is the process where the image is classified by a set of target classes which helps to identify the image.
  • When you detect the objects within an image with rectangular bounding boxes, where it identifies the location of the objects, it is called Object Detection.
  • when you classify each pixel as one of the classes it is called the Image Segment.

In Computer vision, Image classification is one among the subset. Image classification acts as a basis for all computer vision problems.

Image Classification#

Image classification is the process of categorizing and labeling different groups of pixels or vectors within the image by given rules.

Image classification is divided into two categories: supervised and unsupervised image classification.

classification__of_cat
Image Classification of Cat Image credit- https://github.com/ReiCHU31/Cat-Dog-Classification-Flask-App

‘Convolutional Neural Network’ is one of the most popular Neural Network models used for Image classifications.

Applications of Image classification#

Agriculture- -One segment in agriculture is that it can classify diseases by looking at the images of the leaves -It can also classify the intensity of the disease spread on the leaves. classification-leaves-diseases
classified_leaf
Images credit-https://www.mdpi.com/2077-0472/11/8/707/htm

Biology- We can classify the species by their color, shape, and many features. classifing_butterflies
Image credit-https://www.sciencedirect.com/science/article/pii/S2215098619326011

Health- It helps in classifying medical images like X-rays, and MRI reports and can classify if the patient has some abnormalities or the patient is normal. Examples: Can diagnose brain tumours, pneumonia, Skin cancer, and many abnormalities. x-ray_chest
Image credit-https://www.news-medical.net/news/20201218Transfer-learning-exploits-chest-Xray-to-diagnose-COVID-19-pneumonia.aspx
The above image is an example of image classification used to classify normal chest and Pneumonia chest.

Likewise in Education and Security and many more.

Reach us at [email protected] for any enquiry.

To Check more content, read our blogs posted regularly on our website https://saaragh.com/blog and participate in our monthly webinars. Here is the link for the webinar on Introduction to Machine Learning and Application of Image Classification. Which held on August 5th, 2022: Introduction to Machine Learning and overview of Image classification https://www.youtube.com/watch?v=rcfu6qnj954