apsisnet


Nameapsisnet JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/mnansary/apsisnet.git
SummaryBangla Languge Recognizer Toolkit
upload_time2024-04-24 19:42:57
maintainerNone
docs_urlNone
authorNazmuddoha Ansary
requires_pythonNone
licenseMIT
keywords ocr scene ocr apsisnet
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # apsis-net
![](/useage/apsis.png) 

Apsis-net is a Bengali language ocr system for Printed Documents developed at [Apsis Solutions limited](https://apsissolutions.com/)

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](https://github.com/BengaliAI/bbocr/blob/dev/modules.md) 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](https://arxiv.org/abs/2308.10647)


# **Installation**


## **As module/pypi package**
### **cpu installation**

```bash
pip install apsisnet
```

### **gpu installation**

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

* **installing cudatoolkit and cudnn**: 

```bash
conda install cudatoolkit
conda install cudnn
```

* **installing packages**

```bash
pip install apsisnet
```

* **exporting environment variables**

```bash
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** : 
```bash
git clone https://github.com/mnansary/apsisnet.git
cd apsisnet
```


* **create a conda environment**: 

```bash
conda create -n apsisnet python=3.9
```

* **activate conda environment**: 

```bash
conda activate apsisnet

```
* **cpu installation**  :

```bash
bash install.sh cpu
``` 
* **gpu installation**  :
    
```bash
bash install.sh gpu
``` 

# Useage


## Apsisnet : Bangla Recognizer

* useage
```python
from apsisnet import ApsisNet
bnocr=ApsisNet()
bnocr.infer(crops)
```
* docstring for ```ApsisNet.infer```

```python
"""
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**  

```python
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)](https://creativecommons.org/licenses/by-nc-sa/4.0/). 

<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>



25-04-2024
----------------
* changed onnxruntime-gpu version

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mnansary/apsisnet.git",
    "name": "apsisnet",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ocr, scene ocr, apsisnet",
    "author": "Nazmuddoha Ansary",
    "author_email": "nazmuddoha.ansary@apsissolutions.com",
    "download_url": "https://files.pythonhosted.org/packages/de/d4/55b17374f252f419bd08b84d9804a4f69849f617a00c12abc0fdbb251912/apsisnet-0.0.2.tar.gz",
    "platform": null,
    "description": "# apsis-net\n![](/useage/apsis.png) \n\nApsis-net is a Bengali language ocr system for Printed Documents developed at [Apsis Solutions limited](https://apsissolutions.com/)\n\nThe full system is focused on bengali text recognition only \n* Text recognition:\n    * Bangla Text : ApsisNet \n        * ApsisNet is a model developed at Apsis Solutions Limited. \n        * It is used by [bbOCR](https://github.com/BengaliAI/bbocr/blob/dev/modules.md) as the recognition model \n        * ApsisNet is found to be the best among other available recognition models (such as tesseract and easyOCR) in the linked [paper](https://arxiv.org/abs/2308.10647)\n\n\n# **Installation**\n\n\n## **As module/pypi package**\n### **cpu installation**\n\n```bash\npip install apsisnet\n```\n\n### **gpu installation**\n\nIt is recommended to use conda environment . Specially for GPU.\n\n* **installing cudatoolkit and cudnn**: \n\n```bash\nconda install cudatoolkit\nconda install cudnn\n```\n\n* **installing packages**\n\n```bash\npip install apsisnet\n```\n\n* **exporting environment variables**\n\n```bash\nmkdir -p $CONDA_PREFIX/etc/conda/activate.d\necho 'export LD_LIBRARY_PATH=$CUDNN_PATH/lib:$CONDA_PREFIX/lib/:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh\n```\n\n## **Building from source : Linux/Ubuntu**\nIt is recommended to use conda environment .\n\n* **clone the repository** : \n```bash\ngit clone https://github.com/mnansary/apsisnet.git\ncd apsisnet\n```\n\n\n* **create a conda environment**: \n\n```bash\nconda create -n apsisnet python=3.9\n```\n\n* **activate conda environment**: \n\n```bash\nconda activate apsisnet\n\n```\n* **cpu installation**  :\n\n```bash\nbash install.sh cpu\n``` \n* **gpu installation**  :\n    \n```bash\nbash install.sh gpu\n``` \n\n# Useage\n\n\n## Apsisnet : Bangla Recognizer\n\n* useage\n```python\nfrom apsisnet import ApsisNet\nbnocr=ApsisNet()\nbnocr.infer(crops)\n```\n* docstring for ```ApsisNet.infer```\n\n```python\n\"\"\"\nPerform inference on image crops.\n\nArgs:\n    crops (list[np.ndarray]): List of image crops.\n    batch_size (int): Batch size for inference (default: 32).\n    normalize_unicode (bool): Flag to normalize unicode (default: True).\n\nReturns:\n    list[str]: List of inferred texts.\n\"\"\"\n```\n\n\n**check ```useage/useage.ipynb``` for examples**\n\n\n**TESTED GPU INFERENCE SERVER CONFIG**  \n\n```python\nOS          : Ubuntu 20.04.6 LTS      \nMemory      : 62.4\u00a0GiB \nProcessor   : Intel\u00ae Xeon(R) Silver 4214R CPU @ 2.40GHz \u00d7 24    \nGraphics    : NVIDIA RTX A6000/PCIe/SSE2\nGnome       : 3.36.8\n```\n# License\nContents 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)](https://creativecommons.org/licenses/by-nc-sa/4.0/). \n\n<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png\" /></a>\n\n\n\n25-04-2024\n----------------\n* changed onnxruntime-gpu version\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Bangla Languge Recognizer Toolkit",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/mnansary/apsisnet.git"
    },
    "split_keywords": [
        "ocr",
        " scene ocr",
        " apsisnet"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e72d5a9253c38063e8462f184ab7d8ce92b1b355d06735aff49f09856fb81a8a",
                "md5": "ba0d183ab045a27b92caeca43b1d6510",
                "sha256": "30563da28b980bf96adc942d4b023bcab235b393a952cae5876edf7dc01d779b"
            },
            "downloads": -1,
            "filename": "apsisnet-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ba0d183ab045a27b92caeca43b1d6510",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7058,
            "upload_time": "2024-04-24T19:42:55",
            "upload_time_iso_8601": "2024-04-24T19:42:55.117199Z",
            "url": "https://files.pythonhosted.org/packages/e7/2d/5a9253c38063e8462f184ab7d8ce92b1b355d06735aff49f09856fb81a8a/apsisnet-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ded455b17374f252f419bd08b84d9804a4f69849f617a00c12abc0fdbb251912",
                "md5": "2646c11c8dfc1cd6bde1dfb551aa8614",
                "sha256": "0b476c6dbf555d3cc540cce35d264c85dc742edb40b129723d37c711a01646ba"
            },
            "downloads": -1,
            "filename": "apsisnet-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2646c11c8dfc1cd6bde1dfb551aa8614",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6760,
            "upload_time": "2024-04-24T19:42:57",
            "upload_time_iso_8601": "2024-04-24T19:42:57.280735Z",
            "url": "https://files.pythonhosted.org/packages/de/d4/55b17374f252f419bd08b84d9804a4f69849f617a00c12abc0fdbb251912/apsisnet-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 19:42:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mnansary",
    "github_project": "apsisnet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "apsisnet"
}
        
Elapsed time: 0.24540s