find.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Gender 作者: rabeter 项目源码 文件源码
def draw_rects(img, rects):
    """
    ?????????????
    :param img: 
    :param rects: 
    :return: 
    """
    for x, y, w, h in rects:
        cv2.rectangle(img, (x, y), (x+w, y+h), (255, 255, 00), 2)
        face = img
        face = cv2.resize(face,(224,224))
        if Gender.predict(face)==1:
            text = "Male"
        else:
            text = "Female"
        cv2.putText(img, text, (x, h), cv2.FONT_HERSHEY_SIMPLEX, 1.0, (255, 255, 255), lineType=cv2.LINE_AA)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号