age_real

Age estimation service from a face image crop

Desktop, Classification, Caffe

curl -X PUT 'http://localhost:8080/services/age_real' -d '{
 "description": "age estimation service",
 "model": {
  "repository": "/opt/models/age_real",
  "init": "https://deepdetect.com/models/init/desktop/images/classification/age_real.tar.gz",
  "create_repository":true
 },
 "mllib": "caffe",
 "type": "supervised",
 "parameters": {
  "input": {
   "connector": "image"
  }
 }
}'
curl -X POST 'http://localhost:8080/predict' -d '{
  "service": "age_real",
  "parameters": {
    "input": {},
    "output": {
      "confidence_threshold": 0.05,
      "best": 1
    },
    "mllib": {
    }
  },
  "data": [
    "/data/example.jpg"
  ]
}'
from dd_client import DD
host = 'localhost'
port = 8080
dd = DD(host,port)
dd.set_return_format(dd.RETURN_PYTHON)

parameters_input = {"confidence_threshold":0.05, "best":1}
parameters_mllib = {}
parameters_output = {}
data = ["/data/example.jpg"]
sname = 'age_real'
classif = dd.post_predict(sname,data,parameters_input,parameters_mllib,parameters_output)
// https://www.npmjs.com/package/deepdetect-js
var DD = require('deepdetect-js');

const dd = new DD({
  host: 'localhost',
  port: 8080
})

const postData = {
  "service": "age_real",
  "parameters": {
    "input": {
      "confidence_threshold": 0.05,
      "best": 1
    },
    "output": {},
    "mllib": {}
  },
  "data": [
    "/data/example.jpg"
  ]
}

async function run() {
  const predict = await dd.postPredict(postData);
  console.log(predict);
}

run()
{
 "status": {
  "code": 200,
  "msg": "OK"
 },
 "head": {
  "method": "/predict",
  "service": "age_real",
  "time": 993
 },
 "body": {
  "predictions": [
   {
    "classes": [
     {
      "prob": 0.0911879912018776,
      "last": true,
      "cat": "24"
     }
    ],
    "uri": "/data/example.jpg"
   }
  ]
 }
}