AaronJackson / vrn

:man: Code for "Large Pose 3D Face Reconstruction from a Single Image via Direct Volumetric CNN Regression"
http://aaronsplace.co.uk/papers/jackson2017recon/
MIT License
4.52k stars 742 forks source link

Error in running run.sh - attempt to perform arithmetic on field 'scale_factor' (a nil value) #35

Closed shreelock closed 6 years ago

shreelock commented 6 years ago

Found the following error while running the script. The script fails at passing cropped image through the VRN. I tried using one image at a time as well, but not able to figure out why is the code failing. It looks like its failing at image.scale, but there's no scale_factor field reqd for image.scale.

Do you have any insight as to why this is happening?

root@56fb226b7d32:/workspace/vrn# ./run.sh
Cropped and scaled AFLW_image00046.jpg
/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/nn/Container.lua:67: 
In 12 module of nn.Sequential:
In 1 module of nn.ConcatTable:
In 3 module of nn.Sequential:
...h/install/share/lua/5.1/nn/SpatialUpSamplingBilinear.lua:64: attempt to perform arithmetic on field 'scale_factor' (a nil value)
stack traceback:
    ...h/install/share/lua/5.1/nn/SpatialUpSamplingBilinear.lua:64: in function <...h/install/share/lua/5.1/nn/SpatialUpSamplingBilinear.lua:47>
    [C]: in function 'xpcall'
    /root/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
    /root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function </root/torch/install/share/lua/5.1/nn/Sequential.lua:41>
    [C]: in function 'xpcall'
    /root/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
    /root/torch/install/share/lua/5.1/nn/ConcatTable.lua:11: in function </root/torch/install/share/lua/5.1/nn/ConcatTable.lua:9>
    [C]: in function 'xpcall'
    /root/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
    /root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
    process.lua:31: in main chunk
    [C]: in function 'dofile'
    /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: at 0x00406670

WARNING: If you see a stack trace below, it doesn't point to the place where this error occured. Please use only the one above.
stack traceback:
    [C]: in function 'error'
    /root/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
    /root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
    process.lua:31: in main chunk
    [C]: in function 'dofile'
    /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: at 0x00406670
AaronJackson commented 6 years ago

When did you install Torch? If old, can you try a newer version please?

shreelock commented 6 years ago

Thanks a lot Aaron, initially I had a lot of trouble installing dependencies for running vrn code, but then I used the facealignment docker image provided by adrian, which already had everything installed, except that it had the older torch version. I have updated torch and the flow works flawlessly.

Thanks a lot, and Merry Christmas! :)

AaronJackson commented 6 years ago

Excellent :) :christmas_tree: Merry Christmas.