mks0601 / V2V-PoseNet_RELEASE

Official Torch7 implementation of "V2V-PoseNet: Voxel-to-Voxel Prediction Network for Accurate 3D Hand and Human Pose Estimation from a Single Depth Map", CVPR 2018
https://arxiv.org/abs/1711.07399
MIT License
377 stars 69 forks source link

Which hdf5 lua package do you use to load ITOP dataset? #20

Closed i3oi3o closed 6 years ago

i3oi3o commented 6 years ago

I think that the current hdf5 version cannot read float 16 bit.

source code: https://github.com/deepmind/torch-hdf5/blob/master/luasrc/ffi.lua This is from the line 325th.

 elseif className == 'FLOAT' then
        if size == 4 then
            return 'torch.FloatTensor'
        end
        if size == 8 then
            return 'torch.DoubleTensor'
        end
        error("Cannot support reading float data with size = " .. size .. " bytes")

ITOP use float 16 bit on real_world_coordinates label.

mks0601 commented 6 years ago

Hi, I came across the same issue, however the error comes from the ITOP used 2 bit, not a 16 bit. Anyway, I modified the ffi.lua file to

 elseif className == 'FLOAT' then
        if size == 2 or size == 4 then
            return 'torch.FloatTensor'
        end
        if size == 8 then
            return 'torch.DoubleTensor'
        end
        error("Cannot support reading float data with size = " .. size .. " bytes")

then, it worked. Note that all I did is to add size == 2 condition on the original code.

i3oi3o commented 6 years ago

Thank you.

By the way, 1 byte = 8 bit.