sklearn提取图片信息
生活随笔
收集整理的這篇文章主要介紹了
sklearn提取图片信息
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
import numpy as np
Scikit Image項目中內置了一個快速的Hog提取器
from skimage import data, color, feature import skimage.dataimage = color.rgb2gray(data.chelsea()) hog_vec, hog_vis = feature.hog(image, visualise=True)fig, ax = plt.subplots(1, 2, figsize=(12, 6),subplot_kw=dict(xticks=[], yticks=[])) ax[0].imshow(image, cmap='gray') ax[0].set_title('input image')ax[1].imshow(hog_vis) ax[1].set_title('visualization of HOG features')實現人臉識別
-
獲取一組人臉的圖像縮略圖,以構成“正面”訓練樣本。
-
獲取一組非人臉的圖像縮略圖,以
總結
以上是生活随笔為你收集整理的sklearn提取图片信息的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: sklearn 特征工程
- 下一篇: 额外篇 | basemap(上)