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

Class NoScale_RotatedFrontalFace_CDataGenerator

source code

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

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

Frontal faces can have:

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

Correspondence between a class and a location
class j, Location a = (a2, a1, a0), y = (y2, y1, y0), x = (x2, x1, x0), then: j = (a2, a1, a0, y2, x2, y1, x1, y0, x0) + 1
Neighboring patches:
Compared to traditional methods:
Shifting: traditional 1.5 pixel, ours 1.0 pixel


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