Giter Club home page Giter Club logo

Comments (6)

huxuan avatar huxuan commented on May 25, 2024

Hi @pwna5aurus, what do you assign to the returnFaceAttributes parameter. It should be a raw string in format of something like age,gender

from cognitive-face-python.

pwna5aurus avatar pwna5aurus commented on May 25, 2024

from cognitive-face-python.

huxuan avatar huxuan commented on May 25, 2024

Seems there is an extra space after the comma, do you mind to have a try without that? The parameter name should be attributes.

from cognitive-face-python.

pwna5aurus avatar pwna5aurus commented on May 25, 2024

Tried it without the space:
result = CF.face.detect(fp,attributes='age,gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure, noise')

Here is the error:

File "test.py", line 11, in <module>
    result = CF.face.detect(fp,attributes='age,gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure, noise')
  File "C:\Python27\lib\site-packages\cognitive_face\face.py", line 41, in detect
    'POST', url, headers=headers, params=params, json=json, data=data)
  File "C:\Python27\lib\site-packages\cognitive_face\util.py", line 106, in request
    error_msg.get('message'))
cognitive_face.util.CognitiveFaceException: Error when calling Cognitive Face API:
        status_code: 400
        code: BadArgument
        message: Invalid argument returnFaceAttributes.

from cognitive-face-python.

huxuan avatar huxuan commented on May 25, 2024

@pwna5aurus , there should be no space after all the commas. For your example, it should be age,gender,headPose,smile,facialHair,glasses,emotion,hair,makeup,occlusion,accessories,blur,exposure,noise

from cognitive-face-python.

huxuan avatar huxuan commented on May 25, 2024

Closed as explained and no further response, please feel free to reopen it if there is any further questions.

from cognitive-face-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.