Skip to content

ifrit98/bengaliai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bengali Handwritten Grapheme Classification

Bengali is the 5th most spoken language in the world with hundreds of million of speakers. It’s the official language of Bangladesh and the second most spoken language in India. Considering its reach, there’s significant business and educational interest in developing AI that can optically recognize images of the language handwritten. This challenge hopes to improve on approaches to Bengali recognition.

Optical character recognition is particularly challenging for Bengali. While Bengali has 49 letters (to be more specific 11 vowels and 38 consonants) in its alphabet, there are also 18 potential diacritics, or accents. This means that there are many more graphemes, or the smallest units in a written language. The added complexity results in ~13,000 different grapheme variations (compared to English’s 250 graphemic units).

alt text

This dataset comes from Bengali.AI, which hopes to democratize and accelerate research in Bengali language technologies and promote machine learning education. The dataset contains the image of a handwritten Bengali grapheme and this model separately classifies the three constituent elements in the image: grapheme root, vowel diacritics, and consonant diacritics.

Load and predict with trained model

Simply clone this repo and run the /eval.R script

git clone https://github.com/ifrit98/bengaliai.git
cd bengaliai
chmod +x eval.R
./eval.R

Data Preprocessing Pipeline

 | parquet (.pq) files (32332,)  |  # Images come in compressed format as 1D vectors
              -> 
 | invert(img) { 255 - img }     |  # Simple intensity inversion
              -> 
 | Crop & Resize (128, 128)      |  # Makes the images square, and slightly smaller
              -> 
 | augment(img, op) { op(img) }  |  # Randomly samples from one (or more) impairments to apply
              ->                  
 | normalize(img) {              |
 |   (img - mean(img)) / sd(img) |  # normalize image to unit mean, variance
 |  }                            | 
              ->
 | scale(img) { img / max(img) } |  # Scale values to (0,1)
  • We ultimately end up with an image that has been impaired with one (or more) of the following augmentations. Augment ops = [autocontrast, equalize, posterize, rotate, solarize, shear_x, shear_y, translate_x, translate_y, color, contrast, brightness, sharpness] Impairments

Results

History over ~180 epochs

  • Trained on ~100k examples, with 50% impaired, and 50% minimally cropped and resized. alt text

Model Architecture

Squeeze and Excitation Networks

SE networks adaptively recalibrate channel-wise feature responses by explicitly modelling interdependencies between channels.

alt_text alt_text arXiv 1709.01507

Model Summary (Keras)

