LSPS
LSPS copied to clipboard
Pose train on NYU dataset: IndexError: index 0 is out of bounds for axis 0 with size 0
When I run the following command on NYU dataset:
$ python pose_train.py --config ../exps/nnyu.yaml
I get the following error:
IndexError: index 0 is out of bounds for axis 0 with size 0
Detailed Verbose
self.image_display_iterations=100
self.image_save_iterations=2500
self.snapshot_save_iterations=25000
self.snapshot_prefix='../outputs/nnyu/pre'
self.hyperparameters={'trainer': 'LSPSTrainer', 'll_loss_vae': 100, 'll_map_w': 1000, 'map': {'input_dim': 20, 'output_dim': 32, 'name': 'Mapping', 'output_ch': 256}, 'kl_cycle_link_w': 0.1, 'gan_w': 10.0, 'batch_size': 32, 'll_direct_link_w': 100, 'train_map': False, 'gen': {'ch': 64, 'name': 'SharedResGen', 'n_gen_front_blk': 3, 'n_enc_front_blk': 3, 'input_dim_a': 1, 'n_enc_shared_blk': 1, 'input_dim_b': 1, 'n_gen_res_blk': 3, 'n_enc_res_blk': 3, 'n_gen_shared_blk': 1}, 'vae': {'input_dim': 108, 'z_dim': 20, 'name': 'poseVAE', 'h_dim': 50}, 'feature_w': 0.001, 'max_iterations': 500000, 'll_map_z_w': 1000, 'kl_loss_vae': 0.1, 'batch_size_pose': 64, 'reg_w': 10.0, 'lr': 0.0001, 'feature_w_reg': 10.0, 'kl_direct_link_w': 0.1, 'll_cycle_link_w': 100, 'dis': {'ch': 64, 'name': 'SharedDis', 'input_dim_a': 1, 'n_shared_layer': 4, 'input_dim_b': 1, 'n_front_layer': 2, 'reg_dim': 108, 'post_dim': 20}}
self.datasets={'train_a': {'subset': 'train_synth', 'augment': True, 'class_name': 'dataset_hand_NYU', 'sample_poses': 250000, 'seed': 23455, 'joint_subset': 'NYU', 'docom': False, 'root': '/media/nxgdl/New Volume/SurajDL_UbuntuData/HandDataset/dataset'}, 'train_b': {'subset': 'train', 'augment': True, 'class_name': 'dataset_hand_NYU', 'sample_poses': 250000, 'seed': 23455, 'joint_subset': 'NYU', 'docom': False, 'root': '/media/nxgdl/New Volume/SurajDL_UbuntuData/HandDataset/dataset'}, 'test_b': {'class_name': 'dataset_hand_NYU_test', 'subset': 'test', 'docom': False, 'seed': 23455, 'root': '/media/nxgdl/New Volume/SurajDL_UbuntuData/HandDataset/dataset'}}
self.display=10
dataset=dataset_hand_NYU(conf)
create data
(300, 300, 300)
Loading cache data from ../../cache//NYUImporter_train_synth_None_True_32_gt_300__cache.pkl
Shuffling
data loaded with 72757 samples
dataset=dataset_hand_NYU(conf)
create data
Traceback (most recent call last): |
File "pose_train.py", line 193, in
`
i meet same error too
When I run the following command on NYU dataset:
$ python pose_train.py --config ../exps/nnyu.yaml
I get the following error:
IndexError: index 0 is out of bounds for axis 0 with size 0
Detailed Verbose
self.image_display_iterations=100 self.image_save_iterations=2500 self.snapshot_save_iterations=25000 self.snapshot_prefix='../outputs/nnyu/pre' self.hyperparameters={'trainer': 'LSPSTrainer', 'll_loss_vae': 100, 'll_map_w': 1000, 'map': {'input_dim': 20, 'output_dim': 32, 'name': 'Mapping', 'output_ch': 256}, 'kl_cycle_link_w': 0.1, 'gan_w': 10.0, 'batch_size': 32, 'll_direct_link_w': 100, 'train_map': False, 'gen': {'ch': 64, 'name': 'SharedResGen', 'n_gen_front_blk': 3, 'n_enc_front_blk': 3, 'input_dim_a': 1, 'n_enc_shared_blk': 1, 'input_dim_b': 1, 'n_gen_res_blk': 3, 'n_enc_res_blk': 3, 'n_gen_shared_blk': 1}, 'vae': {'input_dim': 108, 'z_dim': 20, 'name': 'poseVAE', 'h_dim': 50}, 'feature_w': 0.001, 'max_iterations': 500000, 'll_map_z_w': 1000, 'kl_loss_vae': 0.1, 'batch_size_pose': 64, 'reg_w': 10.0, 'lr': 0.0001, 'feature_w_reg': 10.0, 'kl_direct_link_w': 0.1, 'll_cycle_link_w': 100, 'dis': {'ch': 64, 'name': 'SharedDis', 'input_dim_a': 1, 'n_shared_layer': 4, 'input_dim_b': 1, 'n_front_layer': 2, 'reg_dim': 108, 'post_dim': 20}} self.datasets={'train_a': {'subset': 'train_synth', 'augment': True, 'class_name': 'dataset_hand_NYU', 'sample_poses': 250000, 'seed': 23455, 'joint_subset': 'NYU', 'docom': False, 'root': '/media/nxgdl/New Volume/SurajDL_UbuntuData/HandDataset/dataset'}, 'train_b': {'subset': 'train', 'augment': True, 'class_name': 'dataset_hand_NYU', 'sample_poses': 250000, 'seed': 23455, 'joint_subset': 'NYU', 'docom': False, 'root': '/media/nxgdl/New Volume/SurajDL_UbuntuData/HandDataset/dataset'}, 'test_b': {'class_name': 'dataset_hand_NYU_test', 'subset': 'test', 'docom': False, 'seed': 23455, 'root': '/media/nxgdl/New Volume/SurajDL_UbuntuData/HandDataset/dataset'}} self.display=10 dataset=dataset_hand_NYU(conf) create data (300, 300, 300) Loading cache data from ../../cache//NYUImporter_train_synth_None_True_32_gt_300__cache.pkl Shuffling data loaded with 72757 samples dataset=dataset_hand_NYU(conf) create data Traceback (most recent call last): | File "pose_train.py", line 193, in main(sys.argv) File "pose_train.py", line 86, in main dataset_b = get_dataset(config.datasets['train_b']) File "/home/nxgdl/HandModule/Codes/LSPS/src/common.py", line 13, in get_dataset exec ("dataset=%s(conf)" % conf['class_name']) File "", line 1, in File "/home/nxgdl/HandModule/Codes/LSPS/src/data/dataset_hand2.py", line 297, in init self.Seq = self.di.loadSequence(subset, rng=self.rng, shuffle=True, docom=docom) File "/home/nxgdl/HandModule/Codes/LSPS/src/data/importers.py", line 1114, in loadSequence dpt, M, com = hd.cropArea3D(com=gtorig[self.crop_joint_idx], size=config['cube'], docom=docom) File "/home/nxgdl/HandModule/Codes/LSPS/src/utils/handdetector.py", line 470, in cropArea3D ret = numpy.ones(dsize, numpy.float32) * self.getNDValue() # use background as filler File "/home/nxgdl/HandModule/Codes/LSPS/src/utils/handdetector.py", line 132, in getNDValue return stats.mode(self.dpt[self.dpt > self.maxDepth])[0][0] IndexError: index 0 is out of bounds for axis 0 with size 0`
`
Hi,
I see you are retraining the model. I want to know if you have successfully generated the model. If you have generated it, can you send it to me?
Hi all,
Do you have your data in a proper folder to load?
I think this error is due to self.dpt being null.
You should set the dataset path (in yaml file) to where the your data is located (see nnyu.yaml line 65).
Hi all,
Do you have your data in a proper folder to load?
I think this error is due to self.dpt being null.
You should set the dataset path (in yaml file) to where the your data is located (see nnyu.yaml line 65).
Hi, If youtube video is realtime predict? Can you share the script?
Hi all,
Do you have your data in a proper folder to load?
I think this error is due to self.dpt being null.
You should set the dataset path (in yaml file) to where the your data is located (see nnyu.yaml line 65).
Hi,
I am facing the same error, and I have set correctly the path to the dataset folder. Any other idea of where the problem comes from?
Thanks in advance