How do you run the following script for both train and test portions of HICO-DET dataset since, in step 4, I had to run it separately for the train and test portion?
The script/assign_pose_GT.py dumps the results into a file called Data/Trainval_GT_HICO_with_idx.pkl
Do you only run it on the train portion of the hico_det dataset? I ask because I ran it on the test portion of the hico_det dataset and didn't get an error however the following lines of the script perhaps hint we should run it on the train portion?
Previously, I ran the following two scripts in step 4 of data processing:
For test portion of HICO-DET:
python smplifyx/main.py --config cfg_files/fit_smplx.yaml --data_folder ../../data/smplify-x/djrn_test_data/ --output_folder ../../data/smplify-x/djrn_test_results --visualize="False" --model_folder ../../data/smplify-x/models_smplx_v1_1/models/smplx/SMPLX_NEUTRAL.npz --vposer_ckpt ../../data/smplify-x/vposer_v1_0 --part_segm_fn ../../data/smplify-x/smplx_parts_segm.pkl
Additionally, if you could please provide some comments on what this script does at a higher level? That would be very helpful.
if os.path.exists(os.path.join(args.pose, 'HICO_train2015_%08d_keypoints.json' % key)):
f = json.load(open(os.path.join(args.pose, 'HICO_train2015_%08d_keypoints.json' % key)))
for i in range(len(f['people'])):
tmp = np.array(f['people'][i]['pose_keypoints_2d'])
if not os.path.exists(os.path.join(args.res, 'results/HICO_train2015_%08d/%03d.pkl' % (key, i))):
continue
body_pose = tmp.reshape(-1, 3)[body25_to_coco, :2]
tmp_sum = np.sum(body_pose, axis=1)
sel = np.where(tmp_sum > 0)[0]
body_pose = body_pose[sel, :]
for j in range(len(data[key])):
if data[key][j][5] is not None:
alphapose = np.array(data[key][j][5]).reshape(-1, 3)[sel, :2]
dis = calc_mse(body_pose, alphapose)
if (used[j] < 0 and dis < 500) or (dis < used[j]):
used[j] = dis
data[key][j][-1] = i
pickle.dump(data, open('Data/Trainval_GT_HICO_with_idx.pkl', 'wb'), protocol=2)
How do you run the following script for both train and test portions of HICO-DET dataset since, in step 4, I had to run it separately for the train and test portion?
The
script/assign_pose_GT.py
dumps the results into a file calledData/Trainval_GT_HICO_with_idx.pkl
$ python script/assign_pose_GT.py --pose ../../data/smplify-x/djrn_test_data/ --res ../../data/smplify-x/djrn_test_results
Do you only run it on the train portion of the hico_det dataset? I ask because I ran it on the test portion of the hico_det dataset and didn't get an error however the following lines of the script perhaps hint we should run it on the train portion?
Previously, I ran the following two scripts in step 4 of data processing:
For train portion of HICO-DET:
For test portion of HICO-DET:
python smplifyx/main.py --config cfg_files/fit_smplx.yaml --data_folder ../../data/smplify-x/djrn_test_data/ --output_folder ../../data/smplify-x/djrn_test_results --visualize="False" --model_folder ../../data/smplify-x/models_smplx_v1_1/models/smplx/SMPLX_NEUTRAL.npz --vposer_ckpt ../../data/smplify-x/vposer_v1_0 --part_segm_fn ../../data/smplify-x/smplx_parts_segm.pkl
Additionally, if you could please provide some comments on what this script does at a higher level? That would be very helpful.