fun created

This commit is contained in:
shaaqu 2020-05-20 07:36:18 +02:00
parent f1ce998628
commit ddb652119b
2 changed files with 37 additions and 33 deletions

View File

@ -3,6 +3,8 @@ from PIL import Image
import matplotlib.pyplot as plt
import cv2
def image():
img = cv2.cvtColor(cv2.imread('test.jpg'), cv2.COLOR_BGR2GRAY)
img = cv2.GaussianBlur(img, (15, 15), 0) # poprawia jakosc
img = cv2.resize(img, (8, 8), interpolation=cv2.INTER_AREA)

View File

@ -6,6 +6,8 @@ from sklearn.neural_network import MLPClassifier
from sklearn.metrics import accuracy_score
from PIL import Image
def train():
# recznie napisane cyfry
digits = datasets.load_digits()