Normal Bayes Classifier for Image Segmentation Using OpenCV

The Naive Bayes algorithm is a simple but powerful technique for supervised machine learning. Its Gaussian variant is implemented in the OpenCV library. In this tutorial, you will learn how to apply OpenCV’s normal Bayes algorithm, first on a custom two-dimensional dataset and subsequently for segmenting an image.   After completing this tutorial, you will …

Support Vector Machines for Image Classification and Detection Using OpenCV

In a previous tutorial, we have explored the use of the Support Vector Machine algorithm as one of the most popular supervised machine learning techniques that comes implemented in the OpenCV library. So far, we have seen how to apply Support Vector Machines to a custom dataset that we have generated, consisting of two-dimensional points …

Image Vector Representation for Machine Learning Using OpenCV

One of the pre-processing steps that are often carried out on images before feeding them into a machine learning algorithm is to convert them into a feature vector. As we will see in this tutorial, there are several advantages to converting an image into a feature vector that makes the latter more efficient.  Among the …

Hardware-Accelerated AI for Windows Apps Using ONNX RT

Sponsored Content   By Rajan Mistry Sr. Applications Engineer with the Qualcomm Developer Network Today, you can’t help but read the media headlines about AI and the growing sophistication of generative AI models like Stable Diffusion. A great example of a use case for generative AI on Windows is Microsoft 365 Copilot. This AI assistant can …

Support Vector Machines in OpenCV

The Support Vector Machine algorithm is one of the most popular supervised machine learning techniques, and it comes implemented in the OpenCV library. This tutorial will introduce the necessary skills to start using Support Vector Machines in OpenCV, using a custom dataset that we will generate. We will then apply these skills for the specific …

How to Train a Object Detection Engine with HOG in OpenCV

In the previous post, you saw that OpenCV can extract features from an image using a technique called the Histogram of Oriented Gradients (HOG). In short, this is to convert a “patch” of an image into a numerical vector. This vector, if set up appropriately, can identify key features within that patch. While you can …

Image Datasets for Practicing Machine Learning in OpenCV

At the very start of your machine learning journey, making use of publicly available datasets alleviates the worry of having to create the datasets yourself, and rather lets you focus on learning to use the machine learning algorithms. It also helps if the datasets are moderately sized and do not require too much pre-processing, to …

overview hires

Ghostbuster: Detecting Text Ghostwritten by Large Language Models

The structure of Ghostbuster, our new state-of-the-art method for detecting AI-generated text. Large language models like ChatGPT write impressively well—so well, in fact, that they’ve become a problem. Students have begun using these models to ghostwrite assignments, leading some schools to ban ChatGPT. In addition, these models are also prone to producing text with factual …

figure1

Asymmetric Certified Robustness via Feature-Convex Neural Networks

Asymmetric Certified Robustness via Feature-Convex Neural Networks TLDR: We propose the asymmetric certified robustness problem, which requires certified robustness for only one class and reflects real-world adversarial scenarios. This focused setting allows us to introduce feature-convex classifiers, which produce closed-form and deterministic certified radii on the order of milliseconds. Figure 1. Illustration of feature-convex classifiers …

Extracting Histogram of Gradients with OpenCV

Besides the feature descriptor generated by SIFT, SURF, and ORB, as in the previous post, the Histogram of Oriented Gradients (HOG) is another feature descriptor you can obtain using OpenCV. HOG is a robust feature descriptor widely used in computer vision and image processing for object detection and recognition tasks. It captures the distribution of …