CatalystCode / CNTK-faster-rcnn

Docker images adjusted for running Faster RCNN CNTK examples.
Apache License 2.0
5 stars 6 forks source link

train custom data in Docker of CNTK-faster-rcnn #10

Open zhangabner opened 6 years ago

zhangabner commented 6 years ago

I pulled Docker files by ./scripts/run.sh cpu and get test result by docker cp :/cntk/Examples/Image/Detection/FasterRCNN/Output/CustomImages /host/path/target and also prepared new data by Vott and are the required Director format. in /host/path1 when I run python train.py

Traceback (most recent call last): File "/home/newwen/.local/lib/python3.5/site-packages/cntk/cntk_py.py", line 18, in swig_import_helper return importlib.import_module(mname) File "/home/newwen/anaconda3/envs/tensorflow/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 985, in _gcd_import File "", line 968, in _find_and_load File "", line 955, in _find_and_load_unlocked ImportError: No module named 'cntk._cntk_py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train.py", line 6, in from cntk import load_model File "/home/newwen/.local/lib/python3.5/site-packages/cntk/init.py", line 17, in from . import cntk_py File "/home/newwen/.local/lib/python3.5/site-packages/cntk/cntk_py.py", line 21, in _cntk_py = swig_import_helper() File "/home/newwen/.local/lib/python3.5/site-packages/cntk/cntk_py.py", line 20, in swig_import_helper return importlib.import_module('_cntk_py') File "/home/newwen/anaconda3/envs/tensorflow/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: libmpi_cxx.so.1: cannot open shared object file: No such file or directory

how could I train and predict in Docker rather in the host?

Thanks

Smarker commented 6 years ago

There recently was an update to our scripts: https://github.com/CatalystCode/CNTK-faster-rcnn/pull/9 which fixed your issue. I'd suggest pulling the code and trying again. Please reach out to me if you have any more questions! :)

Steps for CPU:

git clone https://github.com/CatalystCode/CNTK-faster-rcnn.git
docker build -f Dockerfile-py3-cpu .
docker run -it hashfrombuild bash
python train.py \
  --tagged-images /cntk/Examples/Image/DataSets/Grocery/grocery/ \
  --num-train 200 \
  --num-epochs 1
python predict.py \
  --tagged-images /cntk/Examples/Image/DataSets/Grocery/grocery/ \
  --num-test 5 \
  --conf-threshold 0.82