pytesseract eats CPU too high The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceHow to get the CPU Usage in C#?MySQL high CPU usageMySQL Function eat too much CPUPreserving multiple space in pytesseract pythonGet orientation pytesseract Python3No module named pytesseractPyTesseract - recognize digits in simple imagepytesseract Failed loading language 'eng'Python pytesseract no such file or directoryWhat is the difference between Pytesseract and Tesserocr?

Mortgage adviser recommends a longer term than necessary combined with overpayments

What do you call a plan that's an alternative plan in case your initial plan fails?

Working through the single responsibility principle (SRP) in Python when calls are expensive

How can I define good in a religion that claims no moral authority?

Pandas DataFrames: Create new rows with calculations across existing rows

How to pronounce 1ターン?

Program that generates brainfuck code that outputs given text

Format single node in tikzcd

How do you keep chess fun when your opponent constantly beats you?

Why does this iterative way of solving of equation work?

Single author papers against my advisor's will?

Semisimplicity of the category of coherent sheaves?

How to delete random line from file using Unix command?

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

What is this lever in Argentinian toilets?

What LEGO pieces have "real-world" functionality?

How are presidential pardons supposed to be used?

How to test the equality of two Pearson correlation coefficients computed from the same sample?

Why can't wing-mounted spoilers be used to steepen approaches?

Take groceries in checked luggage

Can withdrawing asylum be illegal?

Finding the path in a graph from A to B then back to A with a minimum of shared edges

how can a perfect fourth interval be considered either consonant or dissonant?

How should I replace vector<uint8_t>::const_iterator in an API?



pytesseract eats CPU too high



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceHow to get the CPU Usage in C#?MySQL high CPU usageMySQL Function eat too much CPUPreserving multiple space in pytesseract pythonGet orientation pytesseract Python3No module named pytesseractPyTesseract - recognize digits in simple imagepytesseract Failed loading language 'eng'Python pytesseract no such file or directoryWhat is the difference between Pytesseract and Tesserocr?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















In Ubuntu 16.04 LTS, the pyteserract script eats too high, and it causes system reboot intermittenly.



The top command output is



 top - 21:23:31 up 27 min, 4 users, load average: 3.27, 1.86, 1.28
Tasks: 290 total, 2 running, 216 sleeping, 0 stopped, 0 zombie
%Cpu(s): 87.5 us, 0.7 sy, 0.0 ni, 11.7 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 16295836 total, 10387872 free, 2990788 used, 2917176 buff/cache
KiB Swap: 16645116 total, 16645116 free, 0 used. 12155216 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5391 myid 20 0 1393532 141324 39308 R 667.8 0.9 2:30.57 python


the python script is



text_eng = pytesseract.image_to_string(Image.open(dst), lang='eng', config='--oem 1 --psm 1 -c preserve_interword_spaces=1')


My environment is



tesseract 4.1.0-rc1
leptonica-1.77.0
libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8 : libopenjp2 2.1.2
Found AVX2
Found AVX
Found SSE


What I have done are
1) removed oem option
2) remove psm option
but no luck so far.



Any clue?










share|improve this question






















  • How do you get to 667.8% CPU usage? I assume that's a percentage of a single core. How many cores are you running? For example, if 32 cores, it's not CPU usage that's the problem, but, if less than 7 cores, problem.

    – Jim Fell
    Mar 8 at 15:58











  • @JimFell Thanks for your attention, cat /proc/cpuinfo | grep processor | wc -l returns 8 so that I think 8 cores! In irix mode, top says 99% of cpu usage. I think the problem comes from tesseract.

    – Marcel Kim
    Mar 8 at 16:39

















1















In Ubuntu 16.04 LTS, the pyteserract script eats too high, and it causes system reboot intermittenly.



The top command output is



 top - 21:23:31 up 27 min, 4 users, load average: 3.27, 1.86, 1.28
Tasks: 290 total, 2 running, 216 sleeping, 0 stopped, 0 zombie
%Cpu(s): 87.5 us, 0.7 sy, 0.0 ni, 11.7 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 16295836 total, 10387872 free, 2990788 used, 2917176 buff/cache
KiB Swap: 16645116 total, 16645116 free, 0 used. 12155216 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5391 myid 20 0 1393532 141324 39308 R 667.8 0.9 2:30.57 python


the python script is



text_eng = pytesseract.image_to_string(Image.open(dst), lang='eng', config='--oem 1 --psm 1 -c preserve_interword_spaces=1')


My environment is



tesseract 4.1.0-rc1
leptonica-1.77.0
libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8 : libopenjp2 2.1.2
Found AVX2
Found AVX
Found SSE


What I have done are
1) removed oem option
2) remove psm option
but no luck so far.



Any clue?










share|improve this question






















  • How do you get to 667.8% CPU usage? I assume that's a percentage of a single core. How many cores are you running? For example, if 32 cores, it's not CPU usage that's the problem, but, if less than 7 cores, problem.

    – Jim Fell
    Mar 8 at 15:58











  • @JimFell Thanks for your attention, cat /proc/cpuinfo | grep processor | wc -l returns 8 so that I think 8 cores! In irix mode, top says 99% of cpu usage. I think the problem comes from tesseract.

    – Marcel Kim
    Mar 8 at 16:39













