18 Commits

Author SHA1 Message Date
b2ec17a2a1 Merge branch 'master' of github.com:charlesreid1/lfw_fuel
* 'master' of github.com:charlesreid1/lfw_fuel:
  Fix import statement and argument name to match latest Keras API.
  Update example LFW CNN to use latest Keras API. → → Pretty sure these are not equivalent, but I had some trouble → understanding the prior conv. neural network, so I did my best → to come up with a one-to-one translation. Since it is just a → lightweight example, no biggie smalls.
  Update map() call to work with Python 2 or Python 3.
2017-05-07 18:07:51 -07:00
15cda53bad Read CSV file as strings, not bytes.
If CSV file is opened/read using bytes flag, it causes this error:

    _csv.Error: iterator should return strings, not bytes (did you open the
    file in text mode?)

Python 3 will not do any decoding when reading the file as bytes ('rb').
Relevant documentation:

    https://docs.python.org/3.6/library/functions.html#open

This change has been tested against both Python 2 and Python 3
and works with both.
2017-05-07 17:57:15 -07:00
2c09f8d00e Expand map into list explicitly for Python 3 compatibility. 2017-05-07 17:12:09 -07:00
3e33585f11 Fix import statement and argument name to match latest Keras API. 2017-05-06 05:52:45 -07:00
443e1976bb Update example LFW CNN to use latest Keras API.
→
→ Pretty sure these are not equivalent, but I had some trouble
→ understanding the prior conv. neural network, so I did my best
→ to come up with a one-to-one translation. Since it is just a
→ lightweight example, no biggie smalls.
2017-05-06 04:49:36 -07:00
0c99fbc020 Update map() call to work with Python 2 or Python 3.
The map() call that applies the crop function to the training data
is automatically applied on the fly in Python 2,
but returns a generator in Python 3.
This creates problems when converting the resulting function map
to a numpy array - the numpy array is empty in Python 3.
This fixes the problem by explicitly converting the generator
to a list. This is about as fast as pre-allocating an empty numpy array
and populating it in a for loop. See https://gist.github.com/charlesreid1/436c51eae1e6a0d011d86f3796dec853
2017-05-06 04:33:13 -07:00
Tom White
31680f6fa0 updated readme info on rebuilding from fuel-{download,convert}
Also rolled version number.
2015-09-13 12:15:26 -07:00
Tom White
c09d8849c9 updated subparsers to latest proposed api in mila-udem/fuel#214 2015-08-16 21:45:45 -07:00
Tom White
82e7f75686 Changes for native fuel download/convert support
Cosmetic changes to fuel hooks that should allow
lfw_fuel dataset to be downloaded and converted
by fuel-download and fuel-convert directly in
an upcoming fuel release.
2015-08-12 00:26:52 -07:00
Tom White
857dfb43bb First README 0.1.0 2015-08-09 23:13:07 -07:00
Tom White
71bb753ded Update example to match README 2015-08-09 23:00:44 -07:00
Tom White
4096056733 run-lfw: updated url_dir and adjusted sys.path 2015-08-09 21:52:26 -07:00
Tom White
a5dfffb288 lfw: updated url_dir and tar_subdir fix for funneled 2015-08-09 20:52:55 -07:00
Tom White
a6c1de2549 added setup.py for optional installing 2015-08-09 18:48:32 -07:00
Tom White
e531c40987 reworked lfw for pairs datasets, multiple formats
Reworked the main lfw.py file to build test/train
datasets based on trainPairs and testPairs. Also
updated scripts so that any one of (original) lfw,
lfw funneled, or lfw deepfunneled can be built.

Added an example of using lfw in keras with
kerosene dataset hook.
2015-08-09 18:16:53 -07:00
Tom White
6203bec270 fuel and kerosene dataset hooks 2015-08-09 12:26:36 -07:00
Tom White
fa7345ab36 lfw: first version that downloads and converts successfully 2015-08-09 00:41:23 -07:00
Tom White
2150c7c758 Empty root commit.
For various reasons, it's a good idea to have an empty first commit in
a git repo.

Here's some background reading...

http://stackoverflow.com/questions/645450/git-how-to-insert-a-commit-as-the-

Basically this can make rewriting the history much easier later.

I also generally will turn back the time on this commit to
make sure it is always the oldest.

I'm following the procedure here:

http://kevin.deldycke.com/2010/05/initialize-git-repositories/

But note that git will refuse to parse dates that far back into the
past! See this:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625480

So the usable git epoch is 1970 + 100000000 seconds, which is

Sat, 03 Mar 1973 09:46:40 GMT

That's too nutty. So I'll just use Jan 1st, 1974 instead.

So the final process is:

git init
git commit --allow-empty # <empty root commit - you are here!>
git tag "epoch"
export GIT_TMP_INIT_HASH=`git show-ref epoch | cut -d ' ' -f 1`
git filter-branch --env-filter '
  if [ $GIT_COMMIT = $GIT_TMP_INIT_HASH ]
    then
      export GIT_AUTHOR_DATE="Tue, 01 Jan 1974 00:00:00 +0000"
      export GIT_COMMITTER_DATE="Tue, 01 Jan 1974 00:00:00 +0000"
  fi' -- --all
unset GIT_TMP_INIT_HASH
git tag -d "epoch"
git tag -a "epoch"

Admittedly a little sloppy. Oh well.
1974-01-01 00:00:00 +00:00