From here you can download onnx converted model and use this file for inferencing with opencv.
- pytorch 1.8.1, CUDA 10.2
pip3 install torch==1.8.1+cu102 torchvision==0.9.1+cu102
- Requirements: Pillow, opencv-python, tqdm, matplotlib, nltk
pip3 install Pillow opencv-python tqdm matplotlib nltk
Download dataset from from here
data.zip contain below data.
IIIT5k[1] ic17[2] ic03[3] IAM Handwriting Database[4]
folder
├── data.json
└── data
├── word_1.png
├── word_2.png
├── word_3.png
At this time, data.json
should be {imagename: label, }
For example {word_1: label, ...}
Set The Paramters
from train import *
data_path = "E:/dataset/TextRecognition/MixedAll/data"
jsonFilePath = data_path+".json"
model_save_directory = "check_points"
batch_size = 32
rnn_hidden_size = 256
cnn_output_channel = 512
num_epochs = 50
model_backbone = "resnet18"
imgSize = (50, 200)
# imgSize = (32, 100)
imgChannel = 1
lr = 0.000087
train(imgSize, imgChannel, data_path, jsonFilePath, model_backbone, model_save_directory, num_epochs, cnn_output_channel, rnn_hidden_size, batch_size, lr)
From training data it will use 20% images for validation
Once the training is completed it will use the best model for onnx conversion you can use inferenceWithOnnx.py for inferencing with opencv.
dassmate date page the water cucle is thie palith that al watey follows as at moves asound eanth in dpfestent ptat liouid water hound in oceans o rivers akee and even under raround solid iee ie found is alaciers onow and at the nortr and south sboles water vadoy a aas do found in farlhs atmos here the sun heat causce alaceers and snow se te melt into liouid water this watey sanpe intt oceans lakes and streams watey foom ce melbino snow and pe rlkd aoes iito e tthe 50ic tiere at suddlie water st tos folants and the around waa ter that ce we drink worrmi uaterr na bouy siscs up throuan easltis atmuss ene as the watey vaour viscs hiaher and hiahea the cool air ot the itmos causes the waler vapoly to ttuyn back snte lrauid water creatina clouds this brocess i5 called condenstin uhen a cloud be fuu a lrouid usater it falle toom the skn as rain
@InProceedings{MishraBMVC12,
author = "Mishra, A. and Alahari, K. and Jawahar, C.~V.",
title = "Scene Text Recognition using Higher Order Language Priors",
booktitle = "BMVC",
year = "2012",
}