1












1








1








In Ubuntu 16.04 LTS, the pyteserract script eats too high, and it causes system reboot intermittenly.



The top command output is



 top - 21:23:31 up 27 min, 4 users, load average: 3.27, 1.86, 1.28
Tasks: 290 total, 2 running, 216 sleeping, 0 stopped, 0 zombie
%Cpu(s): 87.5 us, 0.7 sy, 0.0 ni, 11.7 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 16295836 total, 10387872 free, 2990788 used, 2917176 buff/cache
KiB Swap: 16645116 total, 16645116 free, 0 used. 12155216 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5391 myid 20 0 1393532 141324 39308 R 667.8 0.9 2:30.57 python


the python script is



text_eng = pytesseract.image_to_string(Image.open(dst), lang='eng', config='--oem 1 --psm 1 -c preserve_interword_spaces=1')


My environment is



tesseract 4.1.0-rc1
leptonica-1.77.0
libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8 : libopenjp2 2.1.2
Found AVX2
Found AVX
Found SSE


What I have done are
1) removed oem option
2) remove psm option
but no luck so far.



Any clue?










share|improve this question














In Ubuntu 16.04 LTS, the pyteserract script eats too high, and it causes system reboot intermittenly.



The top command output is



 top - 21:23:31 up 27 min, 4 users, load average: 3.27, 1.86, 1.28
Tasks: 290 total, 2 running, 216 sleeping, 0 stopped, 0 zombie
%Cpu(s): 87.5 us, 0.7 sy, 0.0 ni, 11.7 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 16295836 total, 10387872 free, 2990788 used, 2917176 buff/cache
KiB Swap: 16645116 total, 16645116 free, 0 used. 12155216 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5391 myid 20 0 1393532 141324 39308 R 667.8 0.9 2:30.57 python


the python script is



text_eng = pytesseract.image_to_string(Image.open(dst), lang='eng', config='--oem 1 --psm 1 -c preserve_interword_spaces=1')


My environment is



tesseract 4.1.0-rc1
leptonica-1.77.0
libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8 : libopenjp2 2.1.2
Found AVX2
Found AVX
Found SSE


What I have done are
1) removed oem option
2) remove psm option
but no luck so far.



Any clue?







ubuntu tesseract cpu-usage pytesseract






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 13:27









Marcel KimMarcel Kim

1816




1816












  • How do you get to 667.8% CPU usage? I assume that's a percentage of a single core. How many cores are you running? For example, if 32 cores, it's not CPU usage that's the problem, but, if less than 7 cores, problem.

    – Jim Fell
    Mar 8 at 15:58











  • @JimFell Thanks for your attention, cat /proc/cpuinfo | grep processor | wc -l returns 8 so that I think 8 cores! In irix mode, top says 99% of cpu usage. I think the problem comes from tesseract.

    – Marcel Kim
    Mar 8 at 16:39

















  • How do you get to 667.8% CPU usage? I assume that's a percentage of a single core. How many cores are you running? For example, if 32 cores, it's not CPU usage that's the problem, but, if less than 7 cores, problem.

    – Jim Fell
    Mar 8 at 15:58











  • @JimFell Thanks for your attention, cat /proc/cpuinfo | grep processor | wc -l returns 8 so that I think 8 cores! In irix mode, top says 99% of cpu usage. I think the problem comes from tesseract.

    – Marcel Kim
    Mar 8 at 16:39
















How do you get to 667.8% CPU usage? I assume that's a percentage of a single core. How many cores are you running? For example, if 32 cores, it's not CPU usage that's the problem, but, if less than 7 cores, problem.

– Jim Fell
Mar 8 at 15:58





How do you get to 667.8% CPU usage? I assume that's a percentage of a single core. How many cores are you running? For example, if 32 cores, it's not CPU usage that's the problem, but, if less than 7 cores, problem.

– Jim Fell
Mar 8 at 15:58













@JimFell Thanks for your attention, cat /proc/cpuinfo | grep processor | wc -l returns 8 so that I think 8 cores! In irix mode, top says 99% of cpu usage. I think the problem comes from tesseract.

– Marcel Kim
Mar 8 at 16:39





@JimFell Thanks for your attention, cat /proc/cpuinfo | grep processor | wc -l returns 8 so that I think 8 cores! In irix mode, top says 99% of cpu usage. I think the problem comes from tesseract.

– Marcel Kim
Mar 8 at 16:39












1 Answer
1






active

oldest

votes


















0














Answer by myself.



I've removed leptonica-1.77.0 and compiled again, then the problem has been gone.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55064210%2fpytesseract-eats-cpu-too-high%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Answer by myself.



    I've removed leptonica-1.77.0 and compiled again, then the problem has been gone.






    share|improve this answer



























      0














      Answer by myself.



      I've removed leptonica-1.77.0 and compiled again, then the problem has been gone.






      share|improve this answer

























        0












        0








        0







        Answer by myself.



        I've removed leptonica-1.77.0 and compiled again, then the problem has been gone.






        share|improve this answer













        Answer by myself.



        I've removed leptonica-1.77.0 and compiled again, then the problem has been gone.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 9 at 9:26









        Marcel KimMarcel Kim

        1816




        1816





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55064210%2fpytesseract-eats-cpu-too-high%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved