Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while Loading Homography weights #37

Open
muradh2994 opened this issue Jun 1, 2021 · 1 comment
Open

Error while Loading Homography weights #37

muradh2994 opened this issue Jun 1, 2021 · 1 comment

Comments

@muradh2994
Copy link

homography model code was working fine until last week. Then i executed below blocks of code to overcome the tensorflow issue. Currently unable to load model weights due to AttributeError: 'str' object has no attribute 'decode' .

image

from narya.narya.models.keras_models import DeepHomoModel

deep_homo_model = DeepHomoModel()

WEIGHTS_PATH = (
"https://storage.googleapis.com/narya-bucket-1/models/deep_homo_model.h5"
)
WEIGHTS_NAME = "deep_homo_model.h5"
WEIGHTS_TOTAR = False

checkpoints = tf.keras.utils.get_file(
WEIGHTS_NAME, WEIGHTS_PATH, WEIGHTS_TOTAR,
)

deep_homo_model.load_weights(checkpoints)

corners = deep_homo_model(image)

image

I also additionally installed !pip install -q h5py==2.10.0 to overcome " AttributeError: 'str' object has no attribute 'decode' "

@DonsetPG
Copy link
Owner

DonsetPG commented Jun 5, 2021

Hey, after pip3 install -r requirements.txt, running:

!pip3 install --upgrade tensorflow
!pip3 install --upgrade keras
!pip3 install --upgrade segmentation-models
!pip3 install --upgrade --force-reinstall tensorflow

solves the issue.

Let me know if this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants