Skip to content

Page orientation model redownloading when container starts #66

Answered by felixdittrich92
DJay921 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey 👋;

A quick fix would be:

from onnxtr.models import detection, recognition, mobilenet_v3_small_page_orientation, mobilenet_v3_small_crop_orientation
from onnxtr.models import ocr_predictor
from onnxtr.models.classification.zoo import page_orientation_predictor, crop_orienatation_predictor

detection_model_path = os.path.abspath('onnx/onnxtr-db-mobilenet-v3-large.onnx')
recognition_model_path = os.path.abspath('onnx/onnxtr-crnn-mobilenet-v3-large.onnx')
page_orientation_model_path = os.path.abspath('onnx/mobilenet_v3_small_page_orientation-60606ce4.onnx')
crop_orientation_model_path = ...


det_model = detection.db_mobilenet_v3_large(detection_model_path)
rec_model = recognition.crnn_mo…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@DJay921
Comment options

@felixT2K
Comment options

Answer selected by DJay921
Comment options

You must be logged in to vote
1 reply
@felixdittrich92
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants