keras-ocr | A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model | Computer Vision library

 by   faustomorales Python Version: 0.9.3 License: MIT

kandi X-RAY | keras-ocr Summary

kandi X-RAY | keras-ocr Summary

keras-ocr is a Python library typically used in Artificial Intelligence, Computer Vision, Deep Learning, Keras applications. keras-ocr has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. However keras-ocr build file is not available. You can install using 'pip install keras-ocr' or download it from GitHub, PyPI.

A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              keras-ocr has a medium active ecosystem.
              It has 1192 star(s) with 308 fork(s). There are 48 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 83 open issues and 111 have been closed. On average issues are closed in 26 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of keras-ocr is 0.9.3

            kandi-Quality Quality

              keras-ocr has 0 bugs and 0 code smells.

            kandi-Security Security

              keras-ocr has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              keras-ocr code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              keras-ocr is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              keras-ocr releases are available to install and integrate.
              Deployable package is available in PyPI.
              keras-ocr has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 3917 lines of code, 148 functions and 21 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed keras-ocr and discovered the below as its top functions. This is intended to give you an instant insight into keras-ocr implemented functionality, and help decide if they suit your requirements.
            • Build a Keras model
            • A function for creating a CTC decoder
            • Return an image generator
            • Draw a text image
            • Read an image from file
            • Strip whitespace from a line
            • Strip whitespace from a list of lines
            • Transform a tensorflow tensor
            • Create a meshgrid grid
            • Repeat a tensor
            • Compute the similarity between two images
            • Returns a Dataset
            • Build a keras model
            • Generates an image generator for the given labels
            • Returns a Datasupervised dataset
            • Returns a list of BornDigitalDigital Recognizer Dataset
            • Download font files
            • Recognize images
            • Detects the given images
            • Create an image generator
            • Create a batch of images from an image generator
            • Detects boxes within images
            • Draws predictions on an image
            • Convert an image generator to a generator
            • Download the backgrounds
            • Recognize an image
            • Read image content from filepath
            • Returns a dataset containing the ICar recognition dataset
            Get all kandi verified functions for this library.

            keras-ocr Key Features

            No Key Features are available at this moment for keras-ocr.

            keras-ocr Examples and Code Snippets

            Demo:
            Pythondot img1Lines of Code : 13dot img1License : Permissive (Apache-2.0)
            copy iconCopy
            
             python demo_video.py --input "Input_video_path" --output "Path_to_save_result" --size "frame_size"
             
             #Example
             python demo_video.py --input inputs/demo1.mp4 --output results/output1.avi --size 608 
            #Run demo on sample image with default arguments
              
            Keras ocr with mnist dataset,Develop locally
            Pythondot img2Lines of Code : 5dot img2no licencesLicense : No License
            copy iconCopy
              $ conda create --name my_snakes_env python=3  #(or 2)
              $ source activate my_snakes_env
              $ pip install -r requirements.txt
              $ pip install -r conda-requirements.txt
              $ deactivate # Stop virtualenv when you are done
              
            Benchmarks
            Jupyter Notebookdot img3Lines of Code : 1dot img3License : Permissive (Apache-2.0)
            copy iconCopy
                                                   All the above benchmarks are w.r.t Redmi K20 Pro using 4threads.
              
            Rearranging License Plate characters based on country
            Pythondot img4Lines of Code : 36dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            data = [
              ('hrlz', [[ 68.343796,  42.088367],
                        [196.68803 ,  26.907867],
                        [203.00832 ,  80.343094],
                        [ 74.66408 ,  95.5236  ]]), 
              ('c1044',[[ 50.215836, 113.09602 ],
                        [217.72466 ,  92.58473 ],
            Deep Learning solution for digit recognition on natural scene
            Pythondot img5Lines of Code : 11dot img5License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            import easyocr
            reader = easyocr.Reader(['en']) # need to run only once to load model into memory
            reader.readtext(path_to_file, allowlist='0123456789')
            
            img = cv2.imread(fileName)
            gray = cv2.cvtColor(img, cv2.COLOR_B
            passing string values as labels for convolutional neural networks
            Pythondot img6Lines of Code : 7dot img6License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            [0,1,0,0,0,0,0,0,0,0,
             0,0,1,0,0,0,0,0,0,0,
             0,0,0,1,0,0,0,0,0,0,
             0,0,0,0,1,0,0,0,0,0,
             0,0,0,0,1,0,0,0,0,0,
             0,0,0,0,1,0,0,0,0,0]
            
            Negative labels withh keras ocr example
            Pythondot img7Lines of Code : 4dot img7License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            y_length[i] = len(y[i])
            
            y_length[i] = len(seq)
            
            How can I use the Keras OCR example?
            Pythondot img8Lines of Code : 23dot img8License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            Model(inputs=input_data, outputs=y_pred).summary()
            
            from scipy.misc import imread, imresize
            #use width and height from your neural network here.
            
            def load_for_nn(img_file):
                image = imread(img_file, flatten=True)
            How to predict the results for OCR using keras image_ocr example?
            Pythondot img9Lines of Code : 12dot img9License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            model.fit(X_training_data,Y_training_data,...)
            
            model.evaluate(X_test, y_test, verbose=0)
            
            model.save('my_nn.hdf5')
            
            testing_df = pd.read_csv('data/optdigits/optdigits

            Community Discussions

            QUESTION

            Issues in Keras-Ocr Running in GCP VM Notebook
            Asked 2022-Feb-03 at 19:33

            Im running Keras-OCR implementation from the following repository in the Notebook created in GCP VM

            https://github.com/faustomorales/keras-ocr

            The call to prediction_groups = pipeline.recognize(images) kills the Kernel. The error about Kernel has died is thrown.

            The GCP VM is : Version: common-cu113.m87 Based on: Debian GNU/Linux 10 (buster) (GNU/Linux 4.19.0-18-cloud-amd64 x86_64\n)

            Can you suggest on how it that to fix this issue?

            ...

            ANSWER

            Answered 2022-Feb-03 at 19:33

            The issue was with opencv version. I had latest version which is 5.5.5. It worked when downgraded the version to 4.4

            Source https://stackoverflow.com/questions/70968945

            QUESTION

            Keras_ocr - Failed to recognize_from_boxes
            Asked 2021-Sep-29 at 20:06

            I am working with the keras_ocr recognizer and I want it to scan only inside the bounding boxes which I already selected. The API supports this kind of opperation with recognize_from_boxes Just so you know: keras_ocr documentation.

            ...

            ANSWER

            Answered 2021-Sep-29 at 20:06

            In API documentation it mentions that box_groups should be A list of groups of boxes, one for each image which means it assumes there might be many boxes in a single image but your input is only a list on boxes. If you have only one box per image then you can do it this way -

            Source https://stackoverflow.com/questions/69382202

            QUESTION

            Rearranging License Plate characters based on country
            Asked 2021-Aug-12 at 21:00

            I am doing a License/Number plate recognition project and I'm on the stage of completion but there is a small problem, I have successfully recognized the characters, consider the below example:

            This is an input image, I got the prediction as 2791 2g rj14

            As you can, the ocr did a great job but the arrangement is destroyed (DESTROYING the whole purpose). Sometimes it does outputs in the correct sequence but sometimes it does not, so when it does not output in the correct sequence I'm trying to develop an algorithm which will take the predicted num_plate string as input and rearrange it on the basis of my country (India).

            Below are some images which tell us about the format of Indian Number/License Plate.

            Also, I have collected all the states but for right now, I just want to do for only the 3 states which are: Delhi (DL), Haryana (HR), UttarPradesh (UP). More info : https://en.wikipedia.org/wiki/List_of_Regional_Transport_Office_districts_in_India

            ...

            ANSWER

            Answered 2021-Aug-12 at 21:00

            If you can get the coordinates of each identified text box, then:

            • Rotate the coordinates so the boxes are parallel with the X-axis
            • Scale the Y-coordinates so they can be rounded to integers, so that boxes that are side-by-side will get the same integer Y-coordinate (like a line number)
            • Sort the data by Y, then X coordinate
            • Extract the texts in that order

            Here is an example of such sequence:

            Source https://stackoverflow.com/questions/68757237

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install keras-ocr

            keras-ocr supports Python >= 3.6 and TensorFlow >= 2.0.0.

            Support

            To work on the project, start by doing the following. These instructions probably do not yet work for Windows but if a Windows user has some ideas for how to fix that it would be greatly appreciated (I don't have a Windows machine to test on at the moment). To implement new features, please first file an issue proposing your change for discussion. To report problems, please file an issue with sample code, expected results, actual results, and a complete traceback.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install keras-ocr

          • CLONE
          • HTTPS

            https://github.com/faustomorales/keras-ocr.git

          • CLI

            gh repo clone faustomorales/keras-ocr

          • sshUrl

            git@github.com:faustomorales/keras-ocr.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Reuse Pre-built Kits with keras-ocr

            Consider Popular Computer Vision Libraries

            opencv

            by opencv

            tesseract

            by tesseract-ocr

            face_recognition

            by ageitgey

            tesseract.js

            by naptha

            Detectron

            by facebookresearch

            Try Top Libraries by faustomorales

            vit-keras

            by faustomoralesPython

            keras-facenet

            by faustomoralesPython

            pdqhash-python

            by faustomoralesPython

            qsl

            by faustomoralesTypeScript

            retinanetjs

            by faustomoralesTypeScript