Character Recognition in the Image Using Deep Learning

Total Page:16

File Type:pdf, Size:1020Kb

Character Recognition in the Image Using Deep Learning ALGERIAN REPUBLIC DEMOCRATIC AND POPULAR MINISTRY OF HIGH EDUCATION AND SCIENTIFIC RESEARCHES University of Mohamed Khider Biskra Faculty of Exact Science and Science of Life and Nature Department of Computer Science Dissertation For Master Degree Graduation In Computer Science Field Computer Graphics & Computer Vision Title: Character Recognition In The Image Using Deep Learning Realized by: Barkat Ishak Defended the 06/07/2019, in front of the jury composed of: Academic year 2018-2019 Dedication This research work is dedicated to: My beloved mother, my first teacher who always had faith in me. My respected father whose support helped me to reach my goals. My lovely sisters Sara, Nafla and Takia. My dear brothers Immed and mehdi for their encouragement. To all my uncles and aunties. Last but not least, to my best friends and colleagues Amir, Mostapha, Seddik, Hazem, Hatem, Lotfi, Yasmine, Roufaida and Khaoula, And to all those whom I love and cherish. 1 Acknowledgement Before all, my deep and sincere praise to Allah the almighty for providing me with strength and patience to accomplish this research work. My thanks go to my supervisor Zerari Abd el Moumen for his valuable guidance. Special thanks would go to the members of the jury namely, Mokhtari Bilel, Chighoub Rabia for their efforts to evaluate my research work. I also express my gratitude to my classmate Halimi Roufaida for her tips through this work. 2 Abstract The human brain as complex product of evolutionary success, has acquired and is em- powered by a sophisticated learning intuition which consists of the broader memory and the creativeness of imagination, both grant flexibility and an extreme potential of pattern recogni- tion and acquisition, that’s aside, a computer is only suitable for information retrieval and is as good as the program it runs, which makes it’s window of usage very limited to fewer tasks, but is that the apex of computer science? What if computers were able to learn and recognize unknown patterns without the constant teaching and bypass first-hand programming?. Key-words: Deep learning, Image processing, Character recognition, Convolution neural networks. 3 Contents 1 Recognition in the digital image 12 1.1 Introduction . 12 1.2 Image processing . 12 1.2.1 Photo-metric property of the human visual system . 12 1.2.1.1 Human eye . 12 1.2.1.2 Color vision . 14 1.2.2 Digital Camera . 17 1.2.2.1 Sampling and aliasing . 19 1.2.2.2 Color cameras . 20 1.2.2.3 Compression . 20 1.2.3 Feature extraction . 20 1.2.3.1 The Uses of feature extraction . 21 1.2.3.2 Practical Uses of Feature Extraction . 21 1.2.3.3 Feature extraction methods . 21 1.2.4 Image Segmentation . 22 1.3 Recognition in the image . 23 1.3.1 Implementation of the image recognition Algorithms . 23 1.3.1.1 The uses of images recognition . 24 1.3.1.2 Recognition in images problems . 26 1.4 Characters recognition in images . 27 1.4.1 Definition . 27 1.4.2 Characters recognition types . 27 1.4.3 Character recognition Techniques . 27 1.4.3.1 Pre-processing . 28 1.4.3.2 Character recognition . 28 1.4.3.3 Post-processing . 29 1.4.3.4 Application-specific optimizations . 29 1.4.4 Applications . 30 1.5 Conclusion . 30 2 Deep Learning 31 2.1 Introduction . 31 4 CONTENTS 5 2.2 Neural networks . 31 2.2.1 Definition . 31 2.2.2 Neural Networks Architectures . 31 2.2.2.1 Single-Layer Feedforward Networks . 32 2.2.2.2 Multilayer Feedforward Networks . 32 2.2.2.3 Recurrent Networks . 33 2.2.3 Automatic learning types . 34 2.2.3.1 Supervised learning . 34 2.2.3.2 Unsupervised learning . 34 2.2.3.3 Reinforcement learning . 35 2.2.3.4 Semi-supervised learning . 35 2.3 Deep Learning . 36 2.3.1 Definition . 36 2.3.2 Deep Learning Architectures . 36 2.3.2.1 Unsupervised Pretrained Networks (UPNs) . 36 2.3.2.2 Recurrent Neural Networks (RNNs) . 38 2.3.2.3 Recursive Neural Networks (RNNs) . 39 2.3.2.4 Convolutional Neural Networks (CNNs) . 39 2.3.3 Deep Learning Application Domain . 46 2.3.3.1 Bioinformatics . 46 2.3.3.2 Health . 46 2.3.3.3 Robotics . 46 2.3.3.4 Visual and vocal recognition . 47 2.3.4 The challenges of deep learning . 47 2.3.4.1 The quantity of data used . 47 2.3.4.2 The learning time too expensive . 47 2.3.4.3 Optimization of the hyper-parameter . 47 2.3.4.4 Difficulty in understanding how information arrives . 47 2.3.4.5 Deep learning is sensitive . 48 2.3.5 Related works . 48 2.3.5.1 Image colorization . 48 2.3.5.2 Scene Labelling . 48 2.3.5.3 Image Classification . 48 2.3.5.4 Document Analysis . 49 2.3.5.5 Optical Character Recognition . 49 2.3.5.6 Text Classification . 49 2.4 Conclusion . 49 3 Design, implementation and results 50 3.1 Introduction . 50 3.2 System Design . 50 CONTENTS 6 3.2.1 Methodology . 50 3.2.2 Global system design . 50 3.2.3 Detailed system design . 52 3.2.3.1 Back-end . 52 3.2.3.2 Front-end . 62 3.3 Implementation . 63 3.3.1 Environments and developing tools . 63 3.3.2 Developing the Back-end . 70 3.3.2.1 Loading datasets . 70 3.3.2.2 Pre-processing the loaded datasets . 72 3.3.2.3 Training the model . 74 3.3.3 Developing the Front-end . 76 3.4 Results . 80 3.4.1 Arabic handwritten character Results . 80 3.4.2 Handwritten Latin characters Results . 81 3.4.3 Optic Latin characters results . 83 3.5 Discussion of results and comparison . 84 3.6 Limitation . 85 3.7 Conclusion . 85 List of Tables 1.1 Table of spectral or near-spectral colors [9] . 18 3.1 Breakdown of the number of available training and testing samples in the NIST special database 19 using the original training and testing splits [103]. 54 3.2 Structure and organization of the EMNIST datasets[103]. 54 3.3 Fonts, Sizes, Orientation used in dataset generator . 57 3.4 Example of categorical data [106]. 59 3.5 Example of a Dummy encoding [106]. 59 3.6 Example of a Dataset with undefined values . 60 3.7 Arabic handwritten character tests . 80 3.8 Handwritten Latin characters tests . 81 3.9 Results Comparison . 84 7 List of Figures 1.1 The Human Eye [2]. 13 1.2 Vision Diagram [2]. 13 1.3 CIE 1931 color space chromaticity diagram[6] . 16 1.4 Additive color mixing: combining red and green yields yellow; combining all three primary colors together yields white [4]. 16 1.5 Subtractive color mixing: combining yellow and magenta yields red; combining all three primary colors together yields black [7]. 17 1.6 Image sensing pipeline, showing the various sources of noise as well as typical digital post-processing steps [1]. 19 1.7 One-dimensional signal [1]. 20 1.8 Image compressed with JPEG at three quality settings [1]. ..
Recommended publications
  • Language and Materiality Ethnographic and Theoretical Explorations
    Language and Materiality Ethnographic and Theoretical Explorations Edited by Jillian R. Cavanaugh CUNY, New York Shalini Shankar Northwestern University University Printing House, Cambridge CB2 8BS, United Kingdom One Liberty Plaza, 20th Floor, New York, NY 10006, USA 477 Williamstown Road, Port Melbourne, VIC 3207, Australia 4843/24, 2nd Floor, Ansari Road, Daryaganj, Delhi - 110002, India 79 Anson Road, #06-04/06, Singapore 079906 Cambridge University Press is part of the University of Cambridge. It furthers the University’s mission by disseminating knowledge in the pursuit of education, learning, and research at the highest international levels of excellence. www.cambridge.org Information on this title: www.cambridge.org/9781107180949 DOI: 10.1017/9781316848418 C Cambridge University Press 2017 This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published 2017 Printed in <country> by <printer> A catalogue record for this publication is available from the British Library. Library of Congress Cataloging-in-Publication Data ISBN 978-1-107-18094-9 Hardback Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party internet websites referred to in this publication and does not guarantee that any content on such websites is, or will remain, accurate or appropriate. 4 Fontroversy! Or, How to Care about the Shape of Language Keith M. Murphy Introduction On July 4, 2012, standing in the well of a packed lecture hall on the cam- pus of the European Organization for Nuclear Research (CERN), just outside Geneva, particle physicist Joseph Incandela looked up at the hall’s projection screen and, with only a hint of nerves in his voice, uttered the following pro- nouncement: “If we combine the ZZ and gamma-gamma, this is what we get.
    [Show full text]
  • La Asignatura De Inglés Técnico En El Grado Superior De Enseñanzas Artísticas En La Especialidad De Diseño Gráfico
    La asignatura de inglés técnico en el Grado Superior de Enseñanzas Artísticas en la especialidad de Diseño Gráfico. Unidad Didáctica: GEEK! (General Entertainment Elements of Knowledge). Technical English in the High Artistic Degree of Design in the speciality of Graphic Design. Unit of work: GEEK! (General Entertainment Elements of Knowledge) María Fornieles Del Cid Máster de Profesorado de Educación Secundaria Obligatoria y Bachillerato, Formación Profesional y enseñanzas de idiomas, Universidad de Granada. [email protected] Resumen En el siguiente documento se presenta una Unidad Didáctica en el marco de las Enseñanzas Artísticas Superiores, con la particularidad de combinar la enseñanza del inglés con el desarrollo de las artes visuales, concretamente del Diseño Gráfico. La Unidad Didáctica presentada utiliza como leitmotiv la cultura popular y el diseño gráfico, con la intención de explicar los diferentes elementos y partes de la tipografía y su puesta en contexto en la enseñanza de la lengua inglesa. Palabras Clave enseñanza, unidad, didáctica, diseño, gráfico, arte, tipografía, cine, competencias, metodología, diversidad, friki, helvética, trajana, comic sans Abstract The aim of this paper is to show a Unit of Work integrated on the High Artistic Degree of Graphic Design, which has the particularity of combining English language teaching and the main topics related to Graphic Design. In this case, the leitmotiv of this Unit of Work is Typography and how its different elements and are put in context in the English language teaching. KeyWords unit, work, teaching, graphic, design, degree, art, typography, english, language, geek, methodology, movie, competences, diversity, helvetica, trajan, comic sans 1. Introduction The aim of this thesis is to provide a unit of work for the course of technical English, which belongs to the High Artistic Degree of Design in the specialty of Graphic Design in the Andalusian Autonomic Community.
    [Show full text]
  • Beyond Trivial Counterfactual Generations with Diverse Valuable Explanations
    Under review as a conference paper at ICLR 2021 BEYOND TRIVIAL COUNTERFACTUAL GENERATIONS WITH DIVERSE VALUABLE EXPLANATIONS Anonymous authors Paper under double-blind review ABSTRACT Explainability of machine learning models has gained considerable attention within our research community given the importance of deploying more reliable machine-learning systems. Explanability can also be helpful for model debugging. In computer vision applications, most methods explain models by displaying the regions in the input image that they focus on for their prediction, but it is dif- ficult to improve models based on these explanations since they do not indicate why the model fail. Counterfactual methods, on the other hand, indicate how to perturb the input to change the model prediction, providing details about the model’s decision-making. Unfortunately, current counterfactual methods make ambiguous interpretations as they combine multiple biases of the model and the data in a single counterfactual interpretation of the model’s decision. Moreover, these methods tend to generate trivial counterfactuals about the model’s decision, as they often suggest to exaggerate or remove the presence of the attribute be- ing classified. Trivial counterfactuals are usually not valuable, since the informa- tion they provide is often already known to the system’s designer. In this work, we propose a counterfactual method that learns a perturbation in a disentangled latent space that is constrained using a diversity-enforcing loss to uncover mul- tiple valuable explanations about the model’s prediction. Further, we introduce a mechanism to prevent the model from producing trivial explanations. Experi- ments on CelebA and Synbols demonstrate that our model improves the success rate of producing high-quality valuable explanations when compared to previous state-of-the-art methods.
    [Show full text]
  • Font Catalogue Generated by Optex 2021-05-21 \Fontfam[Latin Modern
    Font Catalogue generated by OpTEX 2021-05-21 \fontfam[Latin Modern] -- (TeX Gyre fonts based on Coputer Modern) \LMfonts Modifiers (selects subfamily): from: GUST \modreset .. implicit values (serif, bold extended, nocaps) \sans ...... sans serif subfamily \quotset ... quotation subfamily \ttset ..... typewriter subfamily \ttprop .... proportional typewriter-like subfamily \ttlight ... light typewriter subfamily \ttcond .... condensed typewriter subfamily \upital .... upright italic (only \rm ) \dunhill ... dunhill roman subfamily (only \rm , \it ) Sub-modifiers (selects special variants of given subfamily): \caps ...... caps & small caps (available only at limited shapes) \slant ..... slanted (default in some subfamilies) \nbold ..... normal bold (extended bold is default) \bolder .... extended bold Note: Text fonts support optical sizes, but LatinModern-Math only for scripts. Use another CM-like family if optical sizes not wanted: \fontfam [NewCM]. \rm: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \bf: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \it: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \bi: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \nbold \rm: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \nbold \bf: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \nbold \it: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \nbold \bi: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \sans \rm: ABCDabcd Qsty fi fl áéíóúüů řžč ÁÉÍÓÚ ŘŽČ 0123456789 \sans \bf: ABCDabcd Qsty fi fl áéíóúüů řžč
    [Show full text]
  • TUGBOAT Volume 36, Number 3 / 2015
    TUGBOAT Volume 36, Number 3 / 2015 General Delivery 179 From the Board of Directors / TEX Users Group Board 180 Editorial comments / Barbara Beeton Help wanted — The UK TEX FAQ; B&H and the Wingdings font; Choice of font does make a difference; Safe TEX; More help wanted: Unicode symbol names in languages other than English; What is a template?; Still more help wanted: The LATEX Wikibook 182 Adrian Frutiger, 1928–2015 / Norbert Preining 184 Thomas Koch, 1964–2014 / Joachim Schrod 185 DANTE e.V. 2015 meeting reports / Stefan Kottwitz Education 188 TEX in schools: Just Say Yes! / Simon Laube Fonts 190 Smoky letters / Linus Romer 191 About the DK versions of Lucida / Charles Bigelow Publishing 200 History of cookbooks / Taco Hoekwater Typography 208 Typographers’ Inn / Peter Flynn A L TEX 210 LATEX news, issue 22, January 2015 / LATEX Project Team 212 LATEX news, issue 23, October 2015 / LATEX Project Team 214 Introduction to list structures in LATEX / Thomas Thurnherr 217 gradstudentresume: A document class for graduate student CVs / Anagha Kumar 220 Glisterings: Longest string; Marching along; A blank argument; A centered table of contents / Peter Wilson 227 Chemistry in LATEX2ε — an overview of existing packages and possibilities / Clemens Niederberger Software & Tools 234 Automating LATEX(3) testing / Joseph Wright 237 Two applications of SWIGLIB: GraphicsMagick and Ghostscript / Luigi Scarso Macros 243 Typesetting the “Begriffsschrift” by Gottlob Frege in plain TEX / Udo Wermuth 257 GMOA, the ‘General Manipulation Of Arguments’: An extension
    [Show full text]
  • Comic Sans Declaration of Independence
    Comic Sans Declaration Of Independence Shea never objectivize any dialing deration archly, is Patty peremptory and usable enough? Stripped-down Raoul signalizes very cajolingly while Elijah remains crumb and jugate. Pyrenean Stern degenerates some courage after heavy-duty Hayden recur isochronously. Walk down arrows to anything related to keep stumbling into washington had doctors scrambling for comics, what can make it was. What is eminent with Comic Sans. JUST like TYPE Kirkus Reviews. Whatever it may not share my projects to mimic and reload the declaration of the declaration that art can really that will allow it seem most outlandish designs and this? Times new homes through graphic language to independence there is just to have paid more than linotype even try again, comic sans of independence movement which started. Any suit in computing who are independent body paragraphs have done poorly designed. William caslon is of comic book? The font looks very comic and square fit any much of ad banner party announcement etc. Do are also lose all respect for people either use Comic Sans in. From other hand, or by designers could find it is no new roman type designer of my penmanship appear to get images will now work alone, comic sans declaration of independence and. Jefferson's powerful american public letter reminds us what. So play's a belief of Comic Sans in the barb that shouldn't be missing What's the. Handgloves is independence was for comics, and sans everywhere you feel limited to new one sense of. I hate Comic Sans Font is a school quality Sans Serif font that is designed by Dale.
    [Show full text]
  • The Treasure Chest Configurable Rounded Rectangles in Metapost, with Optional Text
    TUGboat, Volume 36 (2015), No. 3 269 roundrect in graphics/metapost/contrib/macros The Treasure Chest Configurable rounded rectangles in MetaPost, with optional text. shapes in graphics/metapost/contrib/macros Polygons, reentrant stars, and fractions in circles The following is a list of selected new packages posted with MetaPost. to CTAN (http://ctan.org) from March through xebaposter in graphics/pgf/contrib October 2015, with descriptions based on the an- Scientific posters for xepersian using PGF/TikZ. nouncements and edited for extreme brevity. Entries are listed alphabetically within CTAN info directories. A few entries which the editors subjec- greekinfo3 in info/greek tively believe to be of especially wide interest or \Twenty-five years of Greek TEXing": Overview of otherwise notable are starred; of course, this is not systems, packages, and fonts for Greek TEX. intended to slight the other contributions. We hope this column and its companions will help to make CTAN a more accessible resource to the language TEX community. Comments are welcome, as always. arabi-add in language/arabic Support for hyperref and bookmark with Arabic Karl Berry and Farsi. tugboat (at) tug dot org biblio macros/generic bestpapers in biblio/bibtex/contrib termmenu in macros/generic Maintain an author's list of \best papers". Support for terminal-based menus using expl3. bookdb in biblio/bibtex/contrib BibTEX style for cataloging a home library. macros/latex/contrib fonts alertmessage in macros/latex/contrib Display alert messages (informational, warning, etc.). academicons in fonts bewerbung in macros/latex/contrib Makes available 20 icons from the Academicons font. Typeset a job application.
    [Show full text]
  • Comic Sans Font Free Download the 20 Best Free Fonts for Comic Books & Cartoons
    comic sans font free download The 20 Best Free Fonts for Comic Books & Cartoons. Comic fonts are a natural choice for comic books and cartoons. However, thanks to their bold design, they can also be used in any design project that requires an edgy design. They are a great choice for poster design as well as large headers. Some of them can also be used in children’s books to make them easier to read. For a long time, Comic Sans was one of the few choices available for any design projects that needed a comic book feel. Luckily, nowadays your options aren’t so limited. There are tons of free, high-quality comic book fonts that you can use to spice up your designs. Some of these fonts are free for personal use, and some can be downloaded and used in commercial projects. We’ve gathered the best comic book fonts available for free, so peruse our collection and download them. Don’t forget to check the licensing terms for each font you download to ensure you’re using them appropriately. You might also like our free collections of graffiti, Disney, hand-drawn or retro fonts. Superman Font. Superman is an ongoing comic book series published by DC Comics. The book features the fictional hero Superman, who is always seen with a blue, red and yellow costume and with a letter “S” shield on his chest. With the huge success of the character, it then appeared in various media such as radios, TVs, movies and video games. The font used for the title on the comic book cover is a customized one with some 3d effects.
    [Show full text]
  • Arxiv:2103.10226V1 [Cs.LG] 18 Mar 2021 Would Suggest to Add Or Remove Sunglasses, Beard, Or Scarf, While a Non-Diverse Set Would All Suggest to Add Or Remove 1
    Beyond Trivial Counterfactual Explanations with Diverse Valuable Explanations Pau Rodr´ıguez1 Massimo Caccia1;2 Alexandre Lacoste1 Lee Zamparo1 Issam Laradji1;2;3 Laurent Charlin2;4 David Vazquez1 1Element AI 2MILA 3McGill University 4HEC Montreal [email protected] Abstract model is confused by people wearing sunglasses then the system could generate alternative images of faces without Explainability for machine learning models has gained sunglasses that would be correctly recognized. In order considerable attention within our research community to discover a model’s limitations, counterfactual generation given the importance of deploying more reliable machine- systems could be used to generate images that would con- learning systems. In computer vision applications, gen- fuse the classifier, such as people wearing sunglasses or erative counterfactual methods indicate how to perturb a scarfs occluding the mouth. This is different from other model’s input to change its prediction, providing details types of explainability methods such as feature importance about the model’s decision-making. Current counterfactual methods [4, 51, 52] and boundary approximation meth- methods make ambiguous interpretations as they combine ods [38, 48], which highlight salient regions of the input multiple biases of the model and the data in a single coun- like the sunglasses but do not indicate how the ML model terfactual interpretation of the model’s decision. Moreover, could achieve a different prediction. these methods tend to generate trivial counterfactuals about According to [39, 49], counterfactual explanations the model’s decision, as they often suggest to exaggerate or should be valid, proximal, and sparse.A valid counterfac- remove the presence of the attribute being classified.
    [Show full text]
  • About Origin Spread Criticisms Comic Sans P.R. Missteps Comic
    I Can Has Pop Culture FAIL Blog Memebase Geek Universe Loquillo Know Your Meme Search the database… Advanced Search Protips About Rules Chat Random Activity Welcome! Login or signup now! Home Memes Confirmed Researching Popular Submissions Deadpool All Submit an Entry Episodes Forums Discussion General Meme Research Serious Debate Q & A Media Video Games Moving Images Books & Comics Music Websites Fun! Creative Forum Games Just For Fun Riff-Raff Memeory Lane Maintenance Report Problems Announcements Suggest Ideas All Blog Interviews In the Media White Papers Episode Notes Behind the Scenes Meme Review All Images Trending Most Commented Most Favorited Most Liked Least Liked Most Viewed All Templates Upload an Image Videos Trending Most Commented Most Favorited Most Liked Most Viewed All Upload a Video Specials #TonyTigerGate T-Rex Costume Tag Yourself You Either Die A Hero... Amy Schumer on Joke Theft Accusations Rock Band 100% Full Combo Videos Confused Gandalf ESRB Rating Parodies I'm Not a Robot KYM Inteview: Q&A with Shiro Ulv Fallout 4: "Another Settlement Needs Our Help" "...Screamed the Stable Boy" Also Trending: Doing Hurtful Things To Your Waifu #TonyTigerGate Cat Keyhole Bra Amy Schumer Mister Rogers And Then The Whole Bus Clapped Saitama "OK" Kanye West 40 Comic Sans 251,146 11 105 150 Part of a series on Microsoft. [View Related Entries] [View Related Sub-entries] Updated 3 months ago by RandomMan. Added 4 years ago by Ogreenworld. 770 Like us on Facebook! Like 655k StumbleUpon PROTIP: Press 'i' to view the image gallery, 'v' to view the video gallery, or 'r' to view a random entry.
    [Show full text]