Enhances setup.py to prepare shipping to pipy. Creates proper installer for Windows. To be checked on several machines. TODO : remove pictures from source folder, move to GDrive (leave one sample though). Add ant script to ease compilation. Ship application with

This commit is contained in:
AirballTest
2012-05-22 08:06:03 +02:00
parent 8d417607ee
commit 042bc44468
7 changed files with 40 additions and 20 deletions

2
TODO
View File

@@ -1,2 +0,0 @@
Files in input folder are process randomly.
=> Should insert a sort input method to order chronologically

View File

@@ -6,7 +6,7 @@ Created on 30 mars 2012
import cv import cv
import os import os
import training_types from facemovie import training_types
class FaceParams(object): class FaceParams(object):
''' '''

View File

@@ -7,9 +7,9 @@ import os
import sys import sys
import cv import cv
import lib.exif as exif from facemovie.lib import exif
import Guy from facemovie import Guy
class FaceMovie(object): class FaceMovie(object):

View File

@@ -9,9 +9,9 @@ import os
import sys import sys
import argparse import argparse
import Facemovie from facemovie import Facemovie
import FaceParams from facemovie import FaceParams
import training_types from facemovie import training_types
class Facemoviefier(): class Facemoviefier():
""" """
@@ -25,7 +25,7 @@ class Facemoviefier():
def init_facemovie(self): def init_facemovie(self):
# FIXME : par folder should be known (contained somewhere in the installation) # FIXME : par folder should be known (contained somewhere in the installation)
par_fo = os.path.join(self.args['root'], "haarcascades") par_fo = os.path.join(self.args['root'], "haarcascades")
self.face_params = FaceParams.FaceParams(par_fo, self.args['param']) self.face_params = FaceParams.FaceParams(par_fo, self.args['param'])
self.facemovie = Facemovie.FaceMovie(self.args['input'], self.args['output'], self.face_params) self.facemovie = Facemovie.FaceMovie(self.args['input'], self.args['output'], self.face_params)
@@ -35,6 +35,16 @@ class Facemoviefier():
""" """
parser = argparse.ArgumentParser(description="Creates a movie from a bunch of photos containing a Face.") parser = argparse.ArgumentParser(description="Creates a movie from a bunch of photos containing a Face.")
# TODO: Integrate face params file choice, with list of possibilities. (ncurses)
# First to check if user asks for information
params = training_types.simple_set.keys()
params.append('?')
parser.add_argument('-p',
'--param',
choices=params,
help='Choose the desired file for training the recognition phaze. Should be chosen depending on the face presentation (profile, whole body, ...)',
default='frontal_face')
# --- Arguments to be processed (for now) --- # --- Arguments to be processed (for now) ---
#input folder #input folder
parser.add_argument('-i', '--input', help='Input folder of the images', required=True) parser.add_argument('-i', '--input', help='Input folder of the images', required=True)
@@ -76,16 +86,7 @@ class Facemoviefier():
'--sort', '--sort',
choices='ne', choices='ne',
help='Choose which way images are sorted. Can be either using file name (n) or exif metadata (e). Default is n' , help='Choose which way images are sorted. Can be either using file name (n) or exif metadata (e). Default is n' ,
default='n') default='n')
# TODO: Integrate face params file choice, with list of possibilities.
params = training_types.simple_set.keys()
params.append('?')
parser.add_argument('-p',
'--param',
choices=params,
help='Choose the desired file for training the recognition phaze. Should be chosen depending on the face presentation (profile, whole body, ...)',
default='frontal_facee')
args = vars(parser.parse_args()) args = vars(parser.parse_args())
return args return args

View File

View File

@@ -6,11 +6,32 @@ Created on 19 avr. 2012
# creating executable here # creating executable here
from distutils.core import setup from distutils.core import setup
import py2exe, sys, os import py2exe, sys, os
import facemovie
sys.argv.append('py2exe') sys.argv.append('py2exe')
# Utility function to read the README file.
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup( setup(
name = "Facemovie",
version = "0.4",
author = "Julien Lengrand-Lambert",
author_email = "jlengrand@gmail.com",
description = ("An application aiming at creating a video of faces for people taking 'one picture a day' of themselves"),
license = "BSD",
keywords = "image_processing computer_vision one_picture_a_day photography",
url = "https://github.com/jlengrand/FaceMovie",
packages=['facemovie', 'facemovie.lib', 'facemovie.haarcascades'],
long_description=read('README.markdown'),
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Utilities",
"Environment :: Console",
"License :: OSI Approved :: BSD License",
],
options = {'py2exe': {'bundle_files': 1, 'includes': ['numpy'] } }, options = {'py2exe': {'bundle_files': 1, 'includes': ['numpy'] } },
console=['facemovie.py'], console=['facemovie/Facemoviefier.py'],
zipfile = None, zipfile = None,
) )

0
test/__init__.py Normal file
View File