Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

name 'border' is not defined #3

Open
tobimichigan opened this issue Dec 19, 2020 · 2 comments
Open

name 'border' is not defined #3

tobimichigan opened this issue Dec 19, 2020 · 2 comments

Comments

@tobimichigan
Copy link

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
Copy link
Author

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))
`

@sairahulamathi
Copy link

Create
border=[]

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants