detection_600

many classes object detection

Desktop, Detection, Caffe

curl -X PUT http://localhost:8080/services/detection_600 -d '{
 "description": "object detection service",
 "model": {
  "repository": "/opt/models/detection_600",
  "create_repository": true,
  "init":"https://deepdetect.com/models/init/desktop/images/detection/detection_600.tar.gz"
 },
 "parameters": {"input": {"connector":"image"}},
 "mllib": "caffe",
 "type": "supervised"
}'
curl -X POST 'http://localhost:8080/predict' -d '{
  "service": "detection_600",
  "parameters": {
    "output": {
      "confidence_threshold": 0.3,
      "bbox": true
    },
    "mllib": {
      "gpu": true
    }
  },
  "data": [
    "/data/example.jpg"
  ]
}'
#https://raw.githubusercontent.com/jolibrain/deepdetect/master/clients/python/dd_client.py
from dd_client import DD
host = 'localhost'
port = 8080
dd = DD(host,port)
dd.set_return_format(dd.RETURN_PYTHON)

parameters_input = {}
parameters_mllib = {}
parameters_output = {"confidence_threshold":0.3,"bbox":True}
data = ["/data/example.jpg"]
sname = 'detection_600'
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": "detection_600",
  "parameters": {
    "output": {
      "confidence_threshold": 0.3,
      "bbox": true
    },
    "mllib": {
      "gpu": true
    }
  },
  "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": "detection_600",
    "time": 60
  },
  "body": {
    "predictions": [
      {
        "classes": [
          {
            "prob": 0.8248323798179626,
            "bbox": {
              "xmax": 487.2122497558594,
              "ymax": 351.72113037109375,
              "ymin": 521.0411376953125,
              "xmin": 301.8126220703125
            },
            "cat": "Car"
          },
          {
            "prob": 0.29296377301216125,
            "bbox": {
              "xmax": 202.32383728027344,
              "ymax": 352.185791015625,
              "ymin": 447.30419921875,
              "xmin": 12.260007858276367
            },
            "cat": "Car"
          },
          {
            "prob": 0.14670416712760925,
            "bbox": {
              "xmax": 534.9172973632812,
              "ymax": 8.029011726379395,
              "ymin": 397.7722473144531,
              "xmin": 17.81478500366211
            },
            "cat": "Tree"
          },
          {
            "prob": 0.13783478736877441,
            "bbox": {
              "xmax": 288.7256774902344,
              "ymax": 335.0918273925781,
              "ymin": 404.08905029296875,
              "xmin": 156.46469116210938
            },
            "cat": "Van"
          },
          {
            "prob": 0.13422219455242157,
            "last": true,
            "bbox": {
              "xmax": 156.6908416748047,
              "ymax": 150.88865661621094,
              "ymin": 346.5965881347656,
              "xmin": 21.79889488220215
            },
            "cat": "Tree"
          }
        ],
        "uri": "/data/example.jpg"
      }
    ]
  }
}