Open kruthikakr opened 3 years ago
filename = None
for filename in range(1, 3065): with h5py.File('/content/drive/My Drive/Colab Notebooks/dataset/imageData/{}.mat'.format(filename), 'r') as f: img = f['cjdata']['image'] label = f['cjdata']['label'][0][0]
labels.append(int(label))
border.append('coord')
img = np.array(img, dtype=np.float32)
plt.axis('off')
plt.imsave("/content/drive/My Drive/Colab Notebooks/new_dataset/bt_images/{}.jpg".format(filename), img, cmap='gray')
print("{} files successfully saved".format(filename))
NameError Traceback (most recent call last)
NameError: name 'border' is not defined
IndexError Traceback (most recent call last)