deepdetect icon indicating copy to clipboard operation
deepdetect copied to clipboard

coredump/segfault using test_split in object detection training call

Open dgtlmoon opened this issue 4 years ago • 3 comments

Tried on current jolibrain/deepdetect_cpu, When running the following object detect train call, I am expecting it to look at the one text file and split the data automatically, but I get a segfault instead.

When I DO NOT use test_split and manually provide a test.txt and train.txt everything works fine..

[2020-08-18 11:17:43.539] [caffe] [info] tdata -> label
terminate called after throwing an instance of 'CaffeErrorException'
  what():  ./include/caffe/util/db_lmdb.hpp:15 / Check failed (custom): (mdb_status) == (0)
Aborted (core dumped)

My training call..

curl -X POST "http://localhost:8080/train" -d '
{
  "service": "collar_location",
  "async": true,
  "parameters": {
    "input": {
      "db": true,
      "db_width": 300,
      "db_height": 300,
       "test_split": 0.1,
       "shuffle": true
    },
    "mllib": {
      "gpu": true,
      "resume": false,
      "net": {
        "batch_size": 2,
        "test_batch_size": 1
      },
      "solver": {
        "test_initialization": false,
        "iterations": 90000,
        "test_interval": 1000,
        "snapshot": 1000,
        "base_lr": 0.0001,
        "solver_type": "RMSPROP",
        "iter_size": 1
      },
      "bbox": true
    },
    "output": {
      "measure": [
        "map"
      ]
    }
  },
  "data": [
    "/tags_dataset/1-images.txt"
  ]
}
'

if I change data from an array to just a string "data": "/tags_dataset/1-images.txt" I get

    "body": {
        "Error": {
            "code": 400,
            "dd_code": 1005,
            "dd_msg": "Service Input Error: missing data",
            "msg": "BadRequest"
        }
    },

So I'm not sure if something is not quite explained right in the documentation, unsure :)

image

My 1-images.txt looks like..

/tags_dataset/imgs/500x500-659696.jpg /tags_dataset/bbox/659696.txt
/tags_dataset/imgs/500x413-574923.jpg /tags_dataset/bbox/574923.txt
/tags_dataset/imgs/500x542-1034098.jpg /tags_dataset/bbox/1034098.txt
/tags_dataset/imgs/500x667-590421.jpg /tags_dataset/bbox/590421.txt

and they are accessible inside the container no problems

dgtlmoon avatar Aug 18 '20 11:08 dgtlmoon

Curiously, searching for other examples I only see test_split being used for CSV examples....

dgtlmoon avatar Aug 18 '20 11:08 dgtlmoon

There's no support for test_split is detection jobs yet, this is something we could add.

beniz avatar Oct 05 '20 04:10 beniz

ok - in which case, could you please add something to the documentation to say that this is only for CSV, as I spent a bit of time trying to figure out where I went wrong :)

dgtlmoon avatar Oct 05 '20 14:10 dgtlmoon