RandLA-Net
RandLA-Net copied to clipboard
Cannot load a pretrained model
I created docker-image and installed required packages. Pre-trained models downloaded from here
python main_Semantic3D.py --mode test --gpu 0 --model_path=/data/models/Semantic3D/checkpoint
Load_pc_0: bildstein_station1_xyz_intensity_rgb
Load_pc_1: bildstein_station5_xyz_intensity_rgb
Load_pc_2: domfountain_station1_xyz_intensity_rgb
Load_pc_3: domfountain_station2_xyz_intensity_rgb
Load_pc_4: domfountain_station3_xyz_intensity_rgb
Load_pc_5: neugasse_station1_xyz_intensity_rgb
Load_pc_6: sg27_station1_intensity_rgb
Load_pc_7: sg27_station4_intensity_rgb
Load_pc_8: sg27_station5_intensity_rgb
Load_pc_9: sg27_station9_intensity_rgb
Load_pc_10: sg28_station4_intensity_rgb
Load_pc_11: untermaederbrunnen_station1_xyz_intensity_rgb
Load_pc_12: untermaederbrunnen_station3_xyz_intensity_rgb
Load_pc_13: bildstein_station3_xyz_intensity_rgb
Load_pc_14: sg27_station2_intensity_rgb
Load_pc_15: MarketplaceFeldkirch_Station4_rgb_intensity-reduced
Load_pc_16: StGallenCathedral_station6_rgb_intensity-reduced
Load_pc_17: birdfountain_station1_xyz_intensity_rgb
Load_pc_18: castleblatten_station1_intensity_rgb
Load_pc_19: castleblatten_station5_xyz_intensity_rgb
Load_pc_20: marketplacefeldkirch_station1_intensity_rgb
Load_pc_21: marketplacefeldkirch_station4_intensity_rgb
Load_pc_22: marketplacefeldkirch_station7_intensity_rgb
Load_pc_23: sg27_station10_intensity_rgb
Load_pc_24: sg27_station10_rgb_intensity-reduced
Load_pc_25: sg27_station3_intensity_rgb
Load_pc_26: sg27_station6_intensity_rgb
Load_pc_27: sg27_station8_intensity_rgb
Load_pc_28: sg28_Station2_rgb_intensity-reduced
Load_pc_29: sg28_station2_intensity_rgb
Load_pc_30: sg28_station5_xyz_intensity_rgb
Load_pc_31: stgallencathedral_station1_intensity_rgb
Load_pc_32: stgallencathedral_station3_intensity_rgb
Load_pc_33: stgallencathedral_station6_intensity_rgbPreparing reprojection indices for validation and test
finished
Initiating input pipelines
WARNING:tensorflow:From /home/RandLA-Net/RandLANet.py:265: 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`./opt/conda/lib/python3.6/site-packages/tensorflow/python/ops/gradients_impl.py:108: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1292, in _do_call
return fn(*args)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1277, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1367, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /data/models/Semantic3D/checkpoint: 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_1/RestoreV2}} = RestoreV2[dtypes=[DT_FLOAT, 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_1/Const_0_0, save_1/RestoreV2/tensor_names, save_1/RestoreV2/shape_and_slices)]]During handling of the above exception, another exception occurred:Traceback (most recent call last):
File "main_Semantic3D.py", line 368, in <module>
tester = ModelTester(model, dataset, restore_snap=chosen_snap)
File "/home/RandLA-Net/tester_Semantic3D.py", line 32, in __init__
self.saver.restore(self.sess, restore_snap)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1538, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 887, in run
run_metadata_ptr)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1110, in _run
feed_dict_tensor, options, run_metadata)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1286, in _do_run
run_metadata)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1308, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /data/models/Semantic3D/checkpoint: 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_1/RestoreV2}} = RestoreV2[dtypes=[DT_FLOAT, 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_1/Const_0_0, save_1/RestoreV2/tensor_names, save_1/RestoreV2/shape_and_slices)]]Caused by op 'save_1/RestoreV2', defined at:
File "main_Semantic3D.py", line 368, in <module>
tester = ModelTester(model, dataset, restore_snap=chosen_snap)
File "/home/RandLA-Net/tester_Semantic3D.py", line 19, in __init__
self.saver = tf.train.Saver(my_vars, max_to_keep=100)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1094, in __init__
self.build()
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1106, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1143, in _build
build_save=build_save, build_restore=build_restore)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 787, in _build_internal
restore_sequentially, reshape)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 406, in _AddRestoreOps
restore_sequentially)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 854, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1466, in restore_v2
shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 488, in new_func
return func(*args, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3272, in create_op
op_def=op_def)
File "/opt/conda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1768, in __init__
self._traceback = tf_stack.extract_stack()DataLossError (see above for traceback): Unable to open table file /data/models/Semantic3D/checkpoint: 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_1/RestoreV2}} = RestoreV2[dtypes=[DT_FLOAT, 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_1/Const_0_0, save_1/RestoreV2/tensor_names, save_1/RestoreV2/shape_and_slices)]]
python=3.6 tensorflow=1.11.0 cudatoolkit=10.0
So what we found:
upgrade tensorflow to 1.15.0 and change
self.saver.restore(self.sess, restore_snap)
to
self.saver.restore(self.sess, tf.train.latest_checkpoint(restore_snap))
hey I changed the line like you wrote and I got another problem:
Traceback (most recent call last):
File "main_Semantic3D.py", line 368, in
Do you know how can i solve it?
@Adirosenthal540 I have no suggestions but try this