Model: "SEResnetVariant"
______________________________________________________________________________________________
Layer (type)                   Output Shape        Param #    Connected to                    
==============================================================================================
input_1 (InputLayer)           [(None, 128, 128, 1 0                                          
______________________________________________________________________________________________
conv2d (Conv2D)                (None, 64, 64, 32)  288        input_1[0][0]                   
______________________________________________________________________________________________
batch_normalization (BatchNorm (None, 64, 64, 32)  128        conv2d[0][0]                    
______________________________________________________________________________________________
re_lu (ReLU)                   (None, 64, 64, 32)  0          batch_normalization[0][0]       
______________________________________________________________________________________________
conv2d_1 (Conv2D)              (None, 64, 64, 32)  9216       re_lu[0][0]                     
______________________________________________________________________________________________
batch_normalization_1 (BatchNo (None, 64, 64, 32)  128        conv2d_1[0][0]                  
______________________________________________________________________________________________
re_lu_1 (ReLU)                 (None, 64, 64, 32)  0          batch_normalization_1[0][0]     
______________________________________________________________________________________________
conv2d_2 (Conv2D)              (None, 64, 64, 32)  9216       re_lu_1[0][0]                   
______________________________________________________________________________________________
batch_normalization_2 (BatchNo (None, 64, 64, 32)  128        conv2d_2[0][0]                  
______________________________________________________________________________________________
re_lu_2 (ReLU)                 (None, 64, 64, 32)  0          batch_normalization_2[0][0]     
______________________________________________________________________________________________
max_pooling2d (MaxPooling2D)   (None, 31, 31, 32)  0          re_lu_2[0][0]                   
______________________________________________________________________________________________
conv2d_3 (Conv2D)              (None, 31, 31, 64)  2048       max_pooling2d[0][0]             
______________________________________________________________________________________________
batch_normalization_3 (BatchNo (None, 31, 31, 64)  256        conv2d_3[0][0]                  
______________________________________________________________________________________________
separable_conv2d (SeparableCon (None, 31, 31, 64)  4736       batch_normalization_3[0][0]     
______________________________________________________________________________________________
batch_normalization_4 (BatchNo (None, 31, 31, 64)  256        separable_conv2d[0][0]          
______________________________________________________________________________________________
re_lu_3 (ReLU)                 (None, 31, 31, 64)  0          batch_normalization_4[0][0]     
______________________________________________________________________________________________
separable_conv2d_1 (SeparableC (None, 31, 31, 64)  4736       re_lu_3[0][0]                   
______________________________________________________________________________________________
batch_normalization_5 (BatchNo (None, 31, 31, 64)  256        separable_conv2d_1[0][0]        
______________________________________________________________________________________________
re_lu_4 (ReLU)                 (None, 31, 31, 64)  0          batch_normalization_5[0][0]     
______________________________________________________________________________________________
conv2d_4 (Conv2D)              (None, 31, 31, 64)  4096       re_lu_4[0][0]                   
______________________________________________________________________________________________
batch_normalization_6 (BatchNo (None, 31, 31, 64)  256        conv2d_4[0][0]                  
______________________________________________________________________________________________
average_pooling2d (AveragePool (None, 31, 31, 64)  0          batch_normalization_6[0][0]     
______________________________________________________________________________________________
conv2d_5 (Conv2D)              (None, 31, 31, 4)   260        average_pooling2d[0][0]         
______________________________________________________________________________________________
re_lu_5 (ReLU)                 (None, 31, 31, 4)   0          conv2d_5[0][0]                  
______________________________________________________________________________________________
conv2d_6 (Conv2D)              (None, 31, 31, 64)  320        re_lu_5[0][0]                   
______________________________________________________________________________________________
activation (Activation)        (None, 31, 31, 64)  0          conv2d_6[0][0]                  
______________________________________________________________________________________________
multiply (Multiply)            (None, 31, 31, 64)  0          activation[0][0]                
                                                              batch_normalization_6[0][0]     
______________________________________________________________________________________________
add (Add)                      (None, 31, 31, 64)  0          multiply[0][0]                  
                                                              batch_normalization_3[0][0]     
______________________________________________________________________________________________
separable_conv2d_2 (SeparableC (None, 31, 31, 64)  4736       add[0][0]                       
______________________________________________________________________________________________
batch_normalization_7 (BatchNo (None, 31, 31, 64)  256        separable_conv2d_2[0][0]        
______________________________________________________________________________________________
re_lu_6 (ReLU)                 (None, 31, 31, 64)  0          batch_normalization_7[0][0]     
______________________________________________________________________________________________
separable_conv2d_3 (SeparableC (None, 31, 31, 64)  4736       re_lu_6[0][0]                   
______________________________________________________________________________________________
batch_normalization_8 (BatchNo (None, 31, 31, 64)  256        separable_conv2d_3[0][0]        
______________________________________________________________________________________________
re_lu_7 (ReLU)                 (None, 31, 31, 64)  0          batch_normalization_8[0][0]     
______________________________________________________________________________________________
conv2d_7 (Conv2D)              (None, 31, 31, 64)  4096       re_lu_7[0][0]                   
______________________________________________________________________________________________
batch_normalization_9 (BatchNo (None, 31, 31, 64)  256        conv2d_7[0][0]                  
______________________________________________________________________________________________
average_pooling2d_1 (AveragePo (None, 31, 31, 64)  0          batch_normalization_9[0][0]     
______________________________________________________________________________________________
conv2d_8 (Conv2D)              (None, 31, 31, 4)   260        average_pooling2d_1[0][0]       
______________________________________________________________________________________________
re_lu_8 (ReLU)                 (None, 31, 31, 4)   0          conv2d_8[0][0]                  
______________________________________________________________________________________________
conv2d_9 (Conv2D)              (None, 31, 31, 64)  320        re_lu_8[0][0]                   
______________________________________________________________________________________________
activation_1 (Activation)      (None, 31, 31, 64)  0          conv2d_9[0][0]                  
______________________________________________________________________________________________
multiply_1 (Multiply)          (None, 31, 31, 64)  0          activation_1[0][0]              
                                                              batch_normalization_9[0][0]     
______________________________________________________________________________________________
add_1 (Add)                    (None, 31, 31, 64)  0          multiply_1[0][0]                
                                                              add[0][0]                       
______________________________________________________________________________________________
separable_conv2d_4 (SeparableC (None, 31, 31, 64)  4736       add_1[0][0]                     
______________________________________________________________________________________________
batch_normalization_10 (BatchN (None, 31, 31, 64)  256        separable_conv2d_4[0][0]        
______________________________________________________________________________________________
re_lu_9 (ReLU)                 (None, 31, 31, 64)  0          batch_normalization_10[0][0]    
______________________________________________________________________________________________
separable_conv2d_5 (SeparableC (None, 31, 31, 64)  4736       re_lu_9[0][0]                   
______________________________________________________________________________________________
batch_normalization_11 (BatchN (None, 31, 31, 64)  256        separable_conv2d_5[0][0]        
______________________________________________________________________________________________
re_lu_10 (ReLU)                (None, 31, 31, 64)  0          batch_normalization_11[0][0]    
______________________________________________________________________________________________
conv2d_10 (Conv2D)             (None, 31, 31, 64)  4096       re_lu_10[0][0]                  
______________________________________________________________________________________________
batch_normalization_12 (BatchN (None, 31, 31, 64)  256        conv2d_10[0][0]                 
______________________________________________________________________________________________
average_pooling2d_2 (AveragePo (None, 31, 31, 64)  0          batch_normalization_12[0][0]    
______________________________________________________________________________________________
conv2d_11 (Conv2D)             (None, 31, 31, 4)   260        average_pooling2d_2[0][0]       
______________________________________________________________________________________________
re_lu_11 (ReLU)                (None, 31, 31, 4)   0          conv2d_11[0][0]                 
______________________________________________________________________________________________
conv2d_12 (Conv2D)             (None, 31, 31, 64)  320        re_lu_11[0][0]                  
______________________________________________________________________________________________
activation_2 (Activation)      (None, 31, 31, 64)  0          conv2d_12[0][0]                 
______________________________________________________________________________________________
multiply_2 (Multiply)          (None, 31, 31, 64)  0          activation_2[0][0]              
                                                              batch_normalization_12[0][0]    
______________________________________________________________________________________________
add_2 (Add)                    (None, 31, 31, 64)  0          multiply_2[0][0]                
                                                              add_1[0][0]                     
______________________________________________________________________________________________
conv2d_13 (Conv2D)             (None, 31, 31, 128) 8192       add_2[0][0]                     
______________________________________________________________________________________________
batch_normalization_13 (BatchN (None, 31, 31, 128) 512        conv2d_13[0][0]                 
______________________________________________________________________________________________
separable_conv2d_6 (SeparableC (None, 31, 31, 128) 17664      batch_normalization_13[0][0]    
______________________________________________________________________________________________
batch_normalization_14 (BatchN (None, 31, 31, 128) 512        separable_conv2d_6[0][0]        
______________________________________________________________________________________________
re_lu_12 (ReLU)                (None, 31, 31, 128) 0          batch_normalization_14[0][0]    
______________________________________________________________________________________________
separable_conv2d_7 (SeparableC (None, 31, 31, 128) 17664      re_lu_12[0][0]                  
______________________________________________________________________________________________
batch_normalization_15 (BatchN (None, 31, 31, 128) 512        separable_conv2d_7[0][0]        
______________________________________________________________________________________________
re_lu_13 (ReLU)                (None, 31, 31, 128) 0          batch_normalization_15[0][0]    
______________________________________________________________________________________________
conv2d_14 (Conv2D)             (None, 31, 31, 128) 16384      re_lu_13[0][0]                  
______________________________________________________________________________________________
batch_normalization_16 (BatchN (None, 31, 31, 128) 512        conv2d_14[0][0]                 
______________________________________________________________________________________________
average_pooling2d_3 (AveragePo (None, 31, 31, 128) 0          batch_normalization_16[0][0]    
______________________________________________________________________________________________
conv2d_15 (Conv2D)             (None, 31, 31, 8)   1032       average_pooling2d_3[0][0]       
______________________________________________________________________________________________
re_lu_14 (ReLU)                (None, 31, 31, 8)   0          conv2d_15[0][0]                 
______________________________________________________________________________________________
conv2d_16 (Conv2D)             (None, 31, 31, 128) 1152       re_lu_14[0][0]                  
______________________________________________________________________________________________
activation_3 (Activation)      (None, 31, 31, 128) 0          conv2d_16[0][0]                 
______________________________________________________________________________________________
multiply_3 (Multiply)          (None, 31, 31, 128) 0          activation_3[0][0]              
                                                              batch_normalization_16[0][0]    
______________________________________________________________________________________________
add_3 (Add)                    (None, 31, 31, 128) 0          multiply_3[0][0]                
                                                              batch_normalization_13[0][0]    
______________________________________________________________________________________________
separable_conv2d_8 (SeparableC (None, 31, 31, 128) 17664      add_3[0][0]                     
______________________________________________________________________________________________
batch_normalization_17 (BatchN (None, 31, 31, 128) 512        separable_conv2d_8[0][0]        
______________________________________________________________________________________________
re_lu_15 (ReLU)                (None, 31, 31, 128) 0          batch_normalization_17[0][0]    
______________________________________________________________________________________________
separable_conv2d_9 (SeparableC (None, 31, 31, 128) 17664      re_lu_15[0][0]                  
______________________________________________________________________________________________
batch_normalization_18 (BatchN (None, 31, 31, 128) 512        separable_conv2d_9[0][0]        
______________________________________________________________________________________________
re_lu_16 (ReLU)                (None, 31, 31, 128) 0          batch_normalization_18[0][0]    
______________________________________________________________________________________________
conv2d_17 (Conv2D)             (None, 31, 31, 128) 16384      re_lu_16[0][0]                  
______________________________________________________________________________________________
batch_normalization_19 (BatchN (None, 31, 31, 128) 512        conv2d_17[0][0]                 
______________________________________________________________________________________________
average_pooling2d_4 (AveragePo (None, 31, 31, 128) 0          batch_normalization_19[0][0]    
______________________________________________________________________________________________
conv2d_18 (Conv2D)             (None, 31, 31, 8)   1032       average_pooling2d_4[0][0]       
______________________________________________________________________________________________
re_lu_17 (ReLU)                (None, 31, 31, 8)   0          conv2d_18[0][0]                 
______________________________________________________________________________________________
conv2d_19 (Conv2D)             (None, 31, 31, 128) 1152       re_lu_17[0][0]                  
______________________________________________________________________________________________
activation_4 (Activation)      (None, 31, 31, 128) 0          conv2d_19[0][0]                 
______________________________________________________________________________________________
multiply_4 (Multiply)          (None, 31, 31, 128) 0          activation_4[0][0]              
                                                              batch_normalization_19[0][0]    
______________________________________________________________________________________________
add_4 (Add)                    (None, 31, 31, 128) 0          multiply_4[0][0]                
                                                              add_3[0][0]                     
______________________________________________________________________________________________
separable_conv2d_10 (Separable (None, 31, 31, 128) 17664      add_4[0][0]                     
______________________________________________________________________________________________
batch_normalization_20 (BatchN (None, 31, 31, 128) 512        separable_conv2d_10[0][0]       
______________________________________________________________________________________________
re_lu_18 (ReLU)                (None, 31, 31, 128) 0          batch_normalization_20[0][0]    
______________________________________________________________________________________________
separable_conv2d_11 (Separable (None, 31, 31, 128) 17664      re_lu_18[0][0]                  
______________________________________________________________________________________________
batch_normalization_21 (BatchN (None, 31, 31, 128) 512        separable_conv2d_11[0][0]       
______________________________________________________________________________________________
re_lu_19 (ReLU)                (None, 31, 31, 128) 0          batch_normalization_21[0][0]    
______________________________________________________________________________________________
conv2d_20 (Conv2D)             (None, 31, 31, 128) 16384      re_lu_19[0][0]                  
______________________________________________________________________________________________
batch_normalization_22 (BatchN (None, 31, 31, 128) 512        conv2d_20[0][0]                 
______________________________________________________________________________________________
average_pooling2d_5 (AveragePo (None, 31, 31, 128) 0          batch_normalization_22[0][0]    
______________________________________________________________________________________________
conv2d_21 (Conv2D)             (None, 31, 31, 8)   1032       average_pooling2d_5[0][0]       
______________________________________________________________________________________________
re_lu_20 (ReLU)                (None, 31, 31, 8)   0          conv2d_21[0][0]                 
______________________________________________________________________________________________
conv2d_22 (Conv2D)             (None, 31, 31, 128) 1152       re_lu_20[0][0]                  
______________________________________________________________________________________________
activation_5 (Activation)      (None, 31, 31, 128) 0          conv2d_22[0][0]                 
______________________________________________________________________________________________
multiply_5 (Multiply)          (None, 31, 31, 128) 0          activation_5[0][0]              
                                                              batch_normalization_22[0][0]    
______________________________________________________________________________________________
add_5 (Add)                    (None, 31, 31, 128) 0          multiply_5[0][0]                
                                                              add_4[0][0]                     
______________________________________________________________________________________________
conv2d_23 (Conv2D)             (None, 31, 31, 256) 32768      add_5[0][0]                     
______________________________________________________________________________________________
batch_normalization_23 (BatchN (None, 31, 31, 256) 1024       conv2d_23[0][0]                 
______________________________________________________________________________________________
separable_conv2d_12 (Separable (None, 31, 31, 256) 68096      batch_normalization_23[0][0]    
______________________________________________________________________________________________
batch_normalization_24 (BatchN (None, 31, 31, 256) 1024       separable_conv2d_12[0][0]       
______________________________________________________________________________________________
re_lu_21 (ReLU)                (None, 31, 31, 256) 0          batch_normalization_24[0][0]    
______________________________________________________________________________________________
separable_conv2d_13 (Separable (None, 31, 31, 256) 68096      re_lu_21[0][0]                  
______________________________________________________________________________________________
batch_normalization_25 (BatchN (None, 31, 31, 256) 1024       separable_conv2d_13[0][0]       
______________________________________________________________________________________________
re_lu_22 (ReLU)                (None, 31, 31, 256) 0          batch_normalization_25[0][0]    
______________________________________________________________________________________________
conv2d_24 (Conv2D)             (None, 31, 31, 256) 65536      re_lu_22[0][0]                  
______________________________________________________________________________________________
batch_normalization_26 (BatchN (None, 31, 31, 256) 1024       conv2d_24[0][0]                 
______________________________________________________________________________________________
average_pooling2d_6 (AveragePo (None, 31, 31, 256) 0          batch_normalization_26[0][0]    
______________________________________________________________________________________________
conv2d_25 (Conv2D)             (None, 31, 31, 16)  4112       average_pooling2d_6[0][0]       
______________________________________________________________________________________________
re_lu_23 (ReLU)                (None, 31, 31, 16)  0          conv2d_25[0][0]                 
______________________________________________________________________________________________
conv2d_26 (Conv2D)             (None, 31, 31, 256) 4352       re_lu_23[0][0]                  
______________________________________________________________________________________________
activation_6 (Activation)      (None, 31, 31, 256) 0          conv2d_26[0][0]                 
______________________________________________________________________________________________
multiply_6 (Multiply)          (None, 31, 31, 256) 0          activation_6[0][0]              
                                                              batch_normalization_26[0][0]    
______________________________________________________________________________________________
add_6 (Add)                    (None, 31, 31, 256) 0          multiply_6[0][0]                
                                                              batch_normalization_23[0][0]    
______________________________________________________________________________________________
separable_conv2d_14 (Separable (None, 31, 31, 256) 68096      add_6[0][0]                     
______________________________________________________________________________________________
batch_normalization_27 (BatchN (None, 31, 31, 256) 1024       separable_conv2d_14[0][0]       
______________________________________________________________________________________________
re_lu_24 (ReLU)                (None, 31, 31, 256) 0          batch_normalization_27[0][0]    
______________________________________________________________________________________________
separable_conv2d_15 (Separable (None, 31, 31, 256) 68096      re_lu_24[0][0]                  
______________________________________________________________________________________________
batch_normalization_28 (BatchN (None, 31, 31, 256) 1024       separable_conv2d_15[0][0]       
______________________________________________________________________________________________
re_lu_25 (ReLU)                (None, 31, 31, 256) 0          batch_normalization_28[0][0]    
______________________________________________________________________________________________
conv2d_27 (Conv2D)             (None, 31, 31, 256) 65536      re_lu_25[0][0]                  
______________________________________________________________________________________________
batch_normalization_29 (BatchN (None, 31, 31, 256) 1024       conv2d_27[0][0]                 
______________________________________________________________________________________________
average_pooling2d_7 (AveragePo (None, 31, 31, 256) 0          batch_normalization_29[0][0]    
______________________________________________________________________________________________
conv2d_28 (Conv2D)             (None, 31, 31, 16)  4112       average_pooling2d_7[0][0]       
______________________________________________________________________________________________
re_lu_26 (ReLU)                (None, 31, 31, 16)  0          conv2d_28[0][0]                 
______________________________________________________________________________________________
conv2d_29 (Conv2D)             (None, 31, 31, 256) 4352       re_lu_26[0][0]                  
______________________________________________________________________________________________
activation_7 (Activation)      (None, 31, 31, 256) 0          conv2d_29[0][0]                 
______________________________________________________________________________________________
multiply_7 (Multiply)          (None, 31, 31, 256) 0          activation_7[0][0]              
                                                              batch_normalization_29[0][0]    
______________________________________________________________________________________________
add_7 (Add)                    (None, 31, 31, 256) 0          multiply_7[0][0]                
                                                              add_6[0][0]                     
______________________________________________________________________________________________
separable_conv2d_16 (Separable (None, 31, 31, 256) 68096      add_7[0][0]                     
______________________________________________________________________________________________
batch_normalization_30 (BatchN (None, 31, 31, 256) 1024       separable_conv2d_16[0][0]       
______________________________________________________________________________________________
re_lu_27 (ReLU)                (None, 31, 31, 256) 0          batch_normalization_30[0][0]    
______________________________________________________________________________________________
separable_conv2d_17 (Separable (None, 31, 31, 256) 68096      re_lu_27[0][0]                  
______________________________________________________________________________________________
batch_normalization_31 (BatchN (None, 31, 31, 256) 1024       separable_conv2d_17[0][0]       
______________________________________________________________________________________________
re_lu_28 (ReLU)                (None, 31, 31, 256) 0          batch_normalization_31[0][0]    
______________________________________________________________________________________________
conv2d_30 (Conv2D)             (None, 31, 31, 256) 65536      re_lu_28[0][0]                  
______________________________________________________________________________________________
batch_normalization_32 (BatchN (None, 31, 31, 256) 1024       conv2d_30[0][0]                 
______________________________________________________________________________________________
average_pooling2d_8 (AveragePo (None, 31, 31, 256) 0          batch_normalization_32[0][0]    
______________________________________________________________________________________________
conv2d_31 (Conv2D)             (None, 31, 31, 16)  4112       average_pooling2d_8[0][0]       
______________________________________________________________________________________________
re_lu_29 (ReLU)                (None, 31, 31, 16)  0          conv2d_31[0][0]                 
______________________________________________________________________________________________
conv2d_32 (Conv2D)             (None, 31, 31, 256) 4352       re_lu_29[0][0]                  
______________________________________________________________________________________________
activation_8 (Activation)      (None, 31, 31, 256) 0          conv2d_32[0][0]                 
______________________________________________________________________________________________
multiply_8 (Multiply)          (None, 31, 31, 256) 0          activation_8[0][0]              
                                                              batch_normalization_32[0][0]    
______________________________________________________________________________________________
add_8 (Add)                    (None, 31, 31, 256) 0          multiply_8[0][0]                
                                                              add_7[0][0]                     
______________________________________________________________________________________________
conv2d_33 (Conv2D)             (None, 31, 31, 512) 131072     add_8[0][0]                     
______________________________________________________________________________________________
batch_normalization_33 (BatchN (None, 31, 31, 512) 2048       conv2d_33[0][0]                 
______________________________________________________________________________________________
separable_conv2d_18 (Separable (None, 31, 31, 512) 267264     batch_normalization_33[0][0]    
______________________________________________________________________________________________
batch_normalization_34 (BatchN (None, 31, 31, 512) 2048       separable_conv2d_18[0][0]       
______________________________________________________________________________________________
re_lu_30 (ReLU)                (None, 31, 31, 512) 0          batch_normalization_34[0][0]    
______________________________________________________________________________________________
separable_conv2d_19 (Separable (None, 31, 31, 512) 267264     re_lu_30[0][0]                  
______________________________________________________________________________________________
batch_normalization_35 (BatchN (None, 31, 31, 512) 2048       separable_conv2d_19[0][0]       
______________________________________________________________________________________________
re_lu_31 (ReLU)                (None, 31, 31, 512) 0          batch_normalization_35[0][0]    
______________________________________________________________________________________________
conv2d_34 (Conv2D)             (None, 31, 31, 512) 262144     re_lu_31[0][0]                  
______________________________________________________________________________________________
batch_normalization_36 (BatchN (None, 31, 31, 512) 2048       conv2d_34[0][0]                 
______________________________________________________________________________________________
average_pooling2d_9 (AveragePo (None, 31, 31, 512) 0          batch_normalization_36[0][0]    
______________________________________________________________________________________________
conv2d_35 (Conv2D)             (None, 31, 31, 32)  16416      average_pooling2d_9[0][0]       
______________________________________________________________________________________________
re_lu_32 (ReLU)                (None, 31, 31, 32)  0          conv2d_35[0][0]                 
______________________________________________________________________________________________
conv2d_36 (Conv2D)             (None, 31, 31, 512) 16896      re_lu_32[0][0]                  
______________________________________________________________________________________________
activation_9 (Activation)      (None, 31, 31, 512) 0          conv2d_36[0][0]                 
______________________________________________________________________________________________
multiply_9 (Multiply)          (None, 31, 31, 512) 0          activation_9[0][0]              
                                                              batch_normalization_36[0][0]    
______________________________________________________________________________________________
add_9 (Add)                    (None, 31, 31, 512) 0          multiply_9[0][0]                
                                                              batch_normalization_33[0][0]    
______________________________________________________________________________________________
separable_conv2d_20 (Separable (None, 31, 31, 512) 267264     add_9[0][0]                     
______________________________________________________________________________________________
batch_normalization_37 (BatchN (None, 31, 31, 512) 2048       separable_conv2d_20[0][0]       
______________________________________________________________________________________________
re_lu_33 (ReLU)                (None, 31, 31, 512) 0          batch_normalization_37[0][0]    
______________________________________________________________________________________________
separable_conv2d_21 (Separable (None, 31, 31, 512) 267264     re_lu_33[0][0]                  
______________________________________________________________________________________________
batch_normalization_38 (BatchN (None, 31, 31, 512) 2048       separable_conv2d_21[0][0]       
______________________________________________________________________________________________
re_lu_34 (ReLU)                (None, 31, 31, 512) 0          batch_normalization_38[0][0]    
______________________________________________________________________________________________
conv2d_37 (Conv2D)             (None, 31, 31, 512) 262144     re_lu_34[0][0]                  
______________________________________________________________________________________________
batch_normalization_39 (BatchN (None, 31, 31, 512) 2048       conv2d_37[0][0]                 
______________________________________________________________________________________________
average_pooling2d_10 (AverageP (None, 31, 31, 512) 0          batch_normalization_39[0][0]    
______________________________________________________________________________________________
conv2d_38 (Conv2D)             (None, 31, 31, 32)  16416      average_pooling2d_10[0][0]      
______________________________________________________________________________________________
re_lu_35 (ReLU)                (None, 31, 31, 32)  0          conv2d_38[0][0]                 
______________________________________________________________________________________________
conv2d_39 (Conv2D)             (None, 31, 31, 512) 16896      re_lu_35[0][0]                  
______________________________________________________________________________________________
activation_10 (Activation)     (None, 31, 31, 512) 0          conv2d_39[0][0]                 
______________________________________________________________________________________________
multiply_10 (Multiply)         (None, 31, 31, 512) 0          activation_10[0][0]             
                                                              batch_normalization_39[0][0]    
______________________________________________________________________________________________
add_10 (Add)                   (None, 31, 31, 512) 0          multiply_10[0][0]               
                                                              add_9[0][0]                     
______________________________________________________________________________________________
separable_conv2d_22 (Separable (None, 31, 31, 512) 267264     add_10[0][0]                    
______________________________________________________________________________________________
batch_normalization_40 (BatchN (None, 31, 31, 512) 2048       separable_conv2d_22[0][0]       
______________________________________________________________________________________________
re_lu_36 (ReLU)                (None, 31, 31, 512) 0          batch_normalization_40[0][0]    
______________________________________________________________________________________________
separable_conv2d_23 (Separable (None, 31, 31, 512) 267264     re_lu_36[0][0]                  
______________________________________________________________________________________________
batch_normalization_41 (BatchN (None, 31, 31, 512) 2048       separable_conv2d_23[0][0]       
______________________________________________________________________________________________
re_lu_37 (ReLU)                (None, 31, 31, 512) 0          batch_normalization_41[0][0]    
______________________________________________________________________________________________
conv2d_40 (Conv2D)             (None, 31, 31, 512) 262144     re_lu_37[0][0]                  
______________________________________________________________________________________________
batch_normalization_42 (BatchN (None, 31, 31, 512) 2048       conv2d_40[0][0]                 
______________________________________________________________________________________________
average_pooling2d_11 (AverageP (None, 31, 31, 512) 0          batch_normalization_42[0][0]    
______________________________________________________________________________________________
conv2d_41 (Conv2D)             (None, 31, 31, 32)  16416      average_pooling2d_11[0][0]      
______________________________________________________________________________________________
re_lu_38 (ReLU)                (None, 31, 31, 32)  0          conv2d_41[0][0]                 
______________________________________________________________________________________________
conv2d_42 (Conv2D)             (None, 31, 31, 512) 16896      re_lu_38[0][0]                  
______________________________________________________________________________________________
activation_11 (Activation)     (None, 31, 31, 512) 0          conv2d_42[0][0]                 
______________________________________________________________________________________________
multiply_11 (Multiply)         (None, 31, 31, 512) 0          activation_11[0][0]             
                                                              batch_normalization_42[0][0]    
______________________________________________________________________________________________
add_11 (Add)                   (None, 31, 31, 512) 0          multiply_11[0][0]               
                                                              add_10[0][0]                    
______________________________________________________________________________________________
global_max_pooling2d (GlobalMa (None, 512)         0          add_11[0][0]                    
______________________________________________________________________________________________
dropout (Dropout)              (None, 512)         0          global_max_pooling2d[0][0]      
______________________________________________________________________________________________
grapheme_root (Dense)          (None, 168)         86184      dropout[0][0]                   
______________________________________________________________________________________________
consonant (Dense)              (None, 7)           3591       dropout[0][0]                   
______________________________________________________________________________________________
vowel (Dense)                  (None, 11)          5643       dropout[0][0]                   
==============================================================================================
Total params: 3,651,662
Trainable params: 3,632,270
Non-trainable params: 19,392
______________________________________________________________________________________________

About

Classification of Bengali handwritten graphemes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published