mentian / object-deformnet

MIT License
118 stars 24 forks source link

About pose_data.py #10

Closed lhiceu closed 3 years ago

lhiceu commented 3 years ago

I am so sorry to trouble you. I was confused when I ran pose_data.py. Is it used to relabel and write a new .pkl file only for mug category? How to do with the other categories? I modified the path from ../data/results/nocs_results/val/ to ../data/gts/val/. Then, as you suggested, I add the following code:

            if 'handle_visibility' in nocs:
                gt_handle_visibility = nocs['handle_visibility']
                assert len(nocs['handle_visibility']) == len(gt_class_ids)
            else:
                gt_handle_visibility = np.ones_like(gt_class_ids)

But there are still mistakes. I check the results_real_test_{}_{}.pkll at ./NOCS/gt/real_test. They only have one key 'gt_RTs' like the following:

{'gt_RTs': array([[[-0.08540888, -0.06049078, -0.15215242, 0.42124944], [ 0.11055115, -0.14789181, -0.00325966, -0.26176407], [-0.12078065, -0.09259071, 0.10460977, 0.94286811], [ 0. , 0. , 0. , 1. ]],

   [[-0.17664521, -0.06370935, -0.04728206, -0.14555978],
    [ 0.07886463, -0.15358652, -0.08769011, -0.24302094],
    [-0.008651  , -0.09924865,  0.16605093,  1.18763963],
    [ 0.        ,  0.        ,  0.        ,  1.        ]],

   [[ 0.48531236, -0.13263202, -0.12733575, -0.30494184],
    [-0.01690129, -0.39007853,  0.34188713,  0.05244928],
    [-0.18308481, -0.3155648 , -0.36909733,  0.91378847],
    [ 0.        ,  0.        ,  0.        ,  1.        ]],

   [[-0.20929454, -0.06829979, -0.00570323,  0.15795401],
    [ 0.06239159, -0.18228103, -0.10668883, -0.32206444],
    [ 0.02836677, -0.10300651,  0.19257889,  1.12987919],
    [ 0.        ,  0.        ,  0.        ,  1.        ]],

   [[ 0.16513061, -0.06186272,  0.08991979, -0.24412596],
    [-0.10036745, -0.15014064,  0.08102373, -0.07852249],
    [ 0.04288286, -0.11318774, -0.15662159,  1.02920438],
    [ 0.        ,  0.        ,  0.        ,  1.        ]],

   [[ 0.17068051, -0.06556304,  0.01535379,  0.04655275],
    [-0.06110246, -0.13321694,  0.11038941, -0.17303414],
    [-0.02829731, -0.10779987, -0.14575519,  1.08886987],
    [ 0.        ,  0.        ,  0.        ,  1.        ]],

   [[-0.14795024, -0.10026765, -0.18662856,  0.28520438],
    [ 0.17137876, -0.19046816, -0.03353048, -0.24504754],
    [-0.1245519 , -0.14297327,  0.17555237,  1.03897479],
    [ 0.        ,  0.        ,  0.        ,  1.        ]]]), 'image_path': '/home/hewang/Projects/CoordRCNN/data/shapenet_toi_330K/real_test/scene_4/0448_color.png'}
gritYCDA commented 3 years ago

I got the same problem. how can handle the key error? key of real_test have only ['gt_RTs', 'image_path']

gritYCDA commented 3 years ago

I got the same problem. how can handle the key error? key of real_test have only ['gt_RTs', 'image_path']

  1. download https://drive.google.com/file/d/1p72NdY4Bie_sra9U8zoUNI4fTrQZdbnc/view
  2. unzip to "/data/results/nocs_results/val/"
William-Klay commented 2 years ago

@lhiceu Have u solved this problem? I cannot find other key like gt_class_ids in gts label

TAO-TAO-TAO-TAO-TAO commented 1 year ago

解决了这个问题吗?

in the https://drive.google.com/file/d/1p72NdY4Bie_sra9U8zoUNI4fTrQZdbnc/view, Still not ['gt_RTs', 'image_path']