Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output from HF Spaces Demo doesn't match output from code. #1536

Closed
ajkdrag opened this issue Mar 28, 2024 · 3 comments
Closed

Output from HF Spaces Demo doesn't match output from code. #1536

ajkdrag opened this issue Mar 28, 2024 · 3 comments
Labels
type: bug Something isn't working

Comments

@ajkdrag
Copy link

ajkdrag commented Mar 28, 2024

Bug description

Output from HF Spaces Demo doesn't match output from code.

Code snippet to reproduce the bug

predictor = ocr_predictor(
        "db_resnet50",
        "crnn_vgg16_bn",
        pretrained=True,
        assume_straight_pages=True,
    export_as_straight_boxes=False
    ).to("cuda:0")

img = cv2.imread(str("myimg.png"), cv2.IMREAD_COLOR)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
res = predictor([img])

Error traceback

image

VS

image

Environment

DocTR version: 0.8.1
TensorFlow version: N/A
PyTorch version: N/A (torchvision N/A)
OpenCV version: N/A
OS: Debian GNU/Linux 11 (bullseye)
Python version: 3.8.18
Is CUDA available (TensorFlow): N/A
Is CUDA available (PyTorch): N/A
CUDA runtime version: 11.8.89
GPU models and configuration: GPU 0: Tesla T4
Nvidia driver version: 525.105.17
cuDNN version: Could not collect

Deep Learning backend

torch = true

@ajkdrag ajkdrag added the type: bug Something isn't working label Mar 28, 2024
@felixdittrich92
Copy link
Contributor

Hi @ajkdrag 👋,
Thanks for the feedback :)
The demo is not up to date with the main branch we have already a ticket to fix this #1090
CC @odulcy-mindee

But the result looks extrem different i will take a look / looks a bit weird 😅

@ajkdrag
Copy link
Author

ajkdrag commented Mar 29, 2024

Yes exactly. The demo is giving better results than the main branch. I am not sure if I am doing something wrong . I can share the image privately with you if needed.

@felixdittrich92
Copy link
Contributor

CC @odulcy-mindee
Close because already on track with #1090

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants