isic-2017-segmentation icon indicating copy to clipboard operation
isic-2017-segmentation copied to clipboard

About TypeError

Open jangjichang opened this issue 6 years ago • 3 comments

Hi juliafeec.

first, Thank you for sharing your code.

I re-downloaded ".yml" file but I have error.

Traceback (most recent call last): File "/home/jc/PycharmProjects/isbi2017-part1-master/segment.py", line 170, in <module> rescale_mask=rescale_mask, use_hsv=use_hsv, remove_mean_samplewise=remove_mean_samplewise) File "/home/jc/PycharmProjects/isbi2017-part1-master/ISIC_dataset.py", line 64, in load_images img_mask = get_mask(image_name, mask_folder, rescale_mask) File "/home/jc/PycharmProjects/isbi2017-part1-master/ISIC_dataset.py", line 25, in get_mask img_mask = img_mask/255. TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

have you ever seen this error? plz, let me know. Thank you.

jangjichang avatar Mar 15 '18 05:03 jangjichang

This error occurred because of datasets.

I download broken files. So I re-download datasets files.

Sorry to have bothered you.

jangjichang avatar Mar 21 '18 07:03 jangjichang

hi @jangjichang, I am a freshman in this field. I download this file but I couldn't run it. The error is

Traceback (most recent call last): File "/Users/zhangdan/Desktop/isic-2017-segmentation-master/segment.py", line 92, in model = models.Unet(height,width, loss=loss, optimizer = optimizer, metrics = metrics, fc_size = fc_size, channels=n_channels) File "/Users/zhangdan/Desktop/isic-2017-segmentation-master/models.py", line 22, in Unet input_with_noise = GaussianNoise(gaussian_noise_std)(inputs) File "/usr/local/lib/python2.7/site-packages/keras/engine/topology.py", line 511, in call self.add_inbound_node(inbound_layers, node_indices, tensor_indices) File "/usr/local/lib/python2.7/site-packages/keras/engine/topology.py", line 569, in add_inbound_node Node.create_node(self, inbound_layers, node_indices, tensor_indices) File "/usr/local/lib/python2.7/site-packages/keras/engine/topology.py", line 150, in create_node output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0])) File "/usr/local/lib/python2.7/site-packages/keras/layers/noise.py", line 37, in call return K.in_train_phase(noise_x, x) File "/usr/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 1107, in in_train_phase x = tf.python.control_flow_ops.cond(tf.cast(_LEARNING_PHASE, 'bool'), AttributeError: 'module' object has no attribute 'python'

Have you ever seen this problem? Can you tell me your the version of your keras and tensorflow. Thank you .

Abby930 avatar Apr 14 '18 14:04 Abby930

i am also facing similar problem i re-downloaded both .yml file and dataset but got this error

Traceback (most recent call last): File "segment.py", line 170, in rescale_mask=rescale_mask, use_hsv=use_hsv, remove_mean_samplewise=remove_mean_samplewise) File "D:\isic-2017-segmentation-master\ISIC_dataset.py", line 64, in load_images img_mask = get_mask(image_name, mask_folder, rescale_mask) File "D:\isic-2017-segmentation-master\ISIC_dataset.py", line 25, in get_mask img_mask = img_mask/255. TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

help me thank you

vcvishal avatar May 04 '19 03:05 vcvishal