Reader small image

You're reading from  Data Labeling in Machine Learning with Python

Product typeBook
Published inJan 2024
PublisherPackt
ISBN-139781804610541
Edition1st Edition
Right arrow
Author (1)
Vijaya Kumar Suda
Vijaya Kumar Suda
author image
Vijaya Kumar Suda

Vijaya Kumar Suda is a seasoned data and AI professional boasting over two decades of expertise collaborating with global clients. Having resided and worked in diverse locations such as Switzerland, Belgium, Mexico, Bahrain, India, Canada, and the USA, Vijaya has successfully assisted customers spanning various industries. Currently serving as a senior data and AI consultant at Microsoft, he is instrumental in guiding industry partners through their digital transformation endeavors using cutting-edge cloud technologies and AI capabilities. His proficiency encompasses architecture, data engineering, machine learning, generative AI, and cloud solutions.
Read more about Vijaya Kumar Suda

Right arrow

Labeling images using rules based on properties

Let us see an example of Python code that demonstrates how to classify images using rules, based on image properties such as size and aspect ratio.

Here, we will define rules such as if the black color distribution is greater than 50% in leaves, then that is a diseased plant. Similarly, in case of detecting a bicycle with a person, if the aspect ratio of an image is greater than some threshold value, then that image has a bicycle with a person.

In computer vision and image classification, the aspect ratio refers to the ratio of the width to the height of an image or object. It is a measure of how elongated or stretched an object or image appears along its horizontal and vertical dimensions. Aspect ratio is often used as a feature or criterion in image analysis and classification. It’s worth noting that aspect ratio alone is often not sufficient for classification, and it is typically used in conjunction with other features...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Data Labeling in Machine Learning with Python
Published in: Jan 2024Publisher: PacktISBN-13: 9781804610541

Author (1)

author image
Vijaya Kumar Suda

Vijaya Kumar Suda is a seasoned data and AI professional boasting over two decades of expertise collaborating with global clients. Having resided and worked in diverse locations such as Switzerland, Belgium, Mexico, Bahrain, India, Canada, and the USA, Vijaya has successfully assisted customers spanning various industries. Currently serving as a senior data and AI consultant at Microsoft, he is instrumental in guiding industry partners through their digital transformation endeavors using cutting-edge cloud technologies and AI capabilities. His proficiency encompasses architecture, data engineering, machine learning, generative AI, and cloud solutions.
Read more about Vijaya Kumar Suda