Reader small image

You're reading from  MATLAB for Machine Learning - Second Edition

Product typeBook
Published inJan 2024
Reading LevelIntermediate
PublisherPackt
ISBN-139781835087695
Edition2nd Edition
Languages
Tools
Right arrow
Author (1)
Giuseppe Ciaburro
Giuseppe Ciaburro
author image
Giuseppe Ciaburro

Giuseppe Ciaburro holds a PhD and two master's degrees. He works at the Built Environment Control Laboratory - Università degli Studi della Campania "Luigi Vanvitelli". He has over 25 years of work experience in programming, first in the field of combustion and then in acoustics and noise control. His core programming knowledge is in MATLAB, Python and R. As an expert in AI applications to acoustics and noise control problems, Giuseppe has wide experience in researching and teaching. He has several publications to his credit: monographs, scientific journals, and thematic conferences. He was recently included in the world's top 2% scientists list by Stanford University (2022).
Read more about Giuseppe Ciaburro

Right arrow

MATLAB for Image Processing and Computer Vision

Computer vision is a discipline that explores methods for processing, analyzing, and comprehending visual data. In the realm of image content analysis, a multitude of computer vision algorithms is employed to develop insights into the objects depicted in the image. Encompassing diverse facets of image analysis, computer vision addresses tasks such as object recognition, shape analysis, pose estimation, 3D modeling, visual search, and more. While humans excel at identifying and recognizing objects in their surroundings, the objective of computer vision is to faithfully replicate the capabilities of the human visual system (HVS) using computational methods. In this chapter, we will understand the basic concepts of computer vision and how to implement a model for object recognition using MATLAB.

In this chapter, we’re going to cover the following main topics:

  • Introducing image processing and computer vision
  • Exploring...

Technical requirements

In this chapter, we will introduce basic machine learning concepts. To understand these topics, a basic knowledge of algebra and mathematical modeling is needed. You will also require a working knowledge of MATLAB.

To work with the MATLAB code in this chapter, you’ll need the files available on GitHub at https://github.com/PacktPublishing/MATLAB-for-Machine-Learning-second-edition.

Introducing image processing and computer vision

Through the five senses, humans gather information from the external world and process it, making decisions to carry out the actions that shape their daily lives. One of the most intriguing challenges in computer science is replicating this sequence of events, identifying and harnessing new sources of information. The ability to acquire and interpret information by simulating the human sensory system is called machine perception, and it is fundamental in the field of artificial intelligence.

Being able to interpret and acquire information from the external world is made possible through techniques such as encoding and information processing. Through digital image encoding techniques, it is possible to represent what humans can perceive in the form of bits. Depending on the methodologies used, it is possible to select the quantity and quality of the information to be represented. Through processing methods, on the other hand, it is...

Exploring MATLAB tools for computer vision

Computer vision encompasses the development of algorithms, techniques, and systems that allow computers to acquire, process, analyze, and make decisions based on visual data from images and videos. The primary goal of computer vision is to enable machines to perform tasks that typically require human visual perception and comprehension.

Computer vision can automate various tasks that would be time-consuming or even impossible for humans to perform consistently and at scale. This includes tasks such as object detection, image classification, and tracking. When trained and configured properly, computer vision algorithms can achieve high levels of accuracy in tasks such as image recognition and segmentation. They don’t suffer from fatigue or distraction, leading to consistent results. These algorithms can process images and videos in real time or near real time, making them suitable for applications that require rapid analysis and decision...

Building a MATLAB model for object recognition

An enduring challenge within the realm of computer vision involves ascertaining the presence of specific objects (object recognition) or activities within an image. For objects under predefined conditions, such as the identification of specific geometric shapes such as polyhedral or the recognition of faces and handwritten characters, this problem can be tackled effectively and without significant hurdles. However, the complexity escalates when dealing with arbitrary objects in unrestricted scenarios.

Object recognition entails the capacity to detect a particular object within a series of images or videos. Human beings possess the remarkable ability to identify various objects in images effortlessly, even when the objects’ appearances may vary. Moreover, objects can be recognized even when they are partially obscured from view. However, this remains a formidable challenge for computer vision.

Each object within an image exhibits...

Training and fine-tuning pretrained deep learning models in MATLAB

Transfer learning is a machine learning approach wherein a model created for a particular task is repurposed as the initial foundation for a model addressing a second task. This technique entails leveraging knowledge acquired from one problem and applying it to a distinct yet related problem. Transfer learning is particularly useful in deep learning and neural networks, where pretrained models can be fine-tuned or used as feature extractors for new tasks.

In pretrained models, you start with a pretrained model that has been trained on a large dataset for a specific task, such as image classification, natural language processing, or speech recognition. These pretrained models are often complex neural networks with many layers. In many cases, you can use the layers of the pretrained model as feature extractors. You remove the final classification layer(s) and use the activations from the earlier layers as features...

Interpreting and explaining machine learning models

Interpreting and explaining machine learning models is essential for understanding their predictions and making them more transparent and trustworthy, especially in applications where interpretability is critical. This is an ongoing process that requires collaboration between data scientists, domain experts, and stakeholders. The choice of interpretation techniques depends on the model type, problem domain, and level of transparency required for the application. It’s important to strike a balance between model complexity and interpretability, depending on the specific use case.

Understanding saliency maps

Saliency maps are a visualization technique that’s used in computer vision and deep learning to understand and interpret neural network predictions, particularly in image classification and object recognition tasks. Saliency maps help identify which regions of an input image or feature map are most relevant to...

Summary

In this chapter, we understood the basic concepts surrounding computer vision and how to implement a model for object recognition using MATLAB. We started by introducing image processing and computer vision. We learned how tools are available to process images and how computer vision is used for object recognition, motion detection, and pattern recognition. Then, we explored MATLAB tools for computer vision, and how the capabilities and functions provided by MATLAB create a robust environment for the development and prototyping of computer vision applications. Whether your focus is on tasks such as image analysis, object detection, 3D reconstruction, or any related application, MATLAB offers the necessary tools and features to support your work effectively.

After that, we learned how to build a MATLAB model for object recognition by using a CNN and the MNIST dataset. We understood how to import image data into a MATLAB workspace and how to use images to train a CNN. Then...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
MATLAB for Machine Learning - Second Edition
Published in: Jan 2024Publisher: PacktISBN-13: 9781835087695
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Giuseppe Ciaburro

Giuseppe Ciaburro holds a PhD and two master's degrees. He works at the Built Environment Control Laboratory - Università degli Studi della Campania "Luigi Vanvitelli". He has over 25 years of work experience in programming, first in the field of combustion and then in acoustics and noise control. His core programming knowledge is in MATLAB, Python and R. As an expert in AI applications to acoustics and noise control problems, Giuseppe has wide experience in researching and teaching. He has several publications to his credit: monographs, scientific journals, and thematic conferences. He was recently included in the world's top 2% scientists list by Stanford University (2022).
Read more about Giuseppe Ciaburro