How do I grayscale my documentfile? #64
-
I wanted to improve the inference time and accuracy so I wanted to experiment with Grayscaling the image, I understand Grayscale transform is currently not available, right? I was trying to pass the grayscale param to my |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @DJay921 👋 , You can do the following:
But this shouldn't change anything on the inference latency additional all the models are mainly trained on RGB images and only while training some samples are augmented by grayscaling. Could you share an short snippet how you use OnnxTR ? Maybe there are some tricks you missed :) Best, |
Beta Was this translation helpful? Give feedback.
So under the hood every image is resized to 1024x1024 by keeping the aspect ratio and symmetric padding (If not changed by the users args).
Especially with
assume_straight_pages=False
you have following options:disable_crop_orientation=True
: If your images doesn't contain vertical rotated text elements - huge speed-updisable_page_orientation=True
: If your images are maximum by -90 - 90 degrees rotated - small speed-upAdditional there is also the option for
straighten_pages=True
It does really depend on the documents you want to process which combination works best for you :)