olive100 commited on
Commit
b505c3d
·
1 Parent(s): 9bd9c24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -13,8 +13,7 @@ import cv2
13
 
14
  def face_detect(img):
15
  success,encoded_image = cv2.imencode(".jpg",img)
16
- img_test = encoded_image.tostring()
17
- img_test = base64.b64encode(img_test)
18
  request_url = "https://aip.baidubce.com/rest/2.0/face/v3/detect"
19
  params={'image':str(img_test,'utf-8'),'image_type':'BASE64','face_field':'age,beauty,faceshape,gender,glasses,landmark'}
20
 
 
13
 
14
  def face_detect(img):
15
  success,encoded_image = cv2.imencode(".jpg",img)
16
+ img_test = base64.b64encode(encoded_image)
 
17
  request_url = "https://aip.baidubce.com/rest/2.0/face/v3/detect"
18
  params={'image':str(img_test,'utf-8'),'image_type':'BASE64','face_field':'age,beauty,faceshape,gender,glasses,landmark'}
19