princeton-vl/pose-hg-train

Unable to run final prediction

lming opened this issue · 4 comments

lming commented

Hi,

I've tried to run the final prediction with the model file downloaded from your website, but get an error. Could you help? Thanks!

th main.lua -expID finalp -finalPredictions -nEpochs 0 -loadModel umich-stacked-hourglass.t7

Input is a tensor with dimensions: 3 x 256 x 256
Output is a table
         Entry 1 is a tensor with dimensions: 16 x 64 x 64
         Entry 2 is a tensor with dimensions: 16 x 64 x 64
         Entry 3 is a tensor with dimensions: 16 x 64 x 64
         Entry 4 is a tensor with dimensions: 16 x 64 x 64
         Entry 5 is a tensor with dimensions: 16 x 64 x 64
         Entry 6 is a tensor with dimensions: 16 x 64 x 64
         Entry 7 is a tensor with dimensions: 16 x 64 x 64
         Entry 8 is a tensor with dimensions: 16 x 64 x 64
==> Loading model from: ../../pose-hg-demo/umich-stacked-hourglass.t7
==> Converting model to CUDA
==> Generating predictions...
/home/ming/torch/install/bin/luajit: /home/ming/torch/install/share/lua/5.1/nn/MSECriterion.lua:13: attempt to index local 'input' (a nil value)
stack traceback:
        /home/ming/torch/install/share/lua/5.1/nn/MSECriterion.lua:13: in function 'updateOutput'
        ...ing/torch/install/share/lua/5.1/nn/ParallelCriterion.lua:23: in function 'forward'
        /home/ming/pose-hg-train/src/train.lua:47: in function 'step'
        /home/ming/pose-hg-train/src/train.lua:106: in function 'predict'
        main.lua:38: in main chunk
        [C]: in function 'dofile'
        ...ming/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
        [C]: at 0x00405d50

I had an old version of the model up on my website until just a few days ago which was my mistake. Try downloading the model again, and see if it works now.

lming commented

hmm still get low accuracy with the file downloaded from the web

md5sum /home/ming/Downloads/umich-stacked-hourglass/umich-stacked-hourglass.t7
59e73447380b35ec8238552bd4d78be0  /home/ming/Downloads/umich-stacked-hourglass/umich-stacked-hourglass.t7
th main.lua -expID finalp -finalPredictions -nEpochs 0 -loadModel ~/Downloads/umich-stacked-hourglass/umich-stacked-hourglass.t7 
Saving everything to: /home/ming/pose-hg-train/exp/mpii/finalp
Input is a tensor with dimensions: 3 x 256 x 256
Output is a table
         Entry 1 is a tensor with dimensions: 16 x 64 x 64
         Entry 2 is a tensor with dimensions: 16 x 64 x 64
         Entry 3 is a tensor with dimensions: 16 x 64 x 64
         Entry 4 is a tensor with dimensions: 16 x 64 x 64
         Entry 5 is a tensor with dimensions: 16 x 64 x 64
         Entry 6 is a tensor with dimensions: 16 x 64 x 64
         Entry 7 is a tensor with dimensions: 16 x 64 x 64
         Entry 8 is a tensor with dimensions: 16 x 64 x 64
==> Loading model from: /home/ming/Downloads/umich-stacked-hourglass/umich-stacked-hourglass.t7
==> Converting model to CUDA
==> Generating predictions...
 [======================================== 11731/11731 ================================>]  Tot: 12m52s | Step: 65ms     
      test : Loss: 0.0129311 Acc: 0.0006

Sorry, the wording might not have been clear in my answer for the other issue. There is no ground truth available for those images, only MPII has access to test set annotations. The loss and accuracy values you see are meaningless on the test split and only make sense during training and validation. The purpose is to produce final predictions for official evaluation by MPII.

It's typical to leave the test images alone, and only make predictions for official evaluation on rare occasions. Most of the work should be done with training and validation splits.

lming commented

Oh I see. Thanks a lot for the explanation!