im_receive_serv.py 文件源码

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

项目:facejack 作者: PetarV- 项目源码 文件源码
def imreceive():
    data = None
    hack = False
    if request.method == "POST":
        data = request.get_data()
        if 'hack' in request.args:
            hack = request.args['hack']=="True"
        face = pickle.loads(data)
        print("Image Received")
        if face.shape==(224,224, 3) and face.dtype=="uint8":
            if hack and proc_face_with_hack(face):
                return jsonify(dict(authentication="ALLOWED"))
            elif not hack and proc_face(face):
                return jsonify(dict(authentication="ALLOWED"))
    return jsonify(dict(authentication="DENIED"))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号