FRaaS

FREEMIUM
By AIH Technology | Updated hace 4 días | Visual Recognition
Health Check

N/A

README

Getting Started

FRaaS API access is currently granted through access token. Once upon receiving valid access token from AIH Tech (contact us at www.aihtech.com), proceed to use the API.

  • Step 1: Please contact us to request API access token.

    > You can reach us at our official website or by sending us an email.

  • Step 2: Invoke FRaaS APIs

    • RESTful APIs: add Authorization request header e.g. : Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5...

FRaaS API Endpoint:

>Host: algo-qa.aihtech.com
>
>Port: 2053
>
>IAM (Identity management) Port: 8443

Access Token Info:

Example access token info look like this:

{
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkI...",
    "expires_in": 432000,
    "refresh_expires_in": 864000,
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkI...",
    "token_type": "bearer",
    "not-before-policy": 0,
    "session_state": "d3a35cdf-2564-4e02-917d-4b15392cd6eb",
    "scope": "profile fraas_client_scope email"
}

RESTful Create FaceRepo

POST /facerepos

  • Response body:
{
    "faceRepoId": "d65ccdf8-ed2e-41a7-b920-7c9d1d7e2815-facerepo"
}

RESTful Get FaceRepo

GET /facerepos

  • Response body:
{
    "faceRepoId": "d65ccdf8-ed2e-41a7-b920-7c9d1d7e2815-facerepo"
}

RESTful Remove FaceRepo

DELETE /facerepos/

  • Response body:
{
    "faceRepoId": "d65ccdf8-ed2e-41a7-b920-7c9d1d7e2815-facerepo"
}

RESTful Update FaceRepo

Add images to FaceRepo

PUT /facerepos/

  • Parameter addImages=true

  • Request Body
{
    "faceFilter":{
	    "confidence": -0.1,
	    "angle": -0.1,
	    "minFaceSize": 30,
	    "singleFace": true
    },
    "imageRequestType":"HttpURL",
    "images": [
    	{
            "resource": "https://x-assets.s3.amazonaws.com/img1.jpg",
            "name": "imgName1"
        },
        {
            "resource":"https://x-assets.s3.amazonaws.com/img2.jpg",
            "name": "imgName2"
        }
    ]
}
  • Response Body
{
  "faceRepoId": "fedsad49-fgads2-4dsaa8-670-12711d827-facerepo",
  "featureIds": [
    "8f984c25d42840cbabxxxxx245c34f54",
    "c4d5b08b03af40exxxxxxxxxb0dce64a"
  ],
  "faceIds": {
    "img2": {
      "faceIds": [
        "8f984c25d42840cbabxxxxx245c34f54"
      ],
      "reSizeH": 0,
      "reSizeW": 0
    },
    "img1": {
      "faceIds": [
        "c4d5b08b03af40exxxxxxxxxb0dce64a"
      ],
      "reSizeH": 0,
      "reSizeW": 0
    }
  },
  "position": {
    "8f984c25d42840cbabxxxxx245c34f54": {
      "faceId": "8f984c25d42840cbabxxxxx245c34f54",
      "rect": {
        "left": 48,
        "top": 237,
        "right": 638,
        "bottom": 1062
      },
      "p5s": {
        "x1": 168,
        "y1": 589,
        "x2": 437,
        "y2": 596,
        "x3": 264,
        "y3": 776,
        "x4": 179,
        "y4": 842,
        "x5": 445,
        "y5": 849
      },
      "extId": "img2"
    },
    "c4d5b08b03af40exxxxxxxxxb0dce64a": {
      "faceId": "c4d5b08b03af40exxxxxxxxxb0dce64a",
      "rect": {
        "left": 140,
        "top": 136,
        "right": 350,
        "bottom": 413
      },
      "p5s": {
        "x1": 179,
        "y1": 252,
        "x2": 269,
        "y2": 234,
        "x3": 216,
        "y3": 302,
        "x4": 202,
        "y4": 352,
        "x5": 280,
        "y5": 338
      },
      "extId": "img1"
    }
  }
}

Remove featureIds from FaceRepo

PUT /facerepos/

  • Parameter removeImages=true
  • Request body
{
    "featureIds":[
	    "932837eb6a174fqewq4842899df35080"
	]
}

  • Response Body
{
    "faceRepoId": "fedsad49-fgads2-4dsaa8-670-12711d827-facerepo",
    "featureIds":[
	    "932837eb6a174fqewq4842899df35080"
	]
}

Remove single featureId from FaceRepo

DELETE /facerepos/

  • URL Parameter featureId=

  • Response Body
{
    "faceRepoId": "fedsad49-fgads2-4dsaa8-670-12711d827-facerepo",
    "featureIds":[
	    "932837eb6a174fqewq4842899df35080"
	]
}

RESTful Search

POST /search

  • Request body
{
    "config":{
        "faceFilter":
        {
            "confidence":-0.1,
            "angle":-0.1,
            "minFaceSize":30,
            "singleFace":false
        },
        "groupFilter":"",
        "faceRepoIds":[
        	""
        ],
        "minScore":0.6,
        "maxRetNb":5,
        "showFaceAttributes": false
    },
    "imageRequestType":"HttpURL",
    "images": [
        {
    	    "resource": "http://192.168.10.30:32080/image/abc1.jpg",
    	    "name": "imgName1"
        },
    	{
            "resource": "http://192.168.10.30:32080/image/abc2.jpg",
            "name": "imgName2"
        },
        {
    	    "resource": "http://192.168.10.30:32080/image/abc3.jpg",
    	    "name": "imgName3"
        }
    ]
}
  • Response body:
{
  "faceIds": {
    "imgName1": {
      "faceIds": [
        "aeb95c02936042b3b6741eab92008ec1"
      ],
      "reSizeH": 0,
      "reSizeW": 0
    }
  },
  "position": {
    "aeb95c02936042b3b6741eab92008ec1": {
      "faceId": "aeb95c02936042b3b6741eab92008ec1",
      "rect": {
        "left": 48,
        "top": 237,
        "right": 638,
        "bottom": 1062
      },
      "extId": "imgName1"
    }
  },
  "searchScore": {
    "aeb95c02936042b3b6741eab92008ec1": [
      {
        "faceRepoId": "Test9",
        "featureId": "910ae1c6678a4f2cbccf02dd33254c1a",
        "score": 0.65820575
      }
    ]
  }
}

Face Grouping

Get grouping info for images

POST /facegroups

  • Request body: image by URL
{
    "config":{
        "faceFilter":
        {
            "confidence": -0.1,
            "angle": -0.1,
            "minFaceSize": 30,
            "singleFace": false
        }
    },
    "imageRequestType":"HttpURL",
    "images":[
	    {
    	    "resource": "https://x-assets.s3.amazonaws.com/img1.jpg",
    	    "name": "imgName1"
        },
        {
	        "resource":"https://x-assets.s3.amazonaws.com/img2.jpg",
	        "name": "imgName2"
	    }
    ]
}
  • Response body - currently returns all faceGroups
{
    {
      "faceIds":{
          "imageName1":{
              "faceIds":[
                  "b895d95842b04813b088b05d7f72c7f2"
              ]
          },
          "imageName2":{
              "faceIds":[
                  "685d499347e74a418499ebabe5802ddb"
              ]
          }
      },
      "position":{
          "b895d95842b04813b088b05d7f72c7f2":{
              "faceId":"b895d95842b04813b088b05d7f72c7f2",
              "rect":{
                  "left":26,
                  "top":296,
                  "right":200,
                  "bottom":523
              },
              "p5s":{
                  "x1":77,
                  "y1":394,
                  "x2":157,
                  "y2":386,
                  "x3":125,
                  "y3":435,
                  "x4":90,
                  "y4":472,
                  "x5":158,
                  "y5":466
              },
              "extId":"img2"
          },
          "685d499347e74a418499ebabe5802ddb":{
              "faceId":"685d499347e74a418499ebabe5802ddb",
              "rect":{
                  "left":222,
                  "top":176,
                  "right":288,
                  "bottom":278
              },
              "p5s":{
                  "x1":224,
                  "y1":216,
                  "x2":238,
                  "y2":220,
                  "x3":217,
                  "y3":242,
                  "x4":231,
                  "y4":262,
                  "x5":240,
                  "y5":263
              },
              "extId":"img1"
          }
      },
      "fScoreComp":[
          {
              "feat_1":"b895d95842b04813b088b05d7f72c7f2",
              "feat_2":"685d499347e74a418499ebabe5802ddb",
              "score":0.62967694
          }
      ]
  }
}
Followers: 0
Resources:
Product Website Terms of use
API Creator:
Rapid account: AIH Technology
AIH Technology
aih-technology
Log In to Rate API
Rating: 5 - Votes: 1