April 2020
Intermediate to advanced
438 pages
12h 2m
English
In this recipe, we will classify images using scikit-learn's implementation of the multiclass logistic regression classifier with the HOG features extracted from the images. Let's start by importing all the required libraries using the following code snippet:
%matplotlib inlineimport numpy as npfrom skimage.io import imreadfrom skimage.color import gray2rgbfrom skimage.transform import resizefrom skimage.feature import hogfrom sklearn.linear_model import LogisticRegressionfrom sklearn.model_selection import train_test_splitfrom sklearn.metrics import classification_report, accuracy_scorefrom glob import globfrom matplotlib import pyplot as plt
Read now
Unlock full access