Error when trying to use SATRN model
fattynoparents opened this issue · comments
What happened?
How to use the Riksarkivet/satrn_htr
model with htrflow?
When trying to add it to the pipeline config and run htrflow pipeline pipeline 1.jpg
I get the following error:
NotImplementedError: Model satrn_htr is not supported. The available models are: DiT, LLavaNext, TrOCR, WordLevelTrOCR, YOLO.
The same happens if I try to use the Riksarkivet/rtmdet_lines
model for segmentation.
The yolo
and Riksarkivet/trocr-base-handwritten-hist-swe-2
models work fine.
Steps To Reproduce
No response
Relevant log output
No response
Hi,
Thanks for opening an issue.
HTRflow uses OpenMMLab's implementation of Satrn and RTMDet. It depends on the packages mmocr
, mmdet
and mmcv
. These are not currently included in the HTRflow installation and need to be installed separately. Install them with:
pip install mmdet==3.1.0 mmocr
For mmcv
, follow OpenMMLab's instructions on how to pick a version that suits your environment: https://mmcv.readthedocs.io/en/latest/get_started/installation.html#install-with-pip
We've yet only used and tested HTRflow in a Python 3.10 environment. If you still run into issues, try switching to 3.10.
Thanks I have managed to use the Satrn model in a Python 3.10 environment after having installed the mmocr, mmdet and mmcv packages.