Dear Sir/Madam,
I was executing your test_FCN_DA.py . In line no:30, i found an exception @ seg_model.load_weights('SYNTHIA_FCN.h5') because i don't from where i had to get SYNTHIA_FCN.h5.
Kindly suggest
Thank you for the feedback. This indicates somehow the code did not download the pretrained SYNTHIA FCN weights correctly.
I have updated the code so it could download the pretrained SYNTHIA FCN weights to initialize the network.
Please let me know if this fix the problem or not. Meanwhile a temporary solution would be manually downloading the weights at http://crcv.ucf.edu/data/adaptationseg/SYNTHIA_FCN.h5 and put it in the main folder.
I ran the code with the h5 file given by you.
Below following is the exception. Hence kindly suggest
File "/home/chidanand/Softwares/Domain_Adaptation/AdaptationSeg-master/test_FCN_DA.py", line 30, in
seg_model.load_weights('SYNTHIA_FCN.h5')
File "/usr/local/lib/python2.7/dist-packages/Keras-2.0.5-py2.7.egg/keras/engine/topology.py", line 2572, in load_weights
load_weights_from_hdf5_group(f, self.layers)
File "/usr/local/lib/python2.7/dist-packages/Keras-2.0.5-py2.7.egg/keras/engine/topology.py", line 3008, in load_weights_from_hdf5_group
K.batch_set_value(weight_value_tuples)
File "/usr/local/lib/python2.7/dist-packages/Keras-2.0.5-py2.7.egg/keras/backend/tensorflow_backend.py", line 2184, in batch_set_value
assign_op = x.assign(assign_placeholder)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variables.py", line 512, in assign
return state_ops.assign(self._variable, value, use_locking=use_locking)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py", line 270, in assign
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py", line 47, in assign
use_locking=use_locking, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 768, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2338, in create_op
set_shapes_for_outputs(ret)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1719, in set_shapes_for_outputs
shapes = shape_func(op)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1669, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/common_shapes.py", line 676, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Dimension 0 in both shapes must be equal, but are 3 and 64 for 'Assign' (op: 'Assign') with input shapes: [3,3,640,64], [64,3,3,3].
Process finished with exit code 1
You are supposed to change Keras backend from tensorflow to Theano as well as the keras data ordering. They are mentioned here: https://github.com/YangZhang4065/AdaptationSeg#keras-backend-setup.
Yeah, i did follow your steps, errors gone.
I got stuck at one more step, if i want to view segmentation results after prediction in test_FCN_DA.py file, how to go ahead? Can u give me small snippet of the code...pls