Package pycv :: Package cs :: Package cv :: Package face :: Module frontalface_dset :: Class RotatedFrontalFace_CDataGenerator
[hide private]
[frames] | no frames]

Class RotatedFrontalFace_CDataGenerator

source code

      ml.ml.DataGenerator --+    
                            |    
ml.cla.dataset.CDataGenerator --+
                                |
                               RotatedFrontalFace_CDataGenerator

Generate face and non-face image patches of size 32-by-32.

Frontal faces can have:

We have in total 8*4*8*8 = 2048 face locations (a,s,x,y). Use static method class_to_location() to convert from class to location.

Neighboring patches:
Compared to traditional methods:
Shifting: traditional 1.5 pixel, ours 1.0 pixel Scaling: traditional 1.2-1.5, ours 1.02-1.12 Overall: we consider 2-4 times more locations than traditional methods


Instance Methods [hide private]
 
__init__(self, database_path)
Initalize the class.
source code
 
__del__(self) source code
 
generate(self, j)
Generate a random face or non-face, vectorized-integrated.
source code

Inherited from ml.cla.dataset.CDataGenerator: generate_set

Static Methods [hide private]
 
class_to_location(j)
Convert from class j to location (a,s,x,y)
source code
Method Details [hide private]

class_to_location(j)
Static Method

source code 
Convert from class j to location (a,s,x,y)
Parameters:
  • j (integer) - class, if j = 0, None is returned
Returns:
(a,s,x,y) : location
the corresponding location of j, or None if j == 0

__init__(self, database_path)
(Constructor)

source code 
Initalize the class.
Parameters:
  • database_path (string) - path to a folder equivalent to 'm:/facedata'
Overrides: ml.cla.dataset.CDataGenerator.__init__

generate(self, j)

source code 

Generate a random face or non-face, vectorized-integrated.

Input:
j: class j
Output:
input_point: a point of class j.
Overrides: ml.cla.dataset.CDataGenerator.generate