jolibrain / deepdetect

Deep Learning API and Server in C++14 support for Caffe, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE

Home Page:https://www.deepdetect.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When passing a file that does not exist to /predict service, I get an error unrelated to file not existing

dgtlmoon opened this issue · comments

For example, /xxxxxx.jpg really does not exist, I would expect a message like "unable to open file" or similar, but I get an error about the size of the file.

(tested on sha256:f84101fe0b38128ed5673621ecfb7c6476921ffbdabcee38477473993520bc50 jolibrain/deepdetect_cpu)

{
  "data": [
    "/xxxxxxx.jpg"
  ],
  "parameters": {
    "input": {
      "height": 300,
      "width": 300
    },
    "mllib": {
      "gpu": false
    },
    "output": {
      "bbox": true,
      "confidence_threshold": 0.2
    }
  },
  "service": "mydetection"
}
{
  "status": {
    "code": 400,
    "dd_code": 1005,
    "dd_msg": "Service Input Error: /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/imgproc/src/imgwarp.cpp:3492: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize\n",
    "msg": "BadRequest"
  }
}

This is OpenCV saying the image is of size 0. Not too easy to replace with a better error in our case since image reading is multithreaded, but we could.

I wonder if it says 0, or False? ie filesize === false or filesize === 0 ?