Cannot load provided pretrained model to evaluate DAVIS dataset
nvtu opened this issue · comments
I intend to load your pretrained model of DAVIS dataset for evaluation. However, I get errors when trying to run the command followed by your README file instruction.
Caused by op u'save/RestoreV2', defined at:
File "osmn_train_eval.py", line 198, in <module>
osmn.test(dataset, args, checkpoint_path, args.result_path, config=config, batch_size=1)
File "/home/ad/nvtu/video_seg/osmn.py", line 815, in test
saver = tf.train.Saver([v for v in tf.global_variables() if '-up' not in v.name]) #if '-up' not in v.name and '-cr' not in v.name])
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1284, in __init__
self.build()
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1296, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1333, in _build
build_save=build_save, build_restore=build_restore)
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 781, in _build_internal
restore_sequentially, reshape)
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 400, in _AddRestoreOps
restore_sequentially)
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 832, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1463, in restore_v2
shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3414, in create_op
op_def=op_def)
File "/home/ad/anaconda3/envs/maskrcnn/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1740, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
DataLossError (see above for traceback): Unable to open table file pretrained_model/ft_davis.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_INT32, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
[[Node: save/RestoreV2/_161 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_154_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
My command is:
$ python osmn_train_eval.py --data_path DAVIS --whole_model_path pretrained_model/ft_davis.data-00000-of-00001 --result_path results --only_testing --data_version 2017 --gpu_id 0
What happen and what do I need to use your model? Thank you
@nvtu Hi you also need to download ft_davis.meta and ft_davis.index from the download link. Have you downloaded them? Thanks.
@linjieyangsc Yes, I downloaded ft_davis.meta and ft_davis.index and placed them into the same folder as ft_davis.data-00000-of-00001 (pretrained_model folder) but it does not solve the error.
@nvtu hi, you should use ft_davis
as the input parameter like this:
--whole_model_path pretrained_model/ft_davis