上传者: 38617001
|
上传时间: 2021-09-13 14:14:44
|
文件大小: 113KB
|
文件类型: PDF
基于KNN的数字识别
源代码及数据的github地址:
https://github.com/w1449550206/KNN-Handwritten-digit-recognition-based-on-KNN
点此可直达
import numpy as np
# 图片后缀为bmp
import matplotlib.pyplot as plt
%matplotlib inline
from sklearn.neighbors import KNeighborsClassifier
img_path = './data/3/3_10.bmp'
arr_img = plt.imread(img