Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return wrong URI on prediction #68

Closed
ozeias opened this issue Feb 22, 2016 · 3 comments
Closed

Return wrong URI on prediction #68

ozeias opened this issue Feb 22, 2016 · 3 comments

Comments

@ozeias
Copy link

ozeias commented Feb 22, 2016

I'm trying to process more images by the time but there is a bug in the URI return.

with one url:

curl -X POST "http://localhost:8080/predict" -d '{"service":"imageserv","parameters":{"input":{"width":224,"height":224},"mllib":{"gpu": true},"output":{"best":3}},"data":["https://scontent.cdninstagram.com/t51.2885-15/e35/12519497_764907956986053_712235836_n.jpg"]}'

Result:

{
  "status": {
    "code": 200,
    "msg": "OK"
  },
  "head": {
    "method": "/predict",
    "time": 51.0,
    "service": "brands"
  },
  "body": {
    "predictions": {
      "uri": "https://scontent.cdninstagram.com/t51.2885-15/e35/12519497_764907956986053_712235836_n.jpg",
      "classes": [
        {
          "prob": 0.9500908851623535,
          "cat": "cat_1"
        },
        {
          "prob": 0.041295669972896579,
          "cat": "unknown"
        },
        {
          "last": true,
          "prob": 0.0063898079097270969,
          "cat": "cat_2"
        }
      ]
    }
  }
}

but when you send several images:

curl -X POST "http://localhost:8080/predict" -d '{"service":"imageserv","parameters":{"input":{"width":224,"height":224},"mllib":{"gpu": true},"output":{"best":3}},"data":["https://scontent.cdninstagram.com/t51.2885-15/e35/12519497_764907956986053_712235836_n.jpg", "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12093380_181967912141562_1524946174_n.jpg"]}'

results:

{
  "status": {
    "code": 200,
    "msg": "OK"
  },
  "head": {
    "method": "/predict",
    "time": 82.0,
    "service": "brands"
  },
  "body": {
    "predictions": [
      {
        "uri": "https://scontent.cdninstagram.com/t51.2885-15/e35/12519497_764907956986053_712235836_n.jpg",
        "classes": [
          {
            "prob": 0.6291877627372742,
            "cat": "unknown"
          },
          {
            "prob": 0.2180267721414566,
            "cat": "cat_3"
          },
          {
            "last": true,
            "prob": 0.05745556578040123,
            "cat": "cat_4"
          }
        ]
      },
      {
        "uri": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12093380_181967912141562_1524946174_n.jpg",
        "classes": [
          {
            "prob": 0.9500910043716431,
            "cat": "cat_1"
          },
          {
            "prob": 0.04129564017057419,
            "cat": "unknown"
          },
          {
            "last": true,
            "prob": 0.00638980558142066,
            "cat": "cat_2"
          }
        ]
      }
    ]
  }
}
@beniz beniz self-assigned this Feb 23, 2016
@beniz beniz added the type:bug label Feb 23, 2016
@beniz
Copy link
Collaborator

beniz commented Feb 23, 2016

Thanks for catching this one. I've been able to trace it back to the parallelization of image acquisition. There should be a fix within a few hours from now. If you are in a hurry and need immediate fixing, try commenting out all the #pragma in imginputfileconn.h.

@beniz
Copy link
Collaborator

beniz commented Feb 23, 2016

@ozeias So, please see whether the commit to master above does fix the problem for you as it does on my side and close (or not) the issue accordingly. Thanks again for the report.

@ozeias
Copy link
Author

ozeias commented Feb 23, 2016

@beniz seems working now. I'll make more tests but so far so good. Thanks for the quickly fix.

@ozeias ozeias closed this as completed Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants