By the way I have the other method running byside.saved 3064 images as png from mat files.I have saved 3 labeled folders (images stored  as PNG) .But found RuntimeError: Found 0 files in subfolders.

image.png1339×675 56.5 KB
 .
"each subfolders  in "train “have png images.”