basic_fashion

clothes detection

Desktop, Detection, Caffe

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

parameters_output = {"confidence_threshold":0.4, "bbox":True}
data = ["/data/example.jpg"]
sname = 'basic_fashion'
classif = dd.post_predict(sname,data,{},{},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": "basic_fashion",
  "parameters": {
    "output": {
      "confidence_threshold": 0.4,
      "bbox": 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": "basic_fashion_v2",
  "time": 103
 },
 "body": {
  "predictions": [
   {
    "classes": [
     {
      "prob": 0.283363938331604,
      "bbox": {
       "xmax": 145.92205810546875,
       "ymax": 173.904541015625,
       "ymin": 348.5083923339844,
       "xmin": 9.65214729309082
      },
      "cat": "bag"
     },
     {
      "prob": 0.2829309105873108,
      "bbox": {
       "xmax": 285.46868896484375,
       "ymax": 15.518260955810547,
       "ymin": 63.17625427246094,
       "xmin": 220.40829467773438
      },
      "cat": "hat"
     },
     {
      "prob": 0.1963716745376587,
      "bbox": {
       "xmax": 270.4206848144531,
       "ymax": 60.39577102661133,
       "ymin": 78.02435302734375,
       "xmin": 232.13482666015625
      },
      "cat": "glasses"
     },
     {
      "prob": 0.1955023854970932,
      "last": true,
      "bbox": {
       "xmax": 313.3597106933594,
       "ymax": 144.37893676757812,
       "ymin": 412.1800231933594,
       "xmin": 197.72695922851562
      },
      "cat": "bag"
     }
    ],
    "uri": "/data/example.jpg"
   }
  ]
 }
}