prasunroy / stefann

:fire: [CVPR 2020] STEFANN: Scene Text Editor using Font Adaptive Neural Network (official code).
https://prasunroy.github.io/stefann
Apache License 2.0
262 stars 40 forks source link

h5py version (integrity failure) #20

Open JouyonP opened 3 years ago

JouyonP commented 3 years ago

I followed the installation instructions, but kept getting the following message.

[DEBUG] Loading application... integrity failure

There was no problem with my CUDA settings, and tensorflow was picking up my GPU just fine, so I tried taking stuff out of try/exceptions and found out that keras was failing on loading the models.

original_keras_version = f.attrs['keras_version'].decode('utf8')

AttributeError: 'str' object has no attribute 'decode'

Googled it, and found that it works at h5py version 2.10.0. I think it would be nice if h5py versions were also included in conda settings.

Thank you anyways for your awesome work. I'll try it out now since my bug is fixed.

cemicel commented 3 years ago

@JouyonP thanks for pointing it out! @prasunroy I would suggest do not do like this:


    NET_C.load_weights('models/colornet_weights.h5')
except:
    RUN_FLAG = False

Print at least something, because integrity failure message is not helpful at all.


    NET_C.load_weights('models/colornet_weights.h5')
except:
    import traceback
    traceback.print_exc()
    # or a simple print like could load model would be really helpful

    RUN_FLAG = False
fronos commented 1 year ago

Just update tensorflow via command pip install -U tensoflow-gpu