Closed ghost closed 4 years ago
Invocation should be
home@home-lnx:~/programs/ocrd_anybaseocr$ ocrd-anybaseocr-tiseg -m ./data/mets.xml -I OCR-D-PAGE-CROP -O OCR-D-PAGE-TISEG -P seg_weights models/seg_model.hdf5
(replace -p models/seg_model.hdf5
by -P seg_weights models/seg_model.hdf5
)
Or, since the default value for seg_weights
is models/seg_model.hdf5
, just
home@home-lnx:~/programs/ocrd_anybaseocr$ ocrd-anybaseocr-tiseg -m ./data/mets.xml -I OCR-D-PAGE-CROP -O OCR-D-PAGE-TISEG
@kba Nope, re-open this issue i keep finding some weird bugs in this project, it's either this repo dependencies need re-checking, or the code needs re-testing. Further details of how i am testing are here.
(ocrd) home@home-lnx:~/programs/ocrd_anybaseocr$ ocrd-anybaseocr-tiseg -m ./data/mets.xml -I OCR-D-PAGE-CROP -O OCR-D-PAGE-TISEG -P seg_weights ./models/seg_model.hdf5
Using TensorFlow backend.
2020-08-04 17:59:51.096741: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-08-04 17:59:51.096800: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-08-04 17:59:51.096811: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
17:59:51.681 INFO OcrdAnybaseocrTiseg - No output file group for images specified, falling back to 'OCR-D-IMG-TISEG'
17:59:51.682 ERROR OcrdAnybaseocrTiseg - Segementation model weights file was not found at './models/seg_model.hdf5'. Make sure the `seg_weights` parameter
points to the local model weights path.
Segementation model weights file was not found at './models/seg_model.hdf5'
Is the model at this location?
home@home-lnx:~/programs/ocrd_anybaseocr/models$ tree
.
├── latest_net_G.pth
└── seg_model.hdf5
0 directories, 2 files
home@home-lnx:~/programs/ocrd_anybaseocr$ tree -d
.
├── data
│ ├── OCR-D-GT-SEG-BLOCK
│ ├── OCR-D-GT-SEG-LINE
│ ├── OCR-D-GT-SEG-PAGE
│ ├── OCR-D-IMG
│ ├── OCR-D-IMG-BIN
│ ├── OCR-D-IMG-CROP
│ ├── OCR-D-IMG-DESKEW
│ ├── OCR-D-PAGE-BIN
│ ├── OCR-D-PAGE-CROP
│ └── OCR-D-PAGE-DESKEW
├── models
├── ocrd_anybaseocr
│ ├── cli
│ ├── models
│ ├── mrcnn
│ └── pix2pixhd
│ ├── data
│ ├── datasets
│ │ └── cityscapes
│ │ ├── test_inst
│ │ ├── test_label
│ │ ├── train_img
│ │ ├── train_inst
│ │ └── train_label
│ ├── imgs
│ ├── models
│ ├── options
│ ├── scripts
│ └── util
└── tests
31 directories
.
@deepseek can you try again with the latest release? The tiseg test call succeeds so it is probably an issue, where the code is changing directories somewhere - can you try with an absolute path to the model? If that fixes the problem, I can dig into the code to see where os.getcwd()
changes.
sure, let me have a look
i tested in a new environment with latest master. Both issues that i opened are still not solved.
You have done a great job in creating this project along with your contributions to the open-source community, thank you. and i am sure that you can solve these issues. kindly, leave this issue closed, i am just passing by.