mxtsdev / d4-item-tooltip-ocr Goto Github PK
View Code? Open in Web Editor NEWDiablo IV: Item Tooltip OCR
License: MIT License
Diablo IV: Item Tooltip OCR
License: MIT License
Script works great. I can imagine non-ingame related use-cases, ie writing articles, discord bot etc.
Unfortunately it's quite slow which renders it unusable for non-bot ingame purposes, ie checking if gear has desired affixes when playing "manually".
Tested it briefly and got:
7.3s with find-tooltip True
16.75s with find-tooltip False
Nice work either way.
Installed, wanted to try and got this:
======================================
Diablo IV: Item Tooltip OCR
======================================
Traceback (most recent call last):
File "d4-item-tooltip-ocr.py", line 479, in <module>
jsonstr = it_ocr.processImage(opt.source_img, opt.find_tooltip, debug=False)
File "d4-item-tooltip-ocr.py", line 183, in processImage
ocr = PaddleOCR(use_angle_cls=False, lang='en', show_log=False, det_db_unclip_ratio=2.0, rec_model_dir='paddleocr-models/en_PP-OCRv3_rec-d4_tooltip')
File "C:\Users\myUserName\AppData\Roaming\Python\Python38\site-packages\paddleocr\paddleocr.py", line 523, in __init__
super().__init__(params)
File "C:\Users\myUserName\AppData\Roaming\Python\Python38\site-packages\paddleocr\tools\infer\predict_system.py", line 46, in __init__
self.text_detector = predict_det.TextDetector(args)
File "C:\Users\myUserName\AppData\Roaming\Python\Python38\site-packages\paddleocr\tools\infer\predict_det.py", line 141, in __init__
self.predictor, self.input_tensor, self.output_tensors, self.config = utility.create_predictor(
File "C:\Users\myUserName\AppData\Roaming\Python\Python38\site-packages\paddleocr\tools\infer\utility.py", line 277, in create_predictor
predictor = inference.create_predictor(config)
RuntimeError: (NotFound) Cannot open file C:\Users\myUserName/.paddleocr/whl\det\en\en_PP-OCRv3_det_infer/inference.pdmodel, please confirm whether the file is normal.
[Hint: Expected static_cast<bool>(fin.is_open()) == true, but received static_cast<bool>(fin.is_open()):0 != true:1.] (at ..\paddle\fluid\inference\api\analysis_predictor.cc:2364)
I noticed you have included the models under /en_PP-OCRv3_rec-d4_tooltip
however when I first run the script, it downloads the models anyways:
download https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar to C:\Users\myUserName/.paddleocr/whl\det\en\en_PP-OCRv3_det_infer\en_PP-OCRv3_det_infer.tar
100%|█████████████████████████████████████████████████████████████████████████████| 4.00M/4.00M [00:08<00:00, 447kiB/s]
download https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar to C:\Users\myUserName/.paddleocr/whl\cls\ch_ppocr_mobile_v2.0_cls_infer\ch_ppocr_mobile_v2.0_cls_infer.tar
100%|█████████████████████████████████████████████████████████████████████████████| 2.19M/2.19M [00:11<00:00, 185kiB/s]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.