neuralBlack icon indicating copy to clipboard operation
neuralBlack copied to clipboard

name 'border' is not defined

Open tobimichigan opened this issue 4 years ago • 2 comments

Hi Please could you kindly check this notebook: https://github.com/aksh-ai/neuralBlack/blob/master/brain_tumor_dataset_preparation.ipynb for possible code error?

NameError Traceback (most recent call last)

in () 9 labels.append(int(label)) 10 ---> 11 border.append(coord) 12 img = np.array(img, dtype=np.float32) 13

tobimichigan avatar Dec 19 '20 08:12 tobimichigan

this is the section that encounters the error `filename = None

for filename in range(1, 3065): with h5py.File('/content/BrainTumorClassification/data/{}.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/BrainTumorClassification/data/bt_images/{}.jpg".format(filename), img, cmap='gray')
  
  

print("{} files successfully saved".format(filename)) `

tobimichigan avatar Dec 19 '20 08:12 tobimichigan

Create border=[]

border.append(coord) to be changed to border.append('coord')

sairahulamathi avatar Mar 21 '21 12:03 sairahulamathi