deepdetect icon indicating copy to clipboard operation
deepdetect copied to clipboard

Deepdetect Docker Training Error

Open seyfullahuysal opened this issue 6 years ago • 2 comments

I get the error in the picture when applying the classification example given in the link via docker jupyterlab. https://www.deepdetect.com/platform/docs/introduction/

I placed .caffemodel file and train data folder in that directory “/home/jovyan/models/cats_dogs”

platformError

How can i fix this problem?

Another Question When i apply this example https://www.deepdetect.com/server/docs/train-image-classifier/ i received that error

{"status":{"code":400,"msg":"BadRequest","dd_code":1006,"dd_msg":"Service Bad Request Error: failed to locate model template /home/jovyan/models/cats_dogs/SE-ResNet-50/.prototxt"}

I get error via used that steps

mkdir /home/jovyan/models mkdir /home/jovyan/models/cats_dogs

and below files are stored in the “/home/jovyan/models/cats_dogs” directory SE-ResNet-50.caffemodel SE-ResNet-50.prototxt Extracted data from https://www.deepdetect.com/dd/datasets/cats_dogs.zip

docker run -d -p 8080:8080 -v /home/jovyan/models/cats_dogs jolibrain/deepdetect_cpu

curl -X PUT "http://localhost:8080/services/catsdogs" -d '{ "mllib":"caffe", "description":"image classification service", "type":"supervised", "parameters":{ "input":{ "connector":"image", "width":224, "height":224 }, "mllib":{ "template":"SE-ResNet-50", "nclasses":2, "finetuning":true } }, "model":{ "templates":"/home/jovyan/models/cats_dogs", "repository":"/home/jovyan/models/cats_dogs", "weight": "SE-ResNet-50.caffemodel" } }'

What’s mean “template” argument and how can fix?

seyfullahuysal avatar Sep 03 '19 13:09 seyfullahuysal

Hi @seyfullahuysal

Thanks for your feedback.

/home/jovyan/models/cats_dogs is not visible from inside your docker volumes.

You'd need to move your model files to $DD_PLATFORM/models/cats_dogs - $DD_PLATFORM is $HOME/deepdetect if you've followed the install instructions on deepdetect.com - and use the following path in your jupyter notebook: /opt/platform/models/cats_dogs

Feel free to come back to us if it's still not working or if you have more questions

alx avatar Sep 03 '19 14:09 alx

Hi @alx Thans for your interest

First I need to explain, before ask this question when I run this example I received "no module named dd_widgets" error then dd_widgets installed by me as described here using docker terminal and i rid that error.

Note : Now i dont get "no module named dd_widgets" error in JupyterLab but when run this code

import sys sys.path.append('/home/jovyan/dd_wigets/build/lib/dd_widgets') from dd_widgets import Classification, CSV, Text, Segmentation, Detection, OCR, TSNE_CSV

OR THIS

import sys sys.path.append('/opt/platform/notebooks/ddmodels/train/widgets/') from dd_widgets import Classification, CSV, Text, Segmentation, Detection, OCR, TSNE_CSV

in python what placed to jupyterlab terminal i getting that error

son2

After apply the fixes that you describe i got the same error

- My last situation

son

- My files in $DD_PLATFORM/models/cats_dogs directory

dosyalar

These are my questions

  1. How to define train.prototxt or solver.prototxt files in the following block, how the system detects these files because we only give path as a model_repo ?

    son3

  2. Is training_repo parameter contains just train files or contains tarin and test folders ?

  3. What is the value of template parameter to train custom caffe model ?

Thanks for aid

seyfullahuysal avatar Sep 05 '19 10:09 seyfullahuysal