After running this line:
docker run --rm -it -v /home:/data -p 8004:8000 gasparjan/crnn_ocr:cpu
you will be dropped inside the container's command line. You can look around with ls
:
➜ sudo docker run --rm -it -v /home:/data -p 8004:8000 gasparjan/crnn_ocr:cpu
root@0e2914bb1aad:/#
root@0e2914bb1aad:/# ls -la
total 124
drwxr-xr-x 1 root root 4096 Apr 27 13:36 .
drwxr-xr-x 1 root root 4096 Apr 27 13:36 ..
-rwxr-xr-x 1 root root 0 Apr 27 13:36 .dockerenv
drwxr-xr-x 1 root root 4096 May 14 2019 bin
drwxr-xr-x 2 root root 4096 Apr 12 2016 boot
drwxr-xr-x 3 root root 4096 Apr 27 13:35 data
drwxr-xr-x 5 root root 360 Apr 27 13:36 dev
drwxr-xr-x 1 root root 4096 Apr 27 13:36 etc
drwxr-xr-x 2 root root 4096 Apr 12 2016 home
drwxr-xr-x 1 root root 4096 May 14 2019 lib
drwxr-xr-x 1 root root 4096 May 14 2019 lib64
drwxr-xr-x 2 root root 4096 Jan 22 2019 media
drwxr-xr-x 2 root root 4096 Jan 22 2019 mnt
drwxr-xr-x 2 root root 4096 May 14 2019 models
drwxr-xr-x 2 root root 4096 Jan 22 2019 opt
-rw-rw-r-- 1 root root 8034 May 11 2019 predict.py
dr-xr-xr-x 378 root root 0 Apr 27 13:36 proc
drwx------ 1 root root 4096 May 14 2019 root
drwxr-xr-x 1 root root 4096 May 14 2019 run
drwxr-xr-x 1 root root 4096 Jan 22 2019 sbin
drwxr-xr-x 2 root root 4096 Jan 22 2019 srv
dr-xr-xr-x 13 root root 0 Apr 27 13:37 sys
drwxrwxrwt 1 root root 4096 May 14 2019 tmp
-rw-rw-r-- 1 root root 8572 May 10 2019 train.py
drwxr-xr-x 1 root root 4096 Jan 22 2019 usr
-rw-rw-r-- 1 root root 23446 May 10 2019 utils.py
drwxr-xr-x 1 root root 4096 Jan 22 2019 var
root@0e2914bb1aad:/# ls -la /models
total 55892
drwxr-xr-x 2 root root 4096 May 14 2019 .
drwxr-xr-x 1 root root 4096 Apr 27 13:36 ..
-rw-r--r-- 1 root root 490 Jan 24 2019 arguments.txt
-rw-r--r-- 1 root root 11482392 Mar 24 2019 checkpoint_weights.h5
-rw-r--r-- 1 root root 34189880 Jan 24 2019 final_model.h5
-rw-r--r-- 1 root root 11482392 Jan 24 2019 final_weights.h5
-rw-r--r-- 1 root root 136 Jan 24 2019 loss_history.pickle.dat
-rw-r--r-- 1 root root 31729 Jan 24 2019 model.json
-rw-r--r-- 1 root root 15524 Jan 24 2019 model_summary.txt
So the file is at /models/model.json
inside the container!
As for the images, I couldn't find any images inside the container. I think you are meant to supply your own. In that case, look at the command (/home:/data
). This is a bind mount which means that /home
on your PC and /data
inside the container are the same folder now.
So I would try adding some images to your PC's /home
folder and then, inside the container, running:
python3 predict.py --G 0 --model_path /models/model.json \
--image_path /data \
--validate --num_instances 512 --max_len 21