An easyOCR script to do what exactly?
If you look at the github page and read the usage section of the readme:
https://github.com/JaidedAI/EasyOCR
This is all you need to do to ocr 1 image:
Code:
import easyocr
reader = easyocr.Reader(['ch_sim','en']) # this needs to run only once to load the model into memory
result = reader.readtext('chinese.jpg')
If you're talking about this tutorial:
https://www.akiba-online.com/thread...-english-movies-hardsub.2005149/#post-4272870
Then it uses more than just easyOCR, it also makes use of videosubfinder to grab an image of each subtitle lines in a video and the guy wrote a custom script to make use of both automatically.
That custom script has
Code:
import easyocr
reader = easyocr.Reader( args.langs.replace(" ","").split(",") )
which loads the parameter you specify in the command to run that script which is "ch_tra" in his example so looks right for the first 2 lines of easyOCR usage.
Next you have
Code:
result = reader.readtext(fileImage,detail=0, paragraph=True)
a little later inside a loop that goes through all the images created by videosubfinder.
fileImage seems to contain the current file the loop found from what I can understand so that matches with the only parameter easyOCR needs.
For the extra 2, if you look at the api doc for easyOCR, you can see "
detail (int, default = 1) - Set this to 0 for simple output" and "
paragraph (bool, default = False) - Combine result into paragraph" so those are both valid options.
So, if you mean to say that the custom script from the guy who wrote the tutorial I linked isn't working for you, you're going to have to give more details as to what error message you're getting and what version of softwares you're using since everything seems fine with the easyOCR section on that one.