ilsvrc_googlenet

image classification service

Desktop, Classification, Caffe

curl -X PUT 'http://localhost:8080/services/ilsvrc_googlenet' -d '{
 "description": "image classification service",
 "model": {
  "repository": "/opt/models/ilsvrc_googlenet",
  "init": "https://deepdetect.com/models/init/desktop/images/classification/ilsvrc_googlenet.tar.gz"
 },
 "mllib": "caffe",
 "type": "supervised",
 "parameters": {
  "input": {
   "connector": "image"
  }
 }
}'
curl -X POST 'http://localhost:8080/predict' -d '{
  "service": "ilsvrc_googlenet",
  "parameters": {
    "output": {
      "best": 3
    },
    "mllib": {
      "gpu": true
    }
  },
  "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 = {"best":3}
parameters_mllib = {}
parameters_output = {}
data = ["/data/example.jpg"]
sname = 'ilsvrc_googlenet'
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": "ilsvrc_googlenet",
  "parameters": {
    "input": {
      "best": 3
    },
  },
  "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": "ilsvrc_googlenet",
  "time": 201
 },
 "body": {
  "predictions": [
   {
    "classes": [
     {
      "prob": 0.0911879912018776,
      "last": true,
      "cat": "ambulance"
     }
    ],
    "uri": "/data/example.jpg"
   }
  ]
 }
}