Intelligenza Artificiale Complementi ed Esercizi Reti Neurali AA 2013-2014 Il riconoscimento dei caratteri scritti a mano Handwritten Recognition
Il problema Data una cifra scritta a mano, riconoscere in modo automatico di che cifra si tratta CY Suen, et al, Computer recognition of unconstrained handwritten numerals, Proc IEEE 80 (7) (1992) 1162 1180 J Franke, L Lam, R Legault, C Nadal, CY Suen, Experiments with the CENPARMI database combining different classification approaches, Proceedings of the Third International Workshop on Frontiers of Handwriting Recognition, Bualo, NY, 1993, pp 305 311 DS Lee, SN Srihari, Handprinted digit recognition: a comparison of algorithms, in: Proceedings of the Third International Workshop on Frontiers of Handwriting Recognition, Bualo, NY, 1993, pp 153 164 I database di benchmark Database Proprietà Caratteristiche URL CENPARMI Concordia University - 6000 immagini - 4000 training - 2000 test - 166 DPI CEDAR MNIST (Modified NIST) CEDAR, Sunny Buffalo ($950) -18468 immagini - 300 DPI - 2213 test - 60000 Training - 10000 Test - 784 DPI wwwcenparmiconcordiaca wwwcedarbuffaloedu/databases/ http://yannlecuncom/exdb/mnist/ CENPARMI CEDAR MNIST
Riconoscimento con Reti Neurali (MNIST) Classifier Preprocessing Test Error Rate (%) 2-layer NN, 300 hidden units, mean square error none 47 2-layer NN, 300 HU, MSE, [distortions] none 36 2-layer NN, 300 HU deskewing 16 2-layer NN, 1000 hidden units none 45 2-layer NN, 1000 HU, [distortions] none 38 3-layer NN, 300+100 hidden units none 305 3-layer NN, 300+100 HU [distortions] none 25 3-layer NN, 500+150 hidden units none 295 3-layer NN, 500+150 HU [distortions] none 245 3-layer NN, 500+300 HU, softmax, cross entropy, weight decay none 153 2-layer NN, 800 HU, Cross-Entropy Loss none 16 2-layer NN, 800 HU, cross-entropy [affine distortions] none 11 2-layer NN, 800 HU, MSE [elastic distortions] none 09 2-layer NN, 800 HU, cross-entropy [elastic distortions] none 07 NN, 784-500-500-2000-30 + nearest neighbor, RBM + NCA training [no distortions] none 10 6-layer NN 784-2500-2000-1500-1000-500-10 (on GPU) [elastic distortions] none 035 committee of 25 NN 784-800-10 [elastic distortions] width normalization 039 deep convex net, unsup pre-training [no distortions] none 083 Il processo => => => Cifra scritta a mano Trasformazione in file digitale Immagine codificata in binario (es 32x32) L immagine è una matrice binaria dove 0=bianco e 1=nero
La codifica dei dati di training Immagine (eg Jpg) in bianco e nero Risoluzione: 32x32 pixel => Matrice di 1024 bit per ogni immagine File in formato testo Ogni riga rappresenta la matrice dell immagine linearizzata (si rappresenta l immagine con un vettore di 1024 bit) Ogni riga è un immagine Ogni riga è formata da 1024 caratteri (0-1) più il numero corrispondente {0,1,,9} (supervised learning) per il training set Matrice di 1024 bit (immagine) 0 0 1 1 0 8 Vettore di 1024 bit (immagine) Output corretto {0,1,,9} Il Data Base di training e test Versione semplificata del MNIST Cifra # immagini di Training # immagini di Test 0 189 86 1 198 96 2 195 91 3 199 84 4 186 113 5 187 107 6 195 86 7 201 95 8 180 90 9 204 88 Totale 1934 936
Preprocessing:compatibilità di formato Formato MNIST(versione semplificata del libro) 1934fileditestoperiltrainingconlesoleimmaginiseparate(senzal outputcorretto)ogniriga1024 caratteri(0,1); 934filesditest; Formato WEKA Formato testo; Campi aventi un descrittore sintattico; ocrc Scrittura di un programma ad hoc per la conversione di formato Preprocessing:compatibilità di formato Randomizzazione del file di training Riduzione del file di training per avere tempi di risposta accettabili 1024 attributi per l input 10 classi di output Percentage split
Impostazione dei parametri di rete 1 strato nascosto con 30 neuroni 1024 input nodes binari 10 output nominali α=03 m= 02 # epoche: 100 Impostazione dei parametri di rete Risultati