I am using pytesseract in the below code:
    def fnd():
    for fname in list:
        x = None
        x = np.array([np.array(PIL.Image.open(fname))])
        print x.size
        for im in x:
                     txt = pytesseract.image_to_string(image=im).encode('utf-8').strip()
                     open("Output.txt","a+").write(txt)
                     with open("Output.txt") as openfile:                        
                         for line in openfile:
                             for part in line.split():
                                 if "cyber" in part.lower():
                                     print(line)
                                     return
The list contains names of images from a folder (2408*3506 & 300 res Gray-scaled). Unfortunately for around 35 images the total processing time is around 1400-1500 seconds.
Is there a way I can reduce the processing time?
 
    