Iterate all subfolders and OCR images in Python
问题 I have a folder which have multiple subfolders and images, and I want use Baidu OCR to extract texts in images files in for each subfolders and write to one excel (need split contents) file for each subfolder named by subfolders name: folder \ sub1\file0.jpg \ sub1\file1.jpg \ sub1\file2.png . . . \ sub2\xxx.png \ sub2\yyy.jpg \ sub2\zzz.png . . . Expected results: folder \ sub1\file0.jpg \ sub1\file1.jpg \ sub1\file2.png \ sub1\sub1.xlsx . . . \ sub2\xxx.png \ sub2\yyy.jpg \ sub2\zzz.png \