GithubHelp home page GithubHelp logo

d4-item-tooltip-ocr's People

Contributors

mxtsdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

d4-item-tooltip-ocr's Issues

Awesome, but slow

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.

RuntimeError: (NotFound) Cannot open file C:\.../inference.pdmodel

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]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.