Closed fotsing365 closed 6 years ago
Ah so the list/array you are iterating through in this case is the unique_labels
. So what this error is saying is that that list/array is currently empty.
Did you make sure that you filled out the class_dict.csv
files in the CamVid
folder?
Yes GeorgeSeif it was already there after cloning the project. I am not able to train any model each one show me the same error
When I even try to train the FC-DenseNet103 model with the parameters you specified in the readme I always get the same error. I even a moment doubted about the images size in Camvid. In the readme you said you have used 352x480. But after cloning I have noticed the images size is 960x720. Unless I'm mistaken so I am really new to deep learning and python.
I use this command
python main.py --num_epochs 300 --mode train --dataset CamVid --crop_height 480 --crop_width 352 --batch_size 1 --model FC-DenseNet103
I think the problem is np.array does not take an iterator to solve this we can have a look on this link https://stackoverflow.com/questions/48643256/typeerror-iteration-over-a-0-d-array-python
Great job GeorgeSeif
when I try to train the FRRN-A model with the command " python main.py --mode train --dataset CamVid --crop_height 720 --crop_width 960 --batch_size 5 --num_val_images 10 --model FRRN-A" I obtain this error I get this error /home/cedriq/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from
float
tonp.floating
is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type
. from ._conv import register_converters as _register_converters Preparing the model ... WARNING:tensorflow:From main.py:167: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version. Instructions for updating:Future major versions of TensorFlow will allow gradients to flow into the labels input on backprop by default.
See tf.nn.softmax_cross_entropy_with_logits_v2.
This model has 17741264 trainable parameters Loading the data ...
Begin training Dataset --> CamVid Model --> FRRN-A Crop Height --> 720 Crop Width --> 960 Num Epochs --> 300 Batch Size --> 5 Num Classes --> 32 Data Augmentation: Vertical Flip --> False Horizontal Flip --> False Brightness Alteration --> None Rotation --> None
Traceback (most recent call last): File "main.py", line 254, in
output_image = np.float32(helpers.one_hot_it(label=output_image, class_dict=class_dict))
File "/home/cedriq/Bureau/prediction/Semantic-Segmentation-Suite/helpers.py", line 66, in one_hot_it
for colour in unique_labels:
TypeError: iteration over a 0-d array
how can I fix it?