28mm / Fovea

unified cli for various saas image classification apis.
MIT License
40 stars 5 forks source link

Celebrities support broken for microsoft provider #1

Closed 28mm closed 7 years ago

28mm commented 7 years ago

The (microsoft-only) celebrity detection feature appears to be broken. Tested with a still from 8 Femme, and a couple of celebrity headshots.

https://www.microsoft.com/cognitive-services/en-us/computer-vision-api/documentation


$ fovea --provider microsoft --categories --faces --celebrities --output json travolta.jpg
{
    "categories": [
        {
            "name": "people_portrait",
            "score": 0.89453125
        }
    ],
    "requestId": "9670d412-6689-4e4c-89a9-e62fe60bcfcb",
    "metadata": {
        "width": 743,
        "height": 1000,
        "format": "Jpeg"
    },
    "faces": [
        {
            "age": 42,
            "gender": "Male",
            "faceRectangle": {
                "left": 212,
                "top": 282,
                "width": 412,
                "height": 412
            }
        }
    ]
}
28mm commented 7 years ago

Argument wasn't being passed to the Microsoft query class.

[user@host]$ fovea --provider microsoft --categories --celebrities --output json 7.png
[...snip...]
"categories": [
        {
            "name": "others_",
            "score": 0.015625
        },
        {
            "name": "people_",
            "score": 0.4140625,
            "detail": {
                "celebrities": [
                    {
                        "name": "Catherine Deneuve",
                        "faceRectangle": {
                            "left": 1155,
                            "top": 76,
                            "width": 101,
                            "height": 101
                        },
                        "confidence": 0.9599564
                    }
                ]
            }
        }
    ],
[snip...]