JDAI-CV/DSD-SATN

run demo error

skcskc7 opened this issue · 3 comments

As you suggested in the instruction, I installed requirement and ran run.sh and got the following error:

----------------
Configuration:
{'tab': 'single_h36m_g0', 'eval': True, 'eval_pw3d': False, 'online': False, 'videofile': './demo/demo.mp4', 'save_path_video': './result.avi', 'internet': False, 'test_single': True, 'inimg_dir': '/home/resources/image', 'visual_all': False, 'save_smpl_params': False, 'save_obj': False, 'with_kps': False, 'kps_type': 'kps_alpha', 'alpha_format': 'mpii', 'feature_num_deconv': 256, 'num_backbone_layers': 50, 'gmodel_path': '/home/trained_model/single_frame_dsd_model.pkl', 'dmodel_path': '/home/trained_model/D_single_frame_dsd_model.pkl', 'best_save_path': '/home/trained_model/single_frame_dsd_model.pkl', 'video': False, 'shuffle_aug': False, 'receptive_field': 9, 'self_attention': True, 'shuffle_smooth_loss': True, 'attention_layer': 2, 'epoch': 40, 'fine_tune': False, 'fit_epoch': 0, 'val_iter': 2000, 'lr': 0.0001, 'gpu': '0', 'batch_size': 16, 'val_batch_size': 16, 'nw': 6, 'features_type': 1, 'pix_format': 'NCHW', 'use_flip': False, 'normalize': True, 'video_clips_input': False, 'use_cropped_img': False, 'adjust_lr_factor': 0.1, 'with_mpjpeloss': True, 'with_constloss': False, 'best': 48.0, 'best_mpjpe': 68.0, 'best_pw3d': 48.0, 'best_mpjpe_pw3d': 68.0, 'dataset_rootdir': '/home/../../dataset/', 'dataset': 'h36m', 'with_h36m': True, 'with_up': False, 'with_mpii': False, 'with_aich': False, 'with_mpv': False, 'with_iv': False, 'with_pa': False, 'with_df': False, 'use_all_subject': False, 'eval_protocol': 1, 'kp3d_num': 14, 'kp3d_24': False, 'eval_with_single_frame_network': False, 'high_resolution': False, 's': 1, 'save_features': False, 'get_features': False, 'save_best_folder': '/home/trained_model/', 'log_path': '/home/src/log/', 'hmr_video_mode': False, 'coco25_regressor_path': '/home/model/neutral_smpl_with_cocoplustoesankles_reg.pkl', 'total_param_count': 85, 'smpl_mean_param_path': '/home/model/neutral_smpl_mean_params.h5', 'smpl_model': '/home/model/neutral_smpl_with_cocoplus_reg.txt', 'h36m_path': '/home/annotations/h36m', 'aich_path': '/media/sunyu/sunyu1/dataset/ai_challenger', 'mpii_path': '/media/sunyu/sunyu1/dataset/mpii', 'up_path': '/media/sunyu/sunyu1/dataset/UP', 'pw3d_path': '/home/annotations/3DPW', 'mosh_path': '/media/sunyu/sunyu1/dataset/mosh_gen', 'regre_weight': 10.0, 'pose_weight': 20.0, 'shape_weight': 0.6, 'mpjpe_weight': 60.0, 'pampjpe_weight': 80.0, 'kp_weight': 10.0, 'const_weight': 0, 'disc_weight': 0.1, 'shuffle_weight': 0, 'filter_widths': [3, 3], 'features_channels': 512, 'feature_name': 'bilinear_features', 'eval_mode': 'all'}
----------------
with_kps: False type: kps_alpha format: mpii
datasets: h36m
----------------
Traceback (most recent call last):
  File "test.py", line 108, in <module>
    main()
  File "test.py", line 104, in main
    demo = Demo()
  File "test.py", line 8, in __init__
    super(Demo, self).__init__()
  File "/home/src/base.py", line 42, in __init__
    self.write2log('================ Training Loss (%s) ================\n' % time.strftime("%c"))
  File "/home/src/base.py", line 179, in write2log
    with open(self.log_file, "a") as log_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/src/log/single_h36m_g0.log'

I guess the /home/src/log/single_h36m_g0.log file doesn't exist. Where can I download this file?

As an additional question, can you perform inference on a video rather than a single photo?
How can i do this?

Thank you

Sorry for the error.
The function self.write2log is just to save the result to a log file. You can just delete there lines.
I have checked the code. The current version just add a line
os.makedirs(self.log_path,exist_ok=True)
before
self.log_file = os.path.join(self.log_path,'{}.log'.format(self.tab)) self.write2log('================ Training Loss (%s) ================\n' % time.strftime("%c"))

Besides, the version of video/webcam will be released later.
Thanks for your kind note! Please let me know if any bug occurs.

We set an args options --high_resolution in the src/config.py, if you run with this option, the result will be in 500*500, like;
CUDA_VISIBLE_DEVICES=0 python3 test.py --gpu=0 --tab=demo --dataset=lsp --val_batch_size=16 --eval --test-single --high_resolution
Actually, the limitation of max resolution (500*500) is brought by neural renderer.
If you replace the default neural renderer with any other renderer, like opendr, this limitation could be broken.
Thanks for your interest!