DirtyHarryLYL / DJ-RN

As a part of HAKE project (HAKE-3D). Code for our CVPR2020 paper "Detailed 2D-3D Joint Representation for Human-Object Interaction".
Apache License 2.0
100 stars 13 forks source link

Error in concat_w2v.py #29

Closed mohammad749 closed 3 years ago

mohammad749 commented 3 years ago

hello when run "python script/concat_w2v.py --SMPLX_PATH --GT ./Data/Trainval_GT_HICO_with_idx.pkl --Neg Trainval_Neg_HICO_with_idx.pkl --Test Test_Faster_RCNN_R-50-PFN_2x_HICO_DET_with_idx.pkl" I have following error: pc = pickle.load(open(args.SMPLX_PATH + '/object_GT/HICOtrain2015%08d/%03d_feature.pkl' % i, 'rb')) TypeError: not enough arguments for format string when I replace this line with "pc = pickle.load(open(args.SMPLX_PATH + '/object_GT/HICOtrain2015%08d/%03d_feature.pkl' % (key, Trainval_GT[key][i][-1]), 'rb'))" I have following error: FileNotFoundError: [Errno 2] No such file or directory: 'F:/DJ-RN-master/DJ-RN-master/Spatial/object_GT/HICO_train2015_00000004/001_feature.pkl' This is because in the folder "results\HICO_train2015_00000004" ] : I have 000.pkl, 001.pkl and 002.pkl but in folder "object_GT\HICO_train2015_00000004" I have only 000_feature.pkl and not 001_feature.pkl and 002_feature.pkl. Did I make a mistake or does the code need to be corrected?

mohammad749 commented 3 years ago

Yes, I know that. I have two questions 1- In folder args.SMPLX_PATH/results/HICO_train2015_00000004 I have 000.pkl, 001.pkl and 002.pkl but in folder args.SMPLX_PATH/object_GT/HICO_train2015_00000004, I have just 000_feature.pkl and I dont have 001_feature.pkl and 002_feature.pkl. This leads the following error: No such file or directory: '.../object_GT/HICO_train2015_00000004/001_feature.pkl'

2- What is the second argument beside i in this line? pc = pickle.load(open(args.SMPLX_PATH + '/object_GT/HICOtrain2015%08d/%03d_feature.pkl' % i, 'rb'))

Foruck commented 3 years ago

Thanks for pointing out. And we have updated the code. For Q1, with the updated code, this error shouldn't happen if all the steps before are well-performed. For Q2, it should be the (key, i). We have fixed that.

mohammad749 commented 3 years ago

thanks With this correction, it still gives me an error, and the reason is that for some images, such as picture HICO_train2015_00000011.jpg, two rows i=0 and i=1 have a value of zero in Trainval_GT[key][i][-1], but just exist 000_feature.pkl and this causes an error. In my opinion, the file assign_pose_GT.py in line data[key][j][-1] = i should be reviewed.

mohammad749 commented 3 years ago

Should not be replaced (key, i) with (key, Trainval_GT[key][i][-1])?

Foruck commented 3 years ago

Would you mind providing the detailed commands you used for data generation, specifically step 5, 6, 7?

monacv commented 3 years ago

@mohammad749 how did you fix this error?

also https://github.com/DirtyHarryLYL/DJ-RN/issues/66

Thanks a lot

monacv commented 3 years ago

@mohammad749 could you please share your script/concat_w2v.py ? my email is jalal@bu.edu thank you so much :)