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

Question about make_h5.py #5

Closed
Jupiter-hzh opened this issue Jun 16, 2021 · 4 comments
Closed

Question about make_h5.py #5

Jupiter-hzh opened this issue Jun 16, 2021 · 4 comments

Comments

@Jupiter-hzh
Copy link

tostring( ) is not supported in Python > 3.6, so I use tobytes( ) instead, but it looks like something wrong happened in frame. It has NULL so it can't work. Can you help me?
image

@luca-zanella-dvl
Copy link

Hi @Jupiter-hzh, as described in the h5py documentation, the data parameter in create_dataset should be a NumPy array. Therefore, I fixed this error by converting tmp_frames, which is a list, to a NumPy array before passing it to create_dataset. In any case, I would like to hear from the authors if this is the correct way to handle the problem.

@fjchange
Copy link
Owner

fjchange commented Jun 22, 2021

The target of using h5py is just reducing the indexing time in training stage. If you want to test it only, you can rewrite the datasets.py to read videos directly.

@chuong98
Copy link

chuong98 commented Jul 5, 2021

Hi @Jupiter-hzh, as described in the h5py documentation, the data parameter in create_dataset should be a NumPy array. Therefore, I fixed this error by converting tmp_frames, which is a list, to a NumPy array before passing it to create_dataset. In any case, I would like to hear from the authors if this is the correct way to handle the problem.

Thanks. For anyone has the same error, here is the snipet:

            tmp_frames = np.asarray(tmp_frames)
            h.create_dataset(key,data=tmp_frames,chunks=True)

@fjchange
Copy link
Owner

I have updated the codes of this part, thanks @chuong98 @luca-zanella-dvl

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

4 participants