Implement LFW dataset

568 views
Skip to first unread message

Bragi

unread,
Jan 14, 2016, 4:56:15 AM1/14/16
to CMU-OpenFace
Hi,

I am trying to implement openface on LFW dataset as you described in this part, http://cmusatyalab.github.io/openface/models-and-accuracies/ 

But I have got two questions:

1. the lfw-roc.py file means lfw.py right?

2. When I am running on my computer, i have got this error attached with this post.

oading embeddings.
  + Reading pairs.
Traceback (most recent call last):
  File "lfw.py", line 270, in <module>
    main()
  File "lfw.py", line 55, in main
    pairs = loadPairs(args.lfwPairs)
  File "lfw.py", line 63, in loadPairs
    with open(pairsFname, 'r') as f:
IOError: [Errno 2] No such file or directory: '/Users/bragilee/openface/data/lfw/pairs.txt'


Could I get some help to solve these problems?

Thank you.

Bragi


Screen Shot 2016-01-14 at 18.54.26.png

Brandon Amos

unread,
Jan 14, 2016, 8:42:18 AM1/14/16
to Bragi, CMU-OpenFace
Hi Bragi,

> 1. the lfw-roc.py file means lfw.py right?

Correct, I just updated this in our docs.

> 2. IOError: [Errno 2] No such file or directory:
> '/Users/bragilee/openface/data/lfw/pairs.txt'

pairs.txt should be downloaded from:
http://vis-www.cs.umass.edu/lfw/pairs.txt

I just added this info to the docs and `help` portion of `lfw.py`.
`lfw.py` now gives the following error message if this file is not found:

Error: LFW pairs (--lfwPairs) file not found.
Download from http://vis-www.cs.umass.edu/lfw/pairs.txt.
Default location: ~/openface/data/lfw/pairs.txt


Let me know if anything else isn't clear.

-Brandon.
signature.asc

Bragi

unread,
Jan 14, 2016, 9:19:18 PM1/14/16
to CMU-OpenFace, brag...@gmail.com, ba...@cs.cmu.edu
Thank you very much. 
I have made it now.

BTW, I am reading the code of dataset.lua in batch-represenation.

if self.split == 100 then
self.testIndicesSize = 0
else
print('Splitting training and test sets to a ratio of '
.. self.split .. '/' .. (100-self.split))
self.classListTrain = {}
self.classListTest = {}

How to understand that "Splitting training and test sets to a ratio of 0/100" the ratio is always 0?

Thanks.

Brandon Amos

unread,
Jan 15, 2016, 11:21:08 AM1/15/16
to Bragi, CMU-OpenFace
Hi Bragi,

> I have made it now.

Great!

> How to understand that "Splitting training and test sets to a ratio of
> 0/100" the ratio is always 0?

Sorry for the confusion here. `dataset.lua` is copied from the
training code where the dataset can be partitioned into training and
test sets. In batch-represent, I just load all of the data into 'training'.

This is functionally correct, but should be re-written for maintainability.
I filed this issue to track progress on this and have added the help
wanted tag if anybody's interested in helping here:
https://github.com/cmusatyalab/openface/issues/80

-Brandon.
signature.asc

Bragi

unread,
Jan 16, 2016, 8:39:30 AM1/16/16
to CMU-OpenFace, brag...@gmail.com, ba...@cs.cmu.edu
Thank you very much.

I am reading your code to get deeper understanding. Thank you for your help.

ramanjot...@gmail.com

unread,
Dec 22, 2017, 5:20:02 AM12/22/17
to CMU-OpenFace
Please help me with this error:


./lfw.py ../models/openface/nn4.small2.v1 lfw.nn4.small2.v1.reps --lfwPairs pairs.txt
Loading embeddings.
  + Reading pairs.
  + Computing accuracy.
Traceback (most recent call last):
  File "./lfw.py", line 313, in <module>
    main()
  File "./lfw.py", line 76, in main
    verifyExp(args.workDir, pairs, embeddings)
  File "./lfw.py", line 198, in verifyExp
    writeROC(fname, thresholds, embeddings, pairs[test])
  File "./lfw.py", line 115, in writeROC
    (x1, x2, actual_same) = getEmbeddings(pair, embeddings)
  File "./lfw.py", line 104, in getEmbeddings
    (x1, x2) = (embeddings[name1], embeddings[name2])
KeyError: 'Saeb_Erekat_0002'
Reply all
Reply to author
Forward
0 new messages