martinruenz / maskfusion

MaskFusion: Real-Time Recognition, Tracking and Reconstruction of Multiple Moving Objects
http://visual.cs.ucl.ac.uk/pubs/maskfusion/index.html
Other
569 stars 146 forks source link

Python error ! #38

Closed lixz123007 closed 1 year ago

lixz123007 commented 4 years ago

The python of ubuntu16.04 is 3.5,it will make error when use "virtualenv python-environment". So i install python3.6 ,and build this code. When i run it with"./Maskfusion -l teddy.klg -run",the error comes:" Instructions for updating: Use tf.cast instead. Python error indicator is set: Traceback (most recent call last): File "/home/finch/fusion/maskfusion-master/build/GUI/MaskRCNN.py", line 96, in model.load_weights(model_path, by_name=True) File "/home/finch/fusion/maskfusion-master/deps/Mask_RCNN/mrcnn/model.py", line 2130, in load_weights saving.load_weights_from_hdf5_group_by_name(f, layers) File "/home/finch/fusion/maskfusion-master/python-environment/lib/python3.6/site-packages/keras/engine/saving.py", line 1224, in load_weights_from_hdf5_group_by_name original_keras_version = f.attrs['keras_version'].decode('utf8') AttributeError: 'str' object has no attribute 'decode' terminate called after throwing an instance of 'std::runtime_error' what(): Could not open MaskRCNN module. 已放弃 (核心已转储)"

sco09 commented 3 years ago

Have you solved this problem?

sco09 commented 3 years ago

@lixz123007 I solved this problem by deleting the "decode" part which changing this line original_keras_version = f.attrs['keras_version'].decode('utf8') to this line original_keras_version = f.attrs['keras_version']