Skip to main content

Bangla Languge Recognizer Toolkit

Project description

apsis-net

Apsis-net is a Bengali language ocr system for Printed Documents developed at Apsis Solutions limited

The full system is focused on bengali text recognition only

  • Text recognition:
    • Bangla Text : ApsisNet
      • ApsisNet is a model developed at Apsis Solutions Limited.
      • It is used by bbOCR as the recognition model
      • ApsisNet is found to be the best among other available recognition models (such as tesseract and easyOCR) in the linked paper

Installation

As module/pypi package

cpu installation

pip install apsisnet

gpu installation

It is recommended to use conda environment . Specially for GPU.

  • installing cudatoolkit and cudnn:
conda install cudatoolkit
conda install cudnn
  • installing packages
pip install apsisnet
  • exporting environment variables
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'export LD_LIBRARY_PATH=$CUDNN_PATH/lib:$CONDA_PREFIX/lib/:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh

Building from source : Linux/Ubuntu

It is recommended to use conda environment .

  • clone the repository :
git clone https://github.com/mnansary/apsisnet.git
cd apsisnet
  • create a conda environment:
conda create -n apsisnet python=3.9
  • activate conda environment:
conda activate apsisnet
  • cpu installation :
bash install.sh cpu
  • gpu installation :
bash install.sh gpu

Useage

Apsisnet : Bangla Recognizer

  • useage
from apsisnet import ApsisNet
bnocr=ApsisNet()
bnocr.infer(crops)
  • docstring for ApsisNet.infer
"""
Perform inference on image crops.

Args:
    crops (list[np.ndarray]): List of image crops.
    batch_size (int): Batch size for inference (default: 32).
    normalize_unicode (bool): Flag to normalize unicode (default: True).

Returns:
    list[str]: List of inferred texts.
"""

check useage/useage.ipynb for examples

TESTED GPU INFERENCE SERVER CONFIG

OS          : Ubuntu 20.04.6 LTS      
Memory      : 62.4 GiB 
Processor   : Intel® Xeon(R) Silver 4214R CPU @ 2.40GHz × 24    
Graphics    : NVIDIA RTX A6000/PCIe/SSE2
Gnome       : 3.36.8

License

Contents of this repository are restricted to non-commercial research purposes only under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).

Creative Commons License

25-04-2024

  • changed onnxruntime-gpu version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apsisnet-0.0.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

apsisnet-0.0.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file apsisnet-0.0.2.tar.gz.

File metadata

  • Download URL: apsisnet-0.0.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for apsisnet-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0b476c6dbf555d3cc540cce35d264c85dc742edb40b129723d37c711a01646ba
MD5 2646c11c8dfc1cd6bde1dfb551aa8614
BLAKE2b-256 ded455b17374f252f419bd08b84d9804a4f69849f617a00c12abc0fdbb251912

See more details on using hashes here.

File details

Details for the file apsisnet-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: apsisnet-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for apsisnet-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 30563da28b980bf96adc942d4b023bcab235b393a952cae5876edf7dc01d779b
MD5 ba0d183ab045a27b92caeca43b1d6510
BLAKE2b-256 e72d5a9253c38063e8462f184ab7d8ce92b1b355d06735aff49f09856fb81a8a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page