mirror of
https://github.com/jlengrand/Ivolution.git
synced 2026-03-10 08:21:18 +00:00
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:
2
TODO
2
TODO
@@ -1,2 +0,0 @@
|
||||
Files in input folder are process randomly.
|
||||
=> Should insert a sort input method to order chronologically
|
||||
|
||||
@@ -6,7 +6,7 @@ Created on 30 mars 2012
|
||||
import cv
|
||||
import os
|
||||
|
||||
import training_types
|
||||
from facemovie import training_types
|
||||
|
||||
class FaceParams(object):
|
||||
'''
|
||||
|
||||
@@ -7,9 +7,9 @@ import os
|
||||
import sys
|
||||
|
||||
import cv
|
||||
import lib.exif as exif
|
||||
from facemovie.lib import exif
|
||||
|
||||
import Guy
|
||||
from facemovie import Guy
|
||||
|
||||
|
||||
class FaceMovie(object):
|
||||
|
||||
@@ -9,9 +9,9 @@ import os
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
import Facemovie
|
||||
import FaceParams
|
||||
import training_types
|
||||
from facemovie import Facemovie
|
||||
from facemovie import FaceParams
|
||||
from facemovie import training_types
|
||||
|
||||
class Facemoviefier():
|
||||
"""
|
||||
@@ -25,7 +25,7 @@ class Facemoviefier():
|
||||
|
||||
def init_facemovie(self):
|
||||
# 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.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.")
|
||||
|
||||
# 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) ---
|
||||
#input folder
|
||||
parser.add_argument('-i', '--input', help='Input folder of the images', required=True)
|
||||
@@ -76,16 +86,7 @@ class Facemoviefier():
|
||||
'--sort',
|
||||
choices='ne',
|
||||
help='Choose which way images are sorted. Can be either using file name (n) or exif metadata (e). Default is 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')
|
||||
default='n')
|
||||
|
||||
args = vars(parser.parse_args())
|
||||
return args
|
||||
|
||||
0
facemovie/haarcascades/__init__.py
Normal file
0
facemovie/haarcascades/__init__.py
Normal file
23
setup.py
23
setup.py
@@ -6,11 +6,32 @@ Created on 19 avr. 2012
|
||||
# creating executable here
|
||||
from distutils.core import setup
|
||||
import py2exe, sys, os
|
||||
import facemovie
|
||||
|
||||
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(
|
||||
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'] } },
|
||||
console=['facemovie.py'],
|
||||
console=['facemovie/Facemoviefier.py'],
|
||||
zipfile = None,
|
||||
)
|
||||
0
test/__init__.py
Normal file
0
test/__init__.py
Normal file
Reference in New Issue
Block a user