GithubHelp home page GithubHelp logo

Comments (11)

zyddnys avatar zyddnys commented on May 14, 2024

Can you share the image you are translating so I can reproduce this error?

from manga-image-translator.

MaksymSofer avatar MaksymSofer commented on May 14, 2024

1CanvasAsImage

from manga-image-translator.

zyddnys avatar zyddnys commented on May 14, 2024

Can you also share the arguments you used

from manga-image-translator.

MaksymSofer avatar MaksymSofer commented on May 14, 2024

python3 translate_demo.py --verbose --use-inpainting --translator=google --target-lang=ENG --image Downloads/26CanvasAsImage.png

from manga-image-translator.

zyddnys avatar zyddnys commented on May 14, 2024

I was unable to reproduce this error, but I pushed a commit anyway. Let me know if the latest version still has the same issue.

from manga-image-translator.

MaksymSofer avatar MaksymSofer commented on May 14, 2024

nohup.log
Here full nohup of run with your last commit

from manga-image-translator.

MaksymSofer avatar MaksymSofer commented on May 14, 2024

pip_pkg_list.log
these are my pip packages

from manga-image-translator.

zyddnys avatar zyddnys commented on May 14, 2024

I still wasn't able to reproduce this error, can you try changing n = n >> 1 to n = int(n) >> 1 and see if that helps

from manga-image-translator.

MaksymSofer avatar MaksymSofer commented on May 14, 2024

You talking about utils.py:
method:
def findNextPowerOf2(n): i = 0 while n != 0 : i += 1 n = n >> 1 return 1 << i

??

there 'n' is coming as float

changed and now got different issue:

Traceback (most recent call last): File "translate_demo.py", line 354, in <module> loop.run_until_complete(main(args.mode)) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "translate_demo.py", line 270, in main await infer(img, mode, '', alpha_ch = alpha_ch) File "translate_demo.py", line 204, in infer output = await dispatch_rendering(np.copy(img_inpainted), args.text_mag_ratio, translated_sentences, textlines, text_regions, render_text_direction_overwrite) File "/home/maks/manga-image-translator/text_rendering/__init__.py", line 53, in dispatch img_canvas = render(img_canvas, font_size, text_mag_ratio, trans_text, region, majority_dir, fg, bg, False) File "/home/maks/manga-image-translator/text_rendering/__init__.py", line 111, in render temp_box = text_render.put_text_vertical( File "/home/maks/manga-image-translator/text_rendering/text_render.py", line 347, in put_text_vertical canvas_text = np.zeros((canvas_y, canvas_x), dtype=np.uint8) TypeError: 'numpy.float64' object cannot be interpreted as an integer

from manga-image-translator.

MaksymSofer avatar MaksymSofer commented on May 14, 2024

issue seems resolved with --force-horizontal

from manga-image-translator.

dennis-thevara avatar dennis-thevara commented on May 14, 2024

I still wasn't able to reproduce this error, can you try changing n = n >> 1 to n = int(n) >> 1 and see if that helps

I had this same issue and you had the right idea, but using a straight int(n) will fail on numpy floats. n = n >> 1 to n = n.astype(int) >> 1 solved this issue.

from manga-image-translator.

Related Issues (20)

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.