-
Notifications
You must be signed in to change notification settings - Fork 28
Home
The module consists of two classes - DetectLandmarks and ApplyMakeup. The functionalities provided by them are as mentioned below:
This class handles all operations related to facial landmark detection. It provides three functions-
Returns all detected landmarks for a face.
Arguments:
-
image_file
: Either of three options:
- (int) Image data after being read with cv2.imread()
- File path of a locally stored image file.
- Byte stream being received over multipart network request.
-
flag (str)
: Used to denote the type of image_file parameter being passed. Possible values areIMG_DATA
,FILE_READ
,NETWORK_BYTE_STREAM
respectively. By default, its value is IMAGE_DATA, and assumes imread() has been performed, and the returned matrice is passed.
Returns: String with a list of all the detected landmark points of a face.
Error: Returns None
if face not found in the image.
Returns points of lips for a face.
Arguments, return value, and error are all same as for get_face_data()
Returns points of upper eyelids for a face.
Arguments, return value, and error are all same as for get_face_data()
This class handles the application of makeup. Functions available for use:
Applies lipstick on the passed image of a face.
Arguments:
-
filename (str)
: Path for stored input image file. -
red (int)
: Red value of RGB colour code of lipstick shade. -
blue (int)
: Blue value of RGB colour code of lipstick shade. -
green (int)
: Green value of RGB colour code of lipstick shade.
Returns: filepath (str)
of the saved output file, with applied lipstick.
Applies black eyeliner on the passed image of a face.
Arguments:
-
filename (str)
: Path for stored input image file.
Returns: filepath (str)
of the saved output file, with applied lipstick.