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

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

Open
larrytsai0515 opened this issue May 9, 2022 · 2 comments
Open

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

larrytsai0515 opened this issue May 9, 2022 · 2 comments

Comments

@larrytsai0515
Copy link

@luvWY Hello, I have some problems running the yolo_video.py program. The problem is as follows:
Traceback (most recent call last):
File "yolo_video.py", line 106, in
detect_video(YOLO(**vars(FLAGS)), FLAGS.input, FLAGS.output)
File "C:\Users\GenkiTek\Desktop\people_count_keras\people_count_keras\people_count_keras\keras-yolo3\yolo.py", line 90, in init
self.boxes, self.scores, self.classes = self.generate()
File "C:\Users\GenkiTek\Desktop\people_count_keras\people_count_keras\people_count_keras\keras-yolo3\yolo.py", line 123, in generate
self.yolo_model.load_weights(self.model_path) # make sure model, anchors and classes match
File "C:\Users\GenkiTek\anaconda3\envs\py37\lib\site-packages\keras\engine\saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "C:\Users\GenkiTek\anaconda3\envs\py37\lib\site-packages\keras\engine\network.py", line 1230, in load_weights
f, self.layers, reshape=reshape)
File "C:\Users\GenkiTek\anaconda3\envs\py37\lib\site-packages\keras\engine\saving.py", line 1183, in load_weights_from_hdf5_group
original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'
what is the problem

@RGuven
Copy link

RGuven commented Jul 19, 2022

the problem related with h5py. Downgrade your h5py.
pip install 'h5py==2.10.0' --force-reinstall

@btopii32
Copy link

btopii32 commented Sep 8, 2022

Hey guys, I've run all the quick start commands and I'm now at the training section
Am I to just,

  1. Run python voc_annotation.py (I have no custom datasets)
    2.And then run python convert.py -w yolov3.cfg yolov3.weights model_data/yolo_weights.h5
  2. And then finally run train.py? Is this going to work please?

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

3 participants