rayat137 / Pose_3D

Exploiting temporal information for 3D pose estimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AssertionError: Expecting 2 sequences, found 0 instead

timtensor opened this issue · comments

Hi I have been trying to run the example , video on a pretrained model , with the project. It seems that i face some issues. I tried to loook into the search history but still could not run the example code.

I have the following directory structure

├── Actual_result.png
├── cameras.h5
├── cameras.py
├── create_movie.py
├── data
│   ├── h36m
│   │   ├── cameras.h5
│   │   ├── S1
│   │   │   ├── MyPoses
│   │   │   │   └── 3D_positions
│   │   │   │       ├── Directions 1.h5
│   │   │   │       ├── Directions.h5
│   │   │   │       ├── Discussion 1.h5
│   │   │   │       ├── Discussion.h5
│   │   │   │       ├── Eating 2.h5
│   │   │   │       ├── Eating.h5
│   │   │   │       ├── Greeting 1.h5
│   │   │   │       ├── Greeting.h5
│   │   │   │       ├── Phoning 1.h5
............
   └── preds_fed.h5
├── output_results
│   └── 00041_out.jpg
├── procrustes.py
├── __pycache__
│   ├── cameras.cpython-35.pyc
│   ├── data_util.cpython-35.pyc
│   ├── data_util_temporal.cpython-35.pyc
│   ├── procrustes.cpython-35.pyc
│   ├── temporal_model.cpython-35.pyc
│   └── viz.cpython-35.pyc
├── temporal_3d.py
├── temporal_model.py
├── trained_model
│   └── All
│       └── dropout_0.5
│           └── epochs_100
│               └── adam
│                   └── lr_1e-05
│                       └── linear_size1024
│                           └── batch_size_32
│                               └── use_stacked_hourglass
│                                   └── seqlen_5
│                                       ├── checkpoint
│                                       ├── checkpoint-1798202.index
│                                       └── checkpoint-1798202.meta
└── viz.py

I followd a previous issue to solve the problem but could not manage to solve the error. Is there some specific settings , i need to do or change.

OS Ubuntu 16.04
Python3

Error log
/Pose_3D/temporal_3d_release/data_util.py", line 177, in load_data assert loaded_seqs == 2, "Expecting 2 sequences, found {0} instead".format( loaded_seqs ) AssertionError: Expecting 2 sequences, found 0 instead :~/pf/Pose_3D/temporal_3d_release$

Hello sorry for responding late. It looks like there is some issue with reading the 3D data. Please check if you are referring to the correct data directory or not.

Hi @rayat137 , could you tell me , Is it the same , data directory that is provided by 3d pose baseline ? Or is to be generated ? I am trying to visualize using the pre trained model you provided.

The 3D data directory is same as 3d pose baseline. The generated results will be saved in the directory specified by the flag output_dir. Set --data_2d_path and --image_dir appropriately for input 2D pose and the input image directory.

Hi @rayat137 , I am a bit confused on what you had mentioned. Isnt 3D Data from 3d-pose-baseline the training data ? Maybe i am getting confused totally . Ill try to summarize , how i interpret it

  1. Copy the H36 data from pose -3d
  2. Extract and put the top level of the data
  3. Copy and untar the pre trained model as follows Pose_3D/temporal_3d_release/trained_model/All/dropout_0.5/epochs_100/adam/lr_1e-05/linear_size1024/batch_size_32/use_stacked_hourglass/seqlen_5/
  4. Evaluate the movie python create_movie.py --use_sh --camera_frame
  5. I feel i have missed out a step or so , inorder to execute the whole chain . Please let me know .

Yes, 3D data from 3d-pose-baseline is the training data. Our network predicts normalized 3d poses. So we need the mean and the standatd deviation of the training data to un_normalize them for visualization or doing quantitative analysis. The sequence you followed seemed alright to me. You also need to normalize the 2d pose properly before passing them as input with correct mean and standard deviation.

make sure you supply the data path with --data_dir, including the 'h36m' folder.