QitaoZhao / PoseFormerV2

The project is an official implementation of our paper "PoseFormerV2: Exploring Frequency Domain for Efficient and Robust 3D Human Pose Estimation".
MIT License
246 stars 29 forks source link

AttributeError: 'NoneType' object has no attribute 'astype' #30

Closed ZivDk closed 8 months ago

ZivDk commented 8 months ago

Thank you very much for your work. when I run this command _python run_poseformer.py -d h36m -k gt -c checkpoint -g 0 --evaluate 27_24345.2.bin --render --viz-subject S11 --viz-action Walking --viz-camera 0 --viz-export output3d , I encountered the following issue.

Traceback (most recent call last): File "/home/dvlab/PoseFormerV2-main/run_poseformer.py", line 574, in module prediction = evaluate(gen, return_predictions=True) File "/home/dvlab/PoseFormerV2-main/run_poseformer.py", line 481, in evaluate cam = torch.from_numpy(cam.astype('float32')) AttributeError: 'NoneType' object has no attribute 'astype'

I had already modified the code, and I check if cam had exact value.

test_generator = UnchunkedGenerator(cameras_valid, poses_valid, poses_valid_2d, pad=pad, causal_shift=causal_shift, augment=False, kps_left=kps_left, kps_right=kps_right, joints_left=joints_left, joints_right=joints_right)


class UnchunkedGenerator: def init(self, cameras, poses_3d, poses_2d, pad=0, causal_shift=0, augment=False, kps_left=None, kps_right=None, joints_left=None, joints_right=None): assert poses_3d is None or len(poses_3d) == len(poses_2d) assert cameras is None or len(cameras) == len(poses_2d) print("cameras 3 :",cameras )

its value is a list:

Details

cameras 3 : [array([ 2.29009891e+00, 2.28756237e+00, 2.50830650e-02, 2.89029814e-02, -2.07098916e-01, 2.47775182e-01, -3.07515031e-03, -9.75698873e-04, -1.42447161e-03, 4.36662363e-01, 0.00000000e+00, -1.09528303e-02, 0.00000000e+00, 4.37146551e-01, -1.26348389e-02, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29935122e+00, 2.29518342e+00, 1.76972151e-02, 1.61298513e-02, -1.94213629e-01, 2.40408540e-01, 6.81997556e-03, -1.61902665e-03, -2.74089444e-03, 4.34905287e-01, 0.00000000e+00, -7.69661227e-03, 0.00000000e+00, 4.35695026e-01, -7.02769589e-03, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29828143e+00, 2.29759789e+00, 3.96317244e-02, 2.80535221e-03, -2.08338186e-01, 2.55488008e-01, -2.46049743e-03, 1.48438697e-03, -7.59999326e-04, 4.35107723e-01, 0.00000000e+00, -1.72440689e-02, 0.00000000e+00, 4.35237169e-01, -1.22099358e-03, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29102278e+00, 2.28954792e+00, 2.99364328e-02, 1.76403334e-03, -1.98384091e-01, 2.18323678e-01, -8.94780736e-03, -5.87205577e-04, -1.81336200e-03, 4.36486276e-01, 0.00000000e+00, -1.30668422e-02, 0.00000000e+00, 4.36767447e-01, -7.70472339e-04, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29009891e+00, 2.28756237e+00, 2.50830650e-02, 2.89029814e-02, -2.07098916e-01, 2.47775182e-01, -3.07515031e-03, -9.75698873e-04, -1.42447161e-03, 4.36662363e-01, 0.00000000e+00, -1.09528303e-02, 0.00000000e+00, 4.37146551e-01, -1.26348389e-02, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29935122e+00, 2.29518342e+00, 1.76972151e-02, 1.61298513e-02, -1.94213629e-01, 2.40408540e-01, 6.81997556e-03, -1.61902665e-03, -2.74089444e-03, 4.34905287e-01, 0.00000000e+00, -7.69661227e-03, 0.00000000e+00, 4.35695026e-01, -7.02769589e-03, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29828143e+00, 2.29759789e+00, 3.96317244e-02, 2.80535221e-03, -2.08338186e-01, 2.55488008e-01, -2.46049743e-03, 1.48438697e-03, -7.59999326e-04, 4.35107723e-01, 0.00000000e+00, -1.72440689e-02, 0.00000000e+00, 4.35237169e-01, -1.22099358e-03, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29102278e+00, 2.28954792e+00, 2.99364328e-02, 1.76403334e-03, -1.98384091e-01, 2.18323678e-01, -8.94780736e-03, -5.87205577e-04, -1.81336200e-03, 4.36486276e-01, 0.00000000e+00, -1.30668422e-02, 0.00000000e+00, 4.36767447e-01, -7.70472339e-04, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29009891e+00, 2.28756237e+00, 2.50830650e-02, 2.89029814e-02, -2.07098916e-01, 2.47775182e-01, -3.07515031e-03, -9.75698873e-04, -1.42447161e-03, 4.36662363e-01, 0.00000000e+00, -1.09528303e-02, 0.00000000e+00, 4.37146551e-01, -1.26348389e-02, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]), array([ 2.29935122e+00, 2.29518342e+00, 1.76972151e-02, 1.61298513e-02, -1.94213629e-01, 2.40408540e-01, 6.81997556e-03, -1.61902665e-03, -2.74089444e-03, 4.34905287e-01, 0.00000000e+00, -7.69661227e-03, 0.00000000e+00, 4.35695026e-01, -7.02769589e-03, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00])

I have no idea where the bug is. Thanks for your help

QitaoZhao commented 8 months ago

Some parts of the command (--render --viz-subject S11 --viz-action Walking --viz-camera 0 --viz-export output3d) are not available in our code. Please follow the instructions in README.md to train or evaluate.

ZivDk commented 8 months ago

oh I see, thank you very much it successfully works