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

when using human_body_prior module for smplify-x for preprocessing the HICO-DET image dataset I get best_model_fname = sorted(glob.glob(os.path.join(expr_dir, 'snapshots', '*.pt')), key=os.path.getmtime)[-1] IndexError: list index out of range #46

Closed monacv closed 3 years ago

monacv commented 3 years ago

Could you please have a look at the following error and guide me? Thanks a lot.


(smplifyx) [jalal@goku smplify-x]$ ./djrn_fit.sh 
Processing: ../../data/smplify-x/djrn_train_data/images/HICO_train2015_00000001.jpg
Traceback (most recent call last):
  File "smplifyx/main.py", line 272, in <module>
    main(**args)
  File "smplifyx/main.py", line 245, in main
    fit_single_frame(img, keypoints[[person_id]],
  File "/scratch3/research/code/smplify-x/smplifyx/fit_single_frame.py", line 188, in fit_single_frame
    vposer, _ = load_vposer(vposer_ckpt, vp_model='snapshot')
  File "/scratch3/venv/smplifyx/lib/python3.8/site-packages/human_body_prior/tools/model_loader.py", line 56, in load_vposer
    ps, trained_model_fname = expid2model(expr_dir)
  File "/scratch3/venv/smplifyx/lib/python3.8/site-packages/human_body_prior/tools/model_loader.py", line 31, in expid2model
    best_model_fname = sorted(glob.glob(os.path.join(expr_dir, 'snapshots', '*.pt')), key=os.path.getmtime)[-1]
IndexError: list index out of range
Processing: ../../data/smplify-x/djrn_test_data/images/HICO_test2015_00000002.jpg
Traceback (most recent call last):
  File "smplifyx/main.py", line 272, in <module>
    main(**args)
  File "smplifyx/main.py", line 245, in main
    fit_single_frame(img, keypoints[[person_id]],
  File "/scratch3/research/code/smplify-x/smplifyx/fit_single_frame.py", line 188, in fit_single_frame
    vposer, _ = load_vposer(vposer_ckpt, vp_model='snapshot')
  File "/scratch3/venv/smplifyx/lib/python3.8/site-packages/human_body_prior/tools/model_loader.py", line 56, in load_vposer
    ps, trained_model_fname = expid2model(expr_dir)
  File "/scratch3/venv/smplifyx/lib/python3.8/site-packages/human_body_prior/tools/model_loader.py", line 31, in expid2model
    best_model_fname = sorted(glob.glob(os.path.join(expr_dir, 'snapshots', '*.pt')), key=os.path.getmtime)[-1]
IndexError: list index out of range

The script is:

(smplifyx) [jalal@goku smplify-x]$ cat ./djrn_fit.sh 
export CUDA_VISIBLE_DEVICES=0
python smplifyx/main.py --config cfg_files/fit_smplx.yaml --data_folder ../../data/smplify-x/djrn_train_data/ --output_folder ../../data/smplify-x/djrn_train_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

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

and

(smplifyx) [jalal@goku smplify-x]$ ls ../../data/smplify-x/djrn_train_data/images/HICO_train2015_00000001.jpg
-rwxr-xr-x. 1 jalal cs-grad 63K May 21 17:29 ../../data/smplify-x/djrn_train_data/images/HICO_train2015_00000001.jpg
monacv commented 3 years ago

Problem fixed. I was missing the vposer folder

$ scp -r vposer_v1_0/ jalal@goku.bu.edu:/scratch3/research/data/smplify-x
jalal@goku.bu.edu's password: 
.DS_Store                                                                             100% 6148   298.3KB/s   00:00    
._.DS_Store                                                                           100% 4096   204.3KB/s   00:00    
._snapshots                                                                           100% 4096   221.3KB/s   00:00    
._TR00_004_00_WO_accad.ini                                                            100% 4096   207.0KB/s   00:00    
._version.txt                                                                         100% 4096    10.3KB/s   00:00    
._vposer_smpl.py                                                                      100% 4096   193.7KB/s   00:00    
._TR00_E096.pt                                                                        100% 4096   219.5KB/s   00:00    
TR00_E096.pt                                                                          100% 2640KB 655.3KB/s   00:04    
TR00_004_00_WO_accad.ini                                                              100%  515    41.3KB/s   00:00    
version.txt                                                                           100%   88     5.8KB/s   00:00    
vposer_smpl.py                                                                        100% 6094   403.5KB/s   00:00    
vposer_smpl.cpython-38.pyc                                                            100% 4862    41.1KB/s   00:00