1adrianb / face-alignment-training

Training code for the networks described in "How far are we from solving the 2D & 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)" paper.
https://www.adrianbulat.com/face-alignment
Other
145 stars 48 forks source link

./dataset-images.lua:16: attempt to index global 'opt' (a nil value) #12

Closed ChooJinHe closed 6 years ago

ChooJinHe commented 6 years ago

Hi guys! I am trying to train a face alignment model. So firstly I download the dataset(300W-LP) and landmarks(.t7) from the webpage. Downloaded landmarks(.t7) is then replaced with the landmarks(.mat) in the dataset. With the dataset, I place it into the face-alignment-training/dataset/ that I had clone from the github. I also changed the dataloader.lua script line15 from [line15] for f in paths.files(base_dir..dirs[i],'.mat') do >>> for f in paths.files(base_dir..dirs[i],'.t7') do With that I run th main.lua and it give the error shown below.

~/face-alignment-training$ th main.lua => Creating model from file: models/fan.lua => Model size: 23820176
=> Building dataset...
=> Dataset built. 57559 images were found.
Using lr_rate: 0.000250 => Training epoch # 1
~/torch/install/bin/luajit: ...~/torch/install/share/lua/5.1/threads/threads.lua:183: [thread 1 callback] ./dataset-images.lua:16: attempt to index global 'opt' (a nil value) stack traceback: ./dataset-images.lua:16: in function 'generateSampleFace' ./dataset-images.lua:34: in function 'get' ./dataloader.lua:86: in function <./dataloader.lua:80> [C]: in function 'xpcall' ...~/torch/install/share/lua/5.1/threads/threads.lua:234: in function 'callback' ...e/~/torch/install/share/lua/5.1/threads/queue.lua:65: in function <...e/~/torch/install/share/lua/5.1/threads/queue.lua:41> [C]: in function 'pcall' ...e/~/torch/install/share/lua/5.1/threads/queue.lua:40: in function 'dojob' [string " local Queue = require 'threads.queue'..."]:15: in main chunk stack traceback: [C]: in function 'error' ...~/torch/install/share/lua/5.1/threads/threads.lua:183: in function 'dojob' ./dataloader.lua:122: in function '(for generator)' ./train.lua:49: in function 'train' main.lua:40: in main chunk [C]: in function 'dofile' ...~/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50

Thanks a lot for helping me :D

ahuirecome commented 6 years ago

Well, I've been encounted with the same problem.