setup
This commit is contained in:
1
MANIFEST.in
Normal file
1
MANIFEST.in
Normal file
@@ -0,0 +1 @@
|
|||||||
|
include manga_ocr/assets/*.jpg
|
||||||
15
README.md
15
README.md
@@ -1,3 +1,18 @@
|
|||||||
|
OCR for Japanese manga
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
You need Python 3.6+.
|
||||||
|
|
||||||
|
If you want to run with GPU, install PyTorch as described [here](https://pytorch.org/get-started/locally/#start-locally),
|
||||||
|
otherwise this step can be skipped.
|
||||||
|
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```
|
||||||
|
pip install manga-ocr
|
||||||
|
```
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|||||||
BIN
assets/crop.png
BIN
assets/crop.png
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB |
@@ -1 +1,3 @@
|
|||||||
|
__version__ = '0.1.1'
|
||||||
|
|
||||||
from manga_ocr.ocr import MangaOcr
|
from manga_ocr.ocr import MangaOcr
|
||||||
|
|||||||
@@ -92,5 +92,9 @@ def run(
|
|||||||
time.sleep(delay_secs)
|
time.sleep(delay_secs)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
fire.Fire(run)
|
fire.Fire(run)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
BIN
manga_ocr/assets/example.jpg
Normal file
BIN
manga_ocr/assets/example.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
@@ -21,7 +21,7 @@ class MangaOcr:
|
|||||||
else:
|
else:
|
||||||
logger.info('Using CPU')
|
logger.info('Using CPU')
|
||||||
|
|
||||||
self(Path(__file__).parent.parent / 'assets/crop.png')
|
self(Path(__file__).parent / 'assets/example.jpg')
|
||||||
|
|
||||||
logger.info('OCR ready')
|
logger.info('OCR ready')
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
fire
|
fire
|
||||||
|
fugashi
|
||||||
jaconv
|
jaconv
|
||||||
loguru
|
loguru
|
||||||
numpy
|
numpy
|
||||||
Pillow
|
Pillow
|
||||||
pyperclip
|
pyperclip
|
||||||
torch
|
torch>=1.0
|
||||||
transformers>=4.12.5
|
transformers>=4.12.5
|
||||||
|
unidic_lite
|
||||||
|
|||||||
38
setup.py
Normal file
38
setup.py
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
long_description = (Path(__file__).parent / "README.md").read_text().split('# Installation')[0]
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="manga-ocr",
|
||||||
|
version='0.1.1',
|
||||||
|
description="OCR for Japanese manga",
|
||||||
|
long_description=long_description,
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
url="https://github.com/kha-white/manga_ocr",
|
||||||
|
author="Maciej Budyś",
|
||||||
|
author_email="kha-white@mail.com",
|
||||||
|
license="Apache License 2.0",
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
],
|
||||||
|
packages=['manga_ocr'],
|
||||||
|
include_package_data=True,
|
||||||
|
install_requires=[
|
||||||
|
"fire",
|
||||||
|
"fugashi",
|
||||||
|
"jaconv",
|
||||||
|
"loguru",
|
||||||
|
"numpy",
|
||||||
|
"Pillow",
|
||||||
|
"pyperclip",
|
||||||
|
"torch>=1.0",
|
||||||
|
"transformers>=4.12.5",
|
||||||
|
"unidic_lite",
|
||||||
|
],
|
||||||
|
entry_points={
|
||||||
|
"console_scripts": [
|
||||||
|
"manga_ocr=manga_ocr.__main__:main",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user