

{"id":82561,"date":"2020-09-18T10:00:49","date_gmt":"2020-09-18T04:30:49","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=82561"},"modified":"2026-06-01T11:45:07","modified_gmt":"2026-06-01T06:15:07","slug":"handwritten-character-recognition-neural-network","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/","title":{"rendered":"Handwritten Character Recognition with Neural Network"},"content":{"rendered":"<p>In this machine learning project, we will recognize handwritten characters, i.e, English alphabets from A-Z. This we are going to achieve by modeling a neural network that will have to be trained over a dataset containing images of alphabets.<\/p>\n<h3>Project Prerequisites<\/h3>\n<p>Below are the prerequisites for this project:<\/p>\n<ol>\n<li>Python (3.7.4 used)<\/li>\n<li>IDE (Jupyter used)<\/li>\n<\/ol>\n<p>Required frameworks are<\/p>\n<ol>\n<li>Numpy (version 1.16.5)<\/li>\n<li>cv2 (openCV) (version 3.4.2)<\/li>\n<li>Keras (version 2.3.1)<\/li>\n<li>Tensorflow (Keras uses TensorFlow in backend and for some image preprocessing) (version 2.0.0)<\/li>\n<li>Matplotlib (version 3.1.1)<\/li>\n<li>Pandas (version 0.25.1)<\/li>\n<\/ol>\n<h3>Download Dataset<\/h3>\n<p>The dataset for this project contains 372450 images of alphabets of 28&#215;2, all present in the form of a CSV file:<br \/>\n<a href=\"https:\/\/www.kaggle.com\/sachinpatel21\/az-handwritten-alphabets-in-csv-format\"><strong>Handwritten character recognition dataset<\/strong><\/a><\/p>\n<h3>Steps to develop handwritten character recognition<\/h3>\n<h4>Download Project Code<\/h4>\n<p>Please download project source code: <a href=\"https:\/\/drive.google.com\/file\/d\/1vP7pzEEcN1fTv1RewnSN3lt3l-R0h3Wy\/view?usp=drive_link\" target=\"_blank\" rel=\"noopener\"><strong>Handwritten Character Recognition with Neural Network<\/strong><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import matplotlib.pyplot as plt\r\nimport cv2\r\nimport numpy as np\r\nfrom keras.models import Sequential\r\nfrom keras.layers import Dense, Flatten, Conv2D, MaxPool2D, Dropout\r\nfrom keras.optimizers import SGD, Adam\r\nfrom keras.callbacks import ReduceLROnPlateau, EarlyStopping\r\nfrom keras.utils import to_categorical\r\nimport pandas as pd\r\nimport numpy as np\r\nfrom sklearn.model_selection import train_test_split\r\nfrom sklearn.utils import shuffle\r\n<\/pre>\n<ul>\n<li>First of all, we do all the necessary imports as stated above. We will see the use of all the imports as we use them.<\/li>\n<\/ul>\n<p><strong>Read the data:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">data = pd.read_csv(r\"D:\\a-z alphabets\\A_Z Handwritten Data.csv\").astype('float32')\r\n\r\nprint(data.head(10))\r\n<\/pre>\n<ul>\n<li>Now we are reading the dataset using the <strong>pd.read_csv()<\/strong> and printing the first 10 images using <strong>data.head(10)<\/strong><\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82573\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample.png\" alt=\"dataframe data\" width=\"1696\" height=\"1040\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample.png 1696w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample-300x184.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample-1024x628.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample-150x92.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample-768x471.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample-1536x942.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/dataframe-data-sample-520x319.png 520w\" sizes=\"auto, (max-width: 1696px) 100vw, 1696px\" \/><\/a><\/p>\n<p>(The above image shows some of the rows of the dataframe data using the head() function of dataframe)<\/p>\n<p><strong>Split data into images and their labels:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">X = data.drop('0',axis = 1)\r\ny = data['0']\r\n<\/pre>\n<p>Splitting the data read into the images &amp; their corresponding labels. The \u20180\u2019 contains the labels, &amp; so we drop the \u20180\u2019 column from the data dataframe read &amp; use it in the y to form the labels.<\/p>\n<p><strong>Reshaping the data in the csv file so that it can be displayed as an image<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">train_x, test_x, train_y, test_y = train_test_split(X, y, test_size = 0.2)\r\n\r\ntrain_x = np.reshape(train_x.values, (train_x.shape[0], 28,28))\r\ntest_x = np.reshape(test_x.values, (test_x.shape[0], 28,28))\r\n\r\nprint(\"Train data shape: \", train_x.shape)\r\nprint(\"Test data shape: \", test_x.shape)\r\n<\/pre>\n<ul>\n<li>In the above segment, we are splitting the data into training &amp; testing dataset using train_test_split().<\/li>\n<li>Also, we are reshaping the train &amp; test image data so that they can be displayed as an image, as initially in the CSV file they were present as 784 columns of pixel data. So we convert it to 28&#215;28 pixels.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">word_dict = {0:'A',1:'B',2:'C',3:'D',4:'E',5:'F',6:'G',7:'H',8:'I',9:'J',10:'K',11:'L',12:'M',13:'N',14:'O',15:'P',16:'Q',17:'R',18:'S',19:'T',20:'U',21:'V',22:'W',23:'X', 24:'Y',25:'Z'}\r\n<\/pre>\n<ul>\n<li>All the labels are present in the form of floating point values, that we convert to integer values, &amp; so we create a dictionary word_dict to map the integer values with the characters.<\/li>\n<\/ul>\n<p><strong>Plotting the number of alphabets in the dataset<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">y_int = np.int0(y)\r\ncount = np.zeros(26, dtype='int')\r\nfor i in y_int:\r\n    count[i] +=1\r\n\r\nalphabets = []\r\nfor i in word_dict.values():\r\n    alphabets.append(i)\r\n\r\nfig, ax = plt.subplots(1,1, figsize=(10,10))\r\nax.barh(alphabets, count)\r\n\r\nplt.xlabel(\"Number of elements \")\r\nplt.ylabel(\"Alphabets\")\r\nplt.grid()\r\nplt.show()\r\n<\/pre>\n<ul>\n<li>Here we are only describing the distribution of the alphabets.<\/li>\n<li>Firstly we convert the labels into integer values and append into the count list according to the label. This count list has the number of images present in the dataset belonging to each alphabet.<\/li>\n<li>Now we create a list &#8211; alphabets containing all the characters using the values() function of the dictionary.<\/li>\n<li>Now using the count &amp; alphabets lists we draw the horizontal bar plot.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82575\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets.png\" alt=\"plot alphabets\" width=\"1652\" height=\"1040\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets.png 1652w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets-300x189.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets-1024x645.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets-150x94.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets-768x483.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets-1536x967.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/plot-alphabets-520x327.png 520w\" sizes=\"auto, (max-width: 1652px) 100vw, 1652px\" \/><\/a><\/p>\n<p><strong>Shuffling the data<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">shuff = shuffle(train_x[:100])\r\n\r\nfig, ax = plt.subplots(3,3, figsize = (10,10))\r\naxes = ax.flatten()\r\n\r\nfor i in range(9):\r\n    _, shu = cv2.threshold(shuff[i], 30, 200, cv2.THRESH_BINARY)\r\n    axes[i].imshow(np.reshape(shuff[i], (28,28)), cmap=\"Greys\")\r\nplt.show()\r\n<\/pre>\n<ul>\n<li>Now we shuffle some of the images of the train set.<\/li>\n<li>The shuffling is done using the shuffle() function so that we can display some random images.<\/li>\n<li>We then create 9 plots in 3&#215;3 shape &amp; display the thresholded images of 9 alphabets.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82576\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images.png\" alt=\"character grayscale images\" width=\"1649\" height=\"1040\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images.png 1649w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images-300x189.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images-1024x646.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images-150x95.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images-768x484.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images-1536x969.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/character-grayscale-images-520x328.png 520w\" sizes=\"auto, (max-width: 1649px) 100vw, 1649px\" \/><\/a><\/p>\n<p>(The above image depicts the grayscale images that we got from the dataset)<\/p>\n<h4>Data Reshaping<\/h4>\n<p><strong>Reshaping the training &amp; test dataset so that it can be put in the model<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">train_X = train_x.reshape(train_x.shape[0],train_x.shape[1],train_x.shape[2],1)\r\nprint(\"New shape of train data: \", train_X.shape)\r\n\r\ntest_X = test_x.reshape(test_x.shape[0], test_x.shape[1], test_x.shape[2],1)\r\nprint(\"New shape of train data: \", test_X.shape)\r\n\r\n\r\nNow we reshape the train &amp; test image dataset so that they can be put in the model.\r\n\r\nNew shape of train data:  (297960, 28, 28, 1)\r\nNew shape of train data:  (74490, 28, 28, 1)\r\n<\/pre>\n<p>Now we reshape the train &amp; test image dataset so that they can be put in the model.<\/p>\n<p>New shape of train data: (297960, 28, 28, 1)<\/p>\n<p>New shape of train data: (74490, 28, 28, 1)<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">train_yOHE = to_categorical(train_y, num_classes = 26, dtype='int')\r\nprint(\"New shape of train labels: \", train_yOHE.shape)\r\n\r\ntest_yOHE = to_categorical(test_y, num_classes = 26, dtype='int')\r\nprint(\"New shape of test labels: \", test_yOHE.shape)\r\n<\/pre>\n<p>Here we convert the single float values to categorical values. This is done as the CNN model takes input of labels &amp; generates the output as a vector of probabilities.<\/p>\n<p>Now we define the CNN.<\/p>\n<h3>What is CNN?<\/h3>\n<p>CNN stands for Convolutional Neural Networks that are used to extract the features of the images using several layers of filters.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/cnn-convolutional-neural-network.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82582\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/cnn-convolutional-neural-network.jpg\" alt=\"cnn convolutional neural network\" width=\"1500\" height=\"800\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/cnn-convolutional-neural-network.jpg 1500w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/cnn-convolutional-neural-network-300x160.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/cnn-convolutional-neural-network-1024x546.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/cnn-convolutional-neural-network-150x80.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/cnn-convolutional-neural-network-768x410.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/cnn-convolutional-neural-network-520x277.jpg 520w\" sizes=\"auto, (max-width: 1500px) 100vw, 1500px\" \/><\/a><\/p>\n<p>(Example of how a CNN looks logically)<\/p>\n<p>The convolution layers are generally followed by maxpool layers that are used to reduce the number of features extracted and ultimately the output of the maxpool and layers and convolution layers are flattened into a vector of single dimension and are given as an input to the Dense layer (The fully connected network).<\/p>\n<p>The model created is as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">model = Sequential()\r\n\r\nmodel.add(Conv2D(filters=32, kernel_size=(3, 3), activation='relu', input_shape=(28,28,1)))\r\nmodel.add(MaxPool2D(pool_size=(2, 2), strides=2))\r\n\r\nmodel.add(Conv2D(filters=64, kernel_size=(3, 3), activation='relu', padding = 'same'))\r\nmodel.add(MaxPool2D(pool_size=(2, 2), strides=2))\r\n\r\nmodel.add(Conv2D(filters=128, kernel_size=(3, 3), activation='relu', padding = 'valid'))\r\nmodel.add(MaxPool2D(pool_size=(2, 2), strides=2))\r\n\r\nmodel.add(Flatten())\r\n\r\nmodel.add(Dense(64,activation =\"relu\"))\r\nmodel.add(Dense(128,activation =\"relu\"))\r\n\r\nmodel.add(Dense(26,activation =\"softmax\"))\r\n<\/pre>\n<p>Above we have the CNN model that we designed for training the model over the training dataset.<\/p>\n<h4>Compiling &amp; Fitting Model<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">model.compile(optimizer = Adam(learning_rate=0.001), loss='categorical_crossentropy', metrics=['accuracy'])\r\n\r\nhistory = model.fit(train_X, train_yOHE, epochs=1,  validation_data = (test_X,test_yOHE))\r\n<\/pre>\n<ul>\n<li>Here we are compiling the model, where we define the optimizing function &amp; the loss function to be used for fitting.<\/li>\n<li>The optimizing function used is Adam, that is a combination of RMSprop &amp; Adagram optimizing algorithms.<\/li>\n<li>The dataset is very large so we are training for only a single epoch, however, as required we can even train it for multiple epochs (which is recommended for character recognition for better accuracy).<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">model.summary()\r\nmodel.save(r'model_hand.h5')\r\n<\/pre>\n<p>Now we are getting the model summary that tells us what were the different layers defined in the model &amp; also we save the model using <strong>model.save()<\/strong> function.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82577\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model.png\" alt=\"text recognition model\" width=\"1676\" height=\"1036\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model.png 1676w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model-300x185.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model-1024x633.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model-150x93.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model-768x475.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model-1536x949.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-recognition-model-520x321.png 520w\" sizes=\"auto, (max-width: 1676px) 100vw, 1676px\" \/><\/a><\/p>\n<p>(Summary of the defined model)<\/p>\n<h4>Getting the Train &amp; Validation Accuracies &amp; Losses<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">print(\"The validation accuracy is :\", history.history['val_accuracy'])\r\nprint(\"The training accuracy is :\", history.history['accuracy'])\r\nprint(\"The validation loss is :\", history.history['val_loss'])\r\nprint(\"The training loss is :\", history.history['loss'])\r\n<\/pre>\n<p>In the above code segment, we print out the training &amp; validation accuracies along with the training &amp; validation losses for character recognition.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82578\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies.png\" alt=\"train validation accuracies\" width=\"1652\" height=\"1040\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies.png 1652w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies-300x189.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies-1024x645.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies-150x94.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies-768x483.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies-1536x967.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/train-validation-accuracies-520x327.png 520w\" sizes=\"auto, (max-width: 1652px) 100vw, 1652px\" \/><\/a><\/p>\n<h4>Doing Some Predictions on Test Data<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">fig, axes = plt.subplots(3,3, figsize=(8,9))\r\naxes = axes.flatten()\r\n\r\nfor i,ax in enumerate(axes):\r\n    img = np.reshape(test_X[i], (28,28))\r\n    ax.imshow(img, cmap=\"Greys\")\r\n    \r\n    pred = word_dict[np.argmax(test_yOHE[i])]\r\n    ax.set_title(\"Prediction: \"+pred)\r\n    ax.grid()\r\n<\/pre>\n<ul>\n<li>Here we are creating 9 subplots of (3,3) shape &amp; visualize some of the test dataset alphabets along with their predictions, that are made using the <strong>model.predict()<\/strong> function for text recognition.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82579\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data.png\" alt=\"text prediction on test data\" width=\"1664\" height=\"1044\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data.png 1664w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data-300x188.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data-1024x642.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data-150x94.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data-768x482.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data-1536x964.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/text-prediction-on-test-data-520x326.png 520w\" sizes=\"auto, (max-width: 1664px) 100vw, 1664px\" \/><\/a><\/p>\n<h4>Doing Prediction on External Image<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">img = cv2.imread(r'C:\\Users\\abhij\\Downloads\\img_b.jpg')\r\nimg_copy = img.copy()\r\n\r\nimg = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)\r\nimg = cv2.resize(img, (400,440))\r\n<\/pre>\n<ul>\n<li>Here we have read an external image that is originally an image of alphabet \u2018B\u2019 and made a copy of it that is to go through some processing to be fed to the model for the prediction that we will see in a while.<\/li>\n<li>The img read is then converted from BGR representation (as OpenCV reads the image in BGR format) to RGB for displaying the image, &amp; is resized to our required dimensions that we want to display the image in.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">img_copy = cv2.GaussianBlur(img_copy, (7,7), 0)\r\nimg_gray = cv2.cvtColor(img_copy, cv2.COLOR_BGR2GRAY)\r\n_, img_thresh = cv2.threshold(img_gray, 100, 255, cv2.THRESH_BINARY_INV)\r\n\r\nimg_final = cv2.resize(img_thresh, (28,28))\r\nimg_final =np.reshape(img_final, (1,28,28,1))\r\n<\/pre>\n<ul>\n<li>Now we do some processing on the copied image (img_copy).<\/li>\n<li>We convert the image from BGR to grayscale and apply thresholding to it. We don\u2019t need to apply a threshold we could use the grayscale to predict, but we do it to keep the image smooth without any sort of hazy gray colors in the image that could lead to wrong predictions.<\/li>\n<li>The image is to be then resized using<strong> cv2.resize()<\/strong> function into the dimensions that the model takes as input, along with reshaping the image using <strong>np.reshape()<\/strong> so that it can be used as model input.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">img_pred = word_dict[np.argmax(model.predict(img_final))]\r\n\r\ncv2.putText(img, \"Dataflair _ _ _ \", (20,25), cv2.FONT_HERSHEY_TRIPLEX, 0.7, color = (0,0,230))\r\ncv2.putText(img, \"Prediction: \" + img_pred, (20,410), cv2.FONT_HERSHEY_DUPLEX, 1.3, color = (255,0,30))\r\ncv2.imshow('Dataflair handwritten character recognition _ _ _ ', img)\r\n\r\n<\/pre>\n<ul>\n<li>Now we make a prediction using the processed image &amp; use the np.argmax() function to get the index of the class with the highest predicted probability. Using this we get to know the exact character through the word_dict dictionary.<\/li>\n<li>This predicted character is then displayed on the frame.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">while (1):\r\n    k = cv2.waitKey(1) &amp; 0xFF\r\n    if k == 27:\r\n        break\r\ncv2.destroyAllWindows()\r\n\r\n<\/pre>\n<ul>\n<li>Here we are setting up a waitKey in a while loop that will be stuck in loop until Esc is pressed, &amp; when it gets out of loop using cv2.destroyAllWindows() we destroy any active windows created to stop displaying the frame.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82580\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output.png\" alt=\"Text recognition output\" width=\"1660\" height=\"1040\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output.png 1660w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output-300x188.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output-1024x642.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output-150x94.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output-768x481.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output-1536x962.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/Text-recognition-output-520x326.png 520w\" sizes=\"auto, (max-width: 1660px) 100vw, 1660px\" \/><\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>Handwritten character recognition is a classic machine learning project that teaches how to handle image data and build powerful models. The goal is to train a machine to read letters or numbers written by hand. One of the most famous datasets for this is MNIST, which has thousands of images of handwritten digits from 0 to 9. It\u2019s perfect for beginners to learn about classification problems using neural networks.<\/p>\n<p>We have successfully developed Handwritten character recognition (Text Recognition) with Python, Tensorflow, and Machine Learning libraries.<\/p>\n<p>Handwritten characters have been recognized with more than 97% test accuracy. This can be also further extended to identifying the handwritten characters of other languages too.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:425,&quot;href&quot;:&quot;https:\\\/\\\/www.kaggle.com\\\/sachinpatel21\\\/az-handwritten-alphabets-in-csv-format&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20230924034917\\\/https:\\\/\\\/www.kaggle.com\\\/sachinpatel21\\\/az-handwritten-alphabets-in-csv-format&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-08 15:24:56&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-11 16:49:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-14 19:20:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-17 20:13:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-21 07:04:52&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2025-12-24 09:39:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-27 19:19:32&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-31 10:48:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-04 07:03:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-07 12:47:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-10 22:16:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-14 02:29:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-17 13:39:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-21 06:48:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-24 07:46:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-27 09:28:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-30 09:51:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-02 11:33:35&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-05 12:45:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-08 15:40:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-12 01:03:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-15 15:53:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-18 16:44:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 09:15:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-26 17:15:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-02 10:33:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 00:19:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-09 07:07:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-12 15:57:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-16 04:52:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-19 13:03:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-23 03:16:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-26 07:17:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-30 17:37:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 01:44:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 03:26:56&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-09 11:18:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 18:48:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-17 00:57:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-20 04:58:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-23 11:23:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-26 13:58:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-01 08:44:28&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-04 10:10:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-08 07:22:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-11 11:58:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-14 12:52:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-17 19:10:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-21 02:16:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-25 10:53:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-28 17:02:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-01 01:32:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-04 03:08:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-10 04:06:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-13 13:54:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-16 14:37:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-20 05:23:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-23 09:50:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-27 08:26:32&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-30 08:52:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-06 12:41:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-10 07:15:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-13 11:02:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-16 11:11:32&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-16 11:11:32&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:2491,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1vP7pzEEcN1fTv1RewnSN3lt3l-R0h3Wy\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601061546\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1vP7pzEEcN1fTv1RewnSN3lt3l-R0h3Wy\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-01 06:39:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-05 08:29:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-10 04:06:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-13 13:54:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-16 14:37:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-20 05:23:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-23 09:50:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-27 08:26:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-30 08:52:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-06 12:41:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-10 07:15:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-13 11:02:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-16 11:11:33&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-16 11:11:33&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this machine learning project, we will recognize handwritten characters, i.e, English alphabets from A-Z. This we are going to achieve by modeling a neural network that will have to be trained over a&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":82569,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[23301,23300,20697,23302,21082],"class_list":["post-82561","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","tag-character-detection","tag-handwritten-character-recognition","tag-machine-learning-project","tag-neural-network-project","tag-python-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Handwritten Character Recognition with Neural Network - DataFlair<\/title>\n<meta name=\"description\" content=\"Handwritten Character Recognition by modeling neural network. Develop machine learning project for Text recognition with Python, OpenCV, Keras &amp; TensorFlow.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Handwritten Character Recognition with Neural Network - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Handwritten Character Recognition by modeling neural network. Develop machine learning project for Text recognition with Python, OpenCV, Keras &amp; TensorFlow.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-18T04:30:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T06:15:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/handwritten-character-recognition-machine-learning.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Handwritten Character Recognition with Neural Network - DataFlair","description":"Handwritten Character Recognition by modeling neural network. Develop machine learning project for Text recognition with Python, OpenCV, Keras & TensorFlow.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/","og_locale":"en_US","og_type":"article","og_title":"Handwritten Character Recognition with Neural Network - DataFlair","og_description":"Handwritten Character Recognition by modeling neural network. Develop machine learning project for Text recognition with Python, OpenCV, Keras & TensorFlow.","og_url":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-09-18T04:30:49+00:00","article_modified_time":"2026-06-01T06:15:07+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/handwritten-character-recognition-machine-learning.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Handwritten Character Recognition with Neural Network","datePublished":"2020-09-18T04:30:49+00:00","dateModified":"2026-06-01T06:15:07+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/"},"wordCount":1241,"commentCount":29,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/handwritten-character-recognition-machine-learning.jpg","keywords":["character detection","handwritten character recognition","machine learning project","neural network project","Python project"],"articleSection":["Machine Learning Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/","url":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/","name":"Handwritten Character Recognition with Neural Network - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/handwritten-character-recognition-machine-learning.jpg","datePublished":"2020-09-18T04:30:49+00:00","dateModified":"2026-06-01T06:15:07+00:00","description":"Handwritten Character Recognition by modeling neural network. Develop machine learning project for Text recognition with Python, OpenCV, Keras & TensorFlow.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/handwritten-character-recognition-machine-learning.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/handwritten-character-recognition-machine-learning.jpg","width":1200,"height":628,"caption":"handwritten character recognition"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/handwritten-character-recognition-neural-network\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Machine Learning Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/machine-learning\/"},{"@type":"ListItem","position":3,"name":"Handwritten Character Recognition with Neural Network"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/82561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=82561"}],"version-history":[{"count":8,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/82561\/revisions"}],"predecessor-version":[{"id":148559,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/82561\/revisions\/148559"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/82569"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=82561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=82561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=82561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}