def get_sample_count(path, classes): count = 0 for name in class_names: count += len(glob.glob1(path + name + '/', '*.png')) return count