asanakoy / deeppose_tf

DeepPose implementation on TensorFlow. Original Paper http://arxiv.org/abs/1312.4659
Other
144 stars 61 forks source link

IndexError: list index out of range #10

Closed leewonjiin closed 6 years ago

leewonjiin commented 6 years ago
  bash examples/train_lsp_alexnet_imagenet.sh 

Elapsed time for finding uninitialized variables: 0.42s Elapsed time to init them: 0.16s args.resume: False args.snapshot: /home/wonjinlee/deeppose/weights/bvlc_alexnet.tf Reading dataset from /home/wonjinlee/data/lsp/train_joints.csv 0it [00:00, ?it/s] Traceback (most recent call last): File "/home/wonjinlee/deeppose/scripts/train.py", line 233, in main(sys.argv[1:]) File "/home/wonjinlee/deeppose/scripts/train.py", line 168, in main downscale_height=args.downscale_height File "/home/wonjinlee/deeppose/scripts/dataset.py", line 37, in init self.load_images() File "/home/wonjinlee/deeppose/scripts/dataset.py", line 129, in load_images print('Joints shape:', self.joints[0][1].shape) IndexError: list index out of range

How could I deal with this kind of error?

asanakoy commented 6 years ago

@leewonjiin check what is inside variable self.joints. self.joints must be a lsit of pairs (image_id, joints). Looks like joints are not properly read from disk (empty list).

leewonjiin commented 6 years ago

Okay, I have another question. I tried to train mpii datasets, and it runs well for a while, but it show error messages like this

Traceback (most recent call last): File "examples/train_mpii_alexnet_scratch.py", line 46, in scripts.train.main(argv) File "/home/wonjinlee/deeppose/scripts/train.py", line 228, in main output_dir=args.o_dir File "/home/wonjinlee/deeppose/scripts/train.py", line 73, in train_loop tag_prefix='test') File "/home/wonjinlee/deeppose/scripts/regressionnet.py", line 321, in evaluate_pcp metric_name='PCP') File "/home/wonjinlee/deeppose/scripts/regressionnet.py", line 225, in calculate_metric gt_joints = convert2canonical(gt_joints) File "/home/wonjinlee/deeppose/poseevaluation/lsp.py", line 88, in convert2canonical assert joints.shape[1:] == (14, 2), 'LSP must contain 14 joints per person' AssertionError: LSP must contain 14 joints per person

Is this means I should train lsp dataset first?

asanakoy commented 6 years ago

This means that either the lsp dataset was changed and has more joint than before or the data is corrupted. Every person must have exactly 14 joints.

leewonjiin commented 6 years ago

I think variable of self.joints is right.

        self.joints.append((image_id, joints))
        self.info.append((is_valid_joints, bbox))
    print('Joints shape:', self.joints[0][1].shape)
asanakoy commented 6 years ago

Closed due to the lack of activity