(img, bbox, landmark,gender,age)
return img
Input:
    - img: gray or RGB
    - bbox: type of BBox
    - landmark: reproject landmark of (5L, 2L)
    Output:
    - img marked with landmark and bbox
Input:
    - img: gray or RGB
    - bbox: type of BBox
    - landmark: reproject landmark of (5L, 2L)
    Output:
    - img marked with landmark and bbox
Input : - img : gray or RGB - bbox : type of BBox - landmark : reproject landmark of ( 5L 2L ) Output : - img marked with landmark and bbox
def drawLandmark_Attribute(img, bbox, landmark,gender,age):
    '''
    Input:
    - img: gray or RGB
    - bbox: type of BBox
    - landmark: reproject landmark of (5L, 2L)
    Output:
    - img marked with landmark and bbox
    '''
    cv2.rectangle(img, (bbox.left, bbox.top), (bbox.right, bbox.bottom), (0,0,255), 2)
    for x, y in landmark:
        cv2.circle(img, (int(x), int(y)), 3, (0,255,0), -1)
        if gender.argmax()==0:
                # -1->female, 1->male; -1->old, 1->young
                cv2.putText(img, 'female', (int(bbox.left), int(bbox.top)),cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 0), 3)
        else:
                cv2.putText(img, 'male', (int(bbox.left), int(bbox.top)),cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 0),3)
        if age.argmax()==0:
                cv2.putText(img, 'old', (int(bbox.right), int(bbox.bottom)),cv2.FONT_HERSHEY_SIMPLEX, 1,(255, 255, 0), 3)
        else:
                cv2.putText(img, 'young', (int(bbox.right), int(bbox.bottom)),cv2.FONT_HERSHEY_SIMPLEX, 1,(255, 255, 0), 3)
    return img
def drawLandmark_Attribute ( img , bbox , landmark , gender , age ) : cv2 . rectangle ( img , ( bbox . left , bbox . top ) , ( bbox . right , bbox . bottom ) , ( 0 , 0 , 255 ) , 2 ) for x , y in landmark : cv2 . circle ( img , ( int ( x ) , int ( y ) ) , 3 , ( 0 , 255 , 0 ) , - 1 ) if gender . argmax ( ) == 0 : # -1->female, 1->male; -1->old, 1->young cv2 . putText ( img , 'female' , ( int ( bbox . left ) , int ( bbox . top ) ) , cv2 . FONT_HERSHEY_SIMPLEX , 1 , ( 255 , 255 , 0 ) , 3 ) else : cv2 . putText ( img , 'male' , ( int ( bbox . left ) , int ( bbox . top ) ) , cv2 . FONT_HERSHEY_SIMPLEX , 1 , ( 255 , 255 , 0 ) , 3 ) if age . argmax ( ) == 0 : cv2 . putText ( img , 'old' , ( int ( bbox . right ) , int ( bbox . bottom ) ) , cv2 . FONT_HERSHEY_SIMPLEX , 1 , ( 255 , 255 , 0 ) , 3 ) else : cv2 . putText ( img , 'young' , ( int ( bbox . right ) , int ( bbox . bottom ) ) , cv2 . FONT_HERSHEY_SIMPLEX , 1 , ( 255 , 255 , 0 ) , 3 ) return img