Openface error while training using docker

230 views
Skip to first unread message

vijay krishna

unread,
Feb 11, 2017, 6:44:59 AM2/11/17
to CMU-OpenFace
HI All,

Based on the below link am trying to train the dataset (LFW downloaded from web)
https://cmusatyalab.github.io/openface/demo-3-classifier/

While running the below command encountered the error message.
th main.lua -outDir /features -data   /training

Error Message

Updating classList and imageClass appropriately   
/root/torch/install/bin/luajit: /root/openface/batch-represent/dataset.lua:219: Class has zero samples: Kultida_Woods
stack traceback:
    [C]: in function 'error'
    /root/openface/batch-represent/dataset.lua:219: in function '__init'
    /root/torch/install/share/lua/5.1/torch/init.lua:91: in function </root/torch/install/share/lua/5.1/torch/init.lua:87>
    [C]: in function 'dataLoader'
    /root/openface/batch-represent/batch-represent.lua:19: in function 'batchRepresent'
    main.lua:42: 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

Pls suggest the way forward.

Thanks
vijay

Antonio Jesus Rodriguez

unread,
Feb 11, 2017, 11:01:26 AM2/11/17
to CMU-OpenFace
Hi, this is because after running the alignment either the folder was empty or wasn't able to align detect any face in the pictures in the folder. In your case, Kultida_Woods. There is an script in the util folder, called prune-dataset which you can use to remove empty directories or directories with less than N files.

You can use as an alternative this too for removing empty folders:

$ find . -type d -empty -delete

vijay krishna

unread,
Feb 13, 2017, 8:07:22 AM2/13/17
to CMU-OpenFace
Thanks Antonio.... my issue is resolved.

one more question pls, I am using the standard docker (
docker bamos/openface)container for the below implementation
After system restart i lost all the changes in the container.
Please suggest how i copy the standard docker container content
to my personal docker container and move the same to production.

Pls suggest the way forward.

Antonio Jesus Rodriguez

unread,
Feb 13, 2017, 8:37:27 AM2/13/17
to CMU-OpenFace
Hi,

As answered on private:

 To solve that you need to start docker with a shared volume so it uses your files from the local machine instead of the local image.

I do it like this:

sudo docker run -p 9000:9000 -p 8001:8001 -v /path-do-my-folder/docker_data:/root/openface/docker_data -t -i bamos/openface /bin/bash

so docker uses the images that I have in my local docker_data folder.


El sábado, 11 de febrero de 2017, 12:44:59 (UTC+1), vijay krishna escribió:

stephen.n...@gmail.com

unread,
Jan 4, 2018, 4:29:08 AM1/4/18
to CMU-OpenFace


On Saturday, 11 February 2017 19:01:26 UTC+3, Antonio Jesus Rodriguez wrote:
Hi, this is because after running the alignment either the folder was empty or wasn't able to align detect any face in the pictures in the folder. In your case, Kultida_Woods. There is an script in the util folder, called prune-dataset which you can use to remove empty directories or directories with less than N files.

You can use as an alternative this too for removing empty folders:

$ find . -type d -empty -delete
This definitely solved it. Thanks
Reply all
Reply to author
Forward
0 new messages