Tutorial OCR Chinese(english) movies hardsub

Was this tutorial helpful?


  • Total voters
    15

superman4207

JAV Perv Enthusiast
Jul 4, 2022
49
88
The "C:\>" is not part of the command, it's the command prompt telling you where it's pointing to.

And the "\cd" I assume they meant type "cd \" to go to the root of the c drive since the default usually is "C:\Windows\system32>" meaning you're in the system32 folder in the Windows folder that's located in the C drive.
Yes, what SamKook said. Command prompt isn't hard to use, but if you're not familiar with it, this may be more complicated for you than most. I was trying to illustrate what the command prompt should look like. I'm going to guess if you're not familiar with using command prompt, installing Python will be a headache for you too @hobbies . You have to install all the Python stuff before getting to my steps. Good luck!
 

Aeolus Kratos

Member
Aug 25, 2012
77
4
1688154338841.png

Hi, I followed all the instruction but I kept getting this error when I tried to OCR the images.

Does anyone know how to fix it?

Big thanks!
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,778
5,351
If you followed the instructions exactly, you possibly installed too old versions of the torch stuff or used the cuda version without an nvidia gpu(or one that doesn't support the cuda version you installed) so try to check that.
Without knowing what hardware you have, it's hard to help more.
 
  • Like
Reactions: Aeolus Kratos

Aeolus Kratos

Member
Aug 25, 2012
77
4
If you followed the instructions exactly, you possibly installed too old versions of the torch stuff or used the cuda version without an nvidia gpu(or one that doesn't support the cuda version you installed) so try to check that.
Without knowing what hardware you have, it's hard to help more.
Thanks for your help. I really appreciate it. My hardware is HP Pavilion 15-eg0504TU which has core i7-1165G7, 8Gb DDR4 RAM and no VGA attached.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,778
5,351
That means you can't use cuda, you have to use the "FOR CPU" option when installing the pytorch stuff.
You did not specify which you used, but if it was cuda, then it would explain that issue.
 
  • Like
Reactions: Aeolus Kratos

Aeolus Kratos

Member
Aug 25, 2012
77
4
That means you can't use cuda, you have to use the "FOR CPU" option when installing the pytorch stuff.
You did not specify which you used, but if it was cuda, then it would explain that issue.
Thanks! I forgot to mention, I already used the FOR CPU options of the pytorch, but it did not work.

1688180263821.png
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,778
5,351
It only sees that it's already installed, it doesn't know it's a different one so you have to uninstall it first before installing the cpu one.

This should do it:
Code:
pip3 uninstall torch torchvision torchaudio
And then install the cpu one.

Looking at it more closely it seems it's the cpu version that was indeed installed, but better be safe and still do this to check if it fixes it.
 
  • Like
Reactions: Aeolus Kratos

Aeolus Kratos

Member
Aug 25, 2012
77
4
It only sees that it's already installed, it doesn't know it's a different one so you have to uninstall it first before installing the cpu one.

This should do it:
Code:
pip3 uninstall torch torchvision torchaudio
And then install the cpu one.

Looking at it more closely it seems it's the cpu version that was indeed installed, but better be safe and still do this to check if it fixes it.
It did work. Thank you sooooooo much!
 

hobbies

New Member
Apr 3, 2023
25
2
Hmmm weird, this is what happens when i try running the code, nothing happens
 

Attachments

  • wut.png
    wut.png
    7.8 KB · Views: 59

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,778
5,351
Hmmm weird, this is what happens when i try running the code, nothing happens
Is there images with text in that folder? It will have nothing to do if there aren't.
 

hobbies

New Member
Apr 3, 2023
25
2
There were images but it seems the easyocr.py file the OP uploaded was blank and didnt have any code? So I opened sublime text and pasted the code the OP gave and saved it. It finally runs but now im getting my first error
 

Attachments

  • 1.png
    1.png
    44.7 KB · Views: 65

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,778
5,351
It's not blank, the code is definitely there in the zip, but I assume that when you tried to extract it there was an error and it only created the file without actually extracting the content for it.

To remove the python folder for version 3.11 properly, you'd have to run the python uninstaller. Not sure if you can choose which version to remove since I never tried on windows but both can coexist with no issues.

I'm assuming you want to try the older version since 3.11 is probably not compatible anymore with the script and the default is 3.11, but you can manually tell it to use 3.10 instead by using the python.exe from the 3.10 path.
Might also need to run the pip exe from the scripts folder for python 3.10 to install the right requirement first too.
You can also change the PATH environment variable to point to the 3.10 folder instead of the 3.11 one so it would get used by default instead.
 
  • Like
Reactions: hobbies

hobbies

New Member
Apr 3, 2023
25
2
It's not blank, the code is definitely there in the zip, but I assume that when you tried to extract it there was an error and it only created the file without actually extracting the content for it.

To remove the python folder for version 3.11 properly, you'd have to run the python uninstaller. Not sure if you can choose which version to remove since I never tried on windows but both can coexist with no issues.

I'm assuming you want to try the older version since 3.11 is probably not compatible anymore with the script and the default is 3.11, but you can manually tell it to use 3.10 instead by using the python.exe from the 3.10 path.
Might also need to run the pip exe from the scripts folder for python 3.10 to install the right requirement first too.
You can also change the PATH environment variable to point to the 3.10 folder instead of the 3.11 one so it would get used by default instead.
Seems the issue from the error had nothing to do with that. I had to use an older version of PIL . A quick google search fixed the issue for me (forcing python to install an older version of PIL). Thanks for replying though :D
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,778
5,351
From the error, it looked like a version mismatch of some kind but I don't know that script or python internal plugins well enough to know PIL was a separate plugin, the first post doesn't list all of the requirements since I assume installing easyOCR adds them automatically. Odd that it picked a bad one or the script is just too old now.