Skip to content

Multiple issues #432

Closed
Closed

Description

This piece of software is great with the exception of it being extremely buggy.

What I'm trying to do: Japanese, vertical text -> English, horizontal text
OS: Windows 11

  1. "Detect areas and recognize text"
    This works nicely, but sometimes it misses a portion of the text. Sure, I can fix it manually but there's another problem.

  2. "Translate all text areas"
    The translated text only fits the size of the detected boxes in 1). This results in a messy combination of vertical English letters. I have to manually typeset the box in order to fix that and make it into readable English. It becomes a pain when you have over 100 pictures to do this for.

The masking feature with LamaInpaint is also a nice addition but for it to work properly, I have to create a mask and then edit the text-removed image manually because the algorithm is set for telea. Otherwise the masking part doesn't look polished if I select LamaInpaint as the default text-removal tool in Project>Settings. Again, it becomes a pain when I have over 100 pictures.

The server addition doesn't work for me at all. ImageTrans_wsServer is in the same folder as ImageTrans. The Chrome extension is installed. When I follow the steps exactly from https://github.com/xulihang/ImageTrans_chrome_extension
I always get a "Failed to connect to ImageTrans server". Tools>Server>Start the server>Reconnect is always "Disconnected".

In terms of bugs, the program sometimes crashes or stops functioning without reason. For example, if I create a mask, go to text removal and then go back to mask, I am met with a blank screen and the program ceases to function. It's not frozen, but functionality becomes nonexistent. During processing, it sometimes freezes completely. In order to guarantee a successful run, each step has to be precise otherwise it'll eventually crash somewhere.

Are you familiar with the Chrome extension "Ichigo Manga Translator"? Personally, it also is great on-the-fly translator, but what it's lacking is parameter/settings modification. I'd love to have the same automation of it but with the ability to tweak the settings for my needs. I am 100% certain that the output from ImageTrans is much more refined but as a current amateur user, I am unable to reproduce something similar to Ichigo Manga Translator.

Activity

  1. xulihang commented on Jun 15, 2023

    @xulihang
    Owner

    ImageTrans is designed to translate any images. So its default configuration is not optimized for manga.

    There are somethings you can do to optimize it for translating Japanese manga to English:

    1. Use balloon detection + mangaOCR or mangaTranslator which have a better accuracy and work offline. Check out this blog for more.
    2. Enable converting vertical to horizontal for better layout as discussed here: Make english translation visually good #190
      image
  2. xulihang commented on Jun 15, 2023

    @xulihang
    Owner

    About setting Lama Inpaint as the default, I am not sure what the problem is. If you set it in the settings, telea will not be used when generating mask and text-removed images by checking "Translated" or using batch operations.

  3. xulihang commented on Jun 15, 2023

    @xulihang
    Owner

    In case of crashes, I rarely meet crashes. Please give me exact steps or videos to reproduce the problem.

    As for starting the server, you have to use JRE11. The easiest way is to use the full version from onedrive and let the program download and start the server.

  4. xulihang commented on Jun 18, 2023

    @xulihang
    Owner
    1. You can enable AutoCorrect to replace characters for machine translation. If this is not enough, I have to update the Sugoi Translator's plugin to do this.
      image

    2. Breaking words where there is not enough space is the default behavior of the underlying text engine. The text engine is a built-in one in JavaFX which does not give me many controls. I have to implement my own text engine for such a purpose.

  5. xulihang commented on Jun 25, 2023

    @xulihang
    Owner

    Check if there is the InsetRectMaskGenPlugin.jar file in the plugins folder.

    Try to use ImageTrans.bat to start the program which has a larger memory setting for Java.

  6. xulihang commented on Jun 27, 2023

    @xulihang
    Owner

    I have updated the plugins zip file.

    I will try to fix the issues. As for the crashing, are you using the x86 version or the x64 version? Could you send me some image files so that I can reproduce the problem?

  7. xulihang commented on Jun 28, 2023

    @xulihang
    Owner

    I see. The image has a large resolution. Actually, ImageTrans will scale down images if their width or height is over 8000. It seems that it needs a smaller threshold.

    The error should be related to the limitation of JavaFX's canvas:

    java.lang.NullPointerException
    	at com.sun.javafx.sg.prism.NGCanvas.handleRenderOp(NGCanvas.java:1353)
    	at com.sun.javafx.sg.prism.NGCanvas.renderStream(NGCanvas.java:1103)
    	at com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:609)
    	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
    	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
    	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
    	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:577)
    	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
    	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
    	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
    	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:577)
    	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
    	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
    	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
    	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:577)
    	at com.sun.javafx.sg.prism.NGNode.renderForClip(NGNode.java:2294)
    	at com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:2188)
    	at com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:2214)
    	at com.sun.javafx.sg.prism.CacheFilter.impl_renderNodeToCache(CacheFilter.java:671)
    	at com.sun.javafx.sg.prism.CacheFilter.render(CacheFilter.java:575)
    	at com.sun.javafx.sg.prism.NGNode.renderCached(NGNode.java:2358)
    	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2044)
    	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
    	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
    	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:577)
    	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
    	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
    	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
    	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:577)
    	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
    	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
    	at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:477)
    	at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:330)
    	at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    	at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
    	at java.lang.Thread.run(Thread.java:748)
    
  8. xulihang commented on Jun 28, 2023

    @xulihang
    Owner

    I can send you an interval version to have a test. You can send a mail to me and I will send you the file to update: admin@basiccat.org

  9. xulihang commented on Jun 29, 2023

    @xulihang
    Owner

    I've sent you the file via gmail. Please try it out.

  10. xulihang commented on Jun 30, 2023

    @xulihang
    Owner

    The current performance of handling huge images is not very good. I have to restructure the mask editor based on projects like this one: HugeImageView - show very large images

  11. 19 remaining items

  12. xulihang commented on Aug 27, 2023

    @xulihang
    Owner

    WinRT's raw results contain spaces. You can check the "Remove spaces" to remove them.

    image

    Removing spaces is not effective using "detect text areas and recognize text". You can perform boxes merging to remove spaces.
    image

  13. xulihang commented on Aug 27, 2023

    @xulihang
    Owner

    Google drive's token expires every 7 days.

    You have to wait for me to reset the token or run it by yourself.

  14. xulihang commented on Aug 28, 2023

    @xulihang
    Owner

    You can follow this guide: #91 (comment)

    It may be a bit complex.

  15. xulihang commented on Aug 28, 2023

    @xulihang
    Owner

    The version above is the command line version which directly runs on your device.

  16. xulihang commented on Aug 30, 2023

    @xulihang
    Owner

    If the original image format is PNG, it will output PNG. If the original format is JPEG, it will output JPEG. Currently, there are no settings to specify the batch output image format.

  17. xulihang commented on Sep 6, 2023

    @xulihang
    Owner

    Thanks for the feedback. I will try to improve the software.

  18. xulihang commented on Sep 6, 2023

    @xulihang
    Owner

    I've closed this issue. I will open new issues relating to your request.

  19. xulihang commented on Sep 16, 2023

    @xulihang
    Owner

    The default output format can be set to PNG in v2.4.1.

  20. xulihang commented on Oct 1, 2023

    @xulihang
    Owner

    v2.5.2 solved the problem of loading large images in the mask editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions