-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 03110c8
Showing
12 changed files
with
1,649 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
WoW Screenshot OCR | ||
============== | ||
|
||
Deep learning OCR models to read text from WoW screenshots. Based on a detector that spots text frames from screenshots, and a recognizer that reads text from detected frames. | ||
|
||
- Chat | ||
- Combat log | ||
- Nameplates | ||
- UI frames | ||
- Map | ||
|
||
Usage | ||
---- | ||
|
||
Models will use pre trained weights, you don't have to train anything | ||
|
||
``` | ||
import wow_ocr | ||
# Init pipeline, detector and recognizer models with pre trained weights | ||
pipeline = wow_ocr.pipeline.Pipeline() | ||
# Screenshots example | ||
images = [ | ||
wow_ocr.tools.read(url) | ||
for url in [ | ||
"https://image_url.com/1.jpg", | ||
"https://image_url.com/2.jpg", | ||
] | ||
] | ||
# Results - Image to Text | ||
prediction_groups = pipeline.recognize(images) | ||
# # Each list of predictions in prediction_groups is a list of | ||
# # (word, box) tuples. | ||
``` | ||
|
||
![](p1.webp) | ||
![](p2.webp) | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "wow-ocr" | ||
version = "0.0.0" | ||
description = "A packaged OCR model to read texts into WoW screenshots" | ||
readme = "README.md" | ||
authors = [{ name = "Geo", email = "[email protected]" }] | ||
license = { file = "LICENSE" } | ||
classifiers = [ | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
] | ||
keywords = ["ocr", "wow", "screenshot"] | ||
dependencies = [ | ||
"validators", | ||
"essential_generators", | ||
"tqdm", | ||
"imgaug", | ||
"fonttools", | ||
"editdistance", | ||
"pyclipper", | ||
"shapely", | ||
"efficientnet", | ||
"tensorflow", | ||
] | ||
requires-python = ">=3.9" | ||
|
||
[project.optional-dependencies] | ||
dev = ["black", "pip-tools", "pytest", "types-requests", "types-pkg-resources"] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/geo-tp/wow-ocr" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
# Config for projects that do not yet support pyproject.toml (PEP-518) | ||
# https://www.python.org/dev/peps/pep-0518/ | ||
|
||
# mypy: https://github.com/python/mypy/issues/5205 | ||
[mypy] | ||
ignore_missing_imports = True | ||
check_untyped_defs = True | ||
ha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from . import detector, recognizer, tools, pipeline | ||
|
||
__version__ = "0.0.0" |
Oops, something went wrong.