def get_img_paths(imgs_dir):
    img_paths = []
    for (dirpath, dirnames, filenames) in os.walk(imgs_dir):
        for filename in [f for f in filenames if (f.endswith('.png') or f.endswith('.PNG') or f.endswith('.jpg') or f.endswith('.JPG') or f.endswith('.jpeg') or f.endswith('.JPEG'))]:
            img_paths.append(os.path.join(dirpath, filename))
    img_paths.sort()
    return img_paths
def get_img_paths(imgs_dir):
    img_paths = []
    for (dirpath, dirnames, filenames) in os.walk(imgs_dir):
        for filename in [f for f in filenames if (f.endswith('.png') or f.endswith('.PNG') or f.endswith('.jpg') or f.endswith('.JPG') or f.endswith('.jpeg') or f.endswith('.JPEG'))]:
            img_paths.append(os.path.join(dirpath, filename))
    img_paths.sort()
    return img_paths