to build locally after cloning
```shell
pip install comics-ocr[cuda] -f https://download.pytorch.org/whl/torch_stable.html
or
pip install comics-ocr[cpu]
```
You can get the necessary model checkpoints and configs from
[COMICS TEXT+](https://github.com/gsoykan/comics_text_plus) repository.
## Usage
```python
# Import library
from comics_ocr import ComicsOCR
# initalize the model
e2e_ocr_model = ComicsOCR(
ocr_detector_config="fcenet_r50dcnv2_fpn_1500e_ctw1500_custom/fcenet_r50dcnv2_fpn_1500e_ctw1500_custom.py",
ocr_detector_checkpoint='fcenet_r50dcnv2_fpn_1500e_ctw1500_custom/best_0_hmean-iou:hmean_epoch_5.pth',
recog_config='master_custom_dataset.py',
ocr_recognition_checkpoint='best_0_1-N.E.D_epoch_4.pth',
det='FCE_CTW_DCNv2',
recog='MASTER')
# Run the model
img_path = "speech_bubble/0/3/9.jpg"
text, preprocessed_text, sanitized_text = e2e_ocr_model.extract_text(img_path)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/gsoykan/comics_ocr",
"name": "comics-ocr",
"maintainer": "",
"docs_url": null,
"requires_python": "<4,>=3.8",
"maintainer_email": "",
"keywords": "comics_ocr,mmocr_comics",
"author": "G\u00fcrkan Soykan",
"author_email": "grkansoykan@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/84/4d/45f6fa91a5bf69f7f6101a753d87935cf75b32502106ea4dedd89c27be1e/comics_ocr-0.1.2.tar.gz",
"platform": null,
"description": "to build locally after cloning\n\n```shell\npip install comics-ocr[cuda] -f https://download.pytorch.org/whl/torch_stable.html\n\nor \n\npip install comics-ocr[cpu]\n```\n\nYou can get the necessary model checkpoints and configs from\n[COMICS TEXT+](https://github.com/gsoykan/comics_text_plus) repository.\n\n## Usage\n\n```python\n# Import library\nfrom comics_ocr import ComicsOCR\n\n# initalize the model\ne2e_ocr_model = ComicsOCR(\n ocr_detector_config=\"fcenet_r50dcnv2_fpn_1500e_ctw1500_custom/fcenet_r50dcnv2_fpn_1500e_ctw1500_custom.py\",\n ocr_detector_checkpoint='fcenet_r50dcnv2_fpn_1500e_ctw1500_custom/best_0_hmean-iou:hmean_epoch_5.pth',\n recog_config='master_custom_dataset.py',\n ocr_recognition_checkpoint='best_0_1-N.E.D_epoch_4.pth',\n det='FCE_CTW_DCNv2',\n recog='MASTER')\n\n# Run the model\nimg_path = \"speech_bubble/0/3/9.jpg\"\ntext, preprocessed_text, sanitized_text = e2e_ocr_model.extract_text(img_path)\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "ComicsOCR is a Python package created for easily distributing OCR models trained for golden age of comics.",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/gsoykan/comics_ocr"
},
"split_keywords": [
"comics_ocr",
"mmocr_comics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "feb4e1ef2299e295941d903a1cfbd3fb0a5f6a40d96daed22d8cec0f51af2ac6",
"md5": "9cbdbf6106e8b0dab2a01067d94d815b",
"sha256": "cfd8c1a931265a4b69199de7f25b803608ee015f1259656a1c09331626c1987a"
},
"downloads": -1,
"filename": "comics_ocr-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9cbdbf6106e8b0dab2a01067d94d815b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.8",
"size": 931232,
"upload_time": "2023-07-10T18:22:26",
"upload_time_iso_8601": "2023-07-10T18:22:26.675992Z",
"url": "https://files.pythonhosted.org/packages/fe/b4/e1ef2299e295941d903a1cfbd3fb0a5f6a40d96daed22d8cec0f51af2ac6/comics_ocr-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "844d45f6fa91a5bf69f7f6101a753d87935cf75b32502106ea4dedd89c27be1e",
"md5": "94513c0ad86fba4c969e15c34f240552",
"sha256": "d99d301fb2e8d2c50caff2c0f24113bbff1110b8ad7d214a556c6357ca9fc6eb"
},
"downloads": -1,
"filename": "comics_ocr-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "94513c0ad86fba4c969e15c34f240552",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.8",
"size": 204171,
"upload_time": "2023-07-10T18:22:33",
"upload_time_iso_8601": "2023-07-10T18:22:33.263768Z",
"url": "https://files.pythonhosted.org/packages/84/4d/45f6fa91a5bf69f7f6101a753d87935cf75b32502106ea4dedd89c27be1e/comics_ocr-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-10 18:22:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gsoykan",
"github_project": "comics_ocr",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "imgaug",
"specs": [
[
"==",
"0.4.0"
]
]
},
{
"name": "lanms",
"specs": [
[
"==",
"1.0.2"
]
]
},
{
"name": "lanms_neo",
"specs": [
[
"==",
"1.0.2"
]
]
},
{
"name": "lmdb",
"specs": [
[
"==",
"1.2.1"
]
]
},
{
"name": "matplotlib",
"specs": [
[
"==",
"3.5.2"
]
]
},
{
"name": "mmcv-full",
"specs": [
[
"==",
"1.5.0"
]
]
},
{
"name": "mmdet",
"specs": [
[
"==",
"2.21.0"
]
]
},
{
"name": "nlpretext",
"specs": [
[
"==",
"1.2.1"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"1.10.11"
]
]
},
{
"name": "spacy",
"specs": [
[
"==",
"3.6.0"
]
]
},
{
"name": "nltk",
"specs": [
[
"==",
"3.5"
]
]
},
{
"name": "numpy",
"specs": [
[
"<",
"1.22.3"
],
[
">=",
"1.21.6"
]
]
},
{
"name": "onnxruntime",
"specs": [
[
"==",
"1.15.1"
]
]
},
{
"name": "opencv_contrib_python",
"specs": [
[
"==",
"4.5.4.60"
]
]
},
{
"name": "opencv_python",
"specs": [
[
"==",
"4.6.0.66"
]
]
},
{
"name": "opencv_python_headless",
"specs": [
[
"==",
"4.5.4.60"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"21.3"
]
]
},
{
"name": "Pillow",
"specs": [
[
"==",
"10.0.0"
]
]
},
{
"name": "pyclipper",
"specs": [
[
"==",
"1.3.0"
]
]
},
{
"name": "rapidfuzz",
"specs": [
[
"==",
"1.8.3"
]
]
},
{
"name": "scikit_image",
"specs": [
[
"==",
"0.18.3"
]
]
},
{
"name": "Shapely",
"specs": [
[
"==",
"1.8.0"
]
]
},
{
"name": "torchvision",
"specs": [
[
"==",
"0.10.0"
]
]
},
{
"name": "torch",
"specs": [
[
"==",
"1.9.0"
]
]
}
],
"lcname": "comics-ocr"
}