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

[api] Add support of PDF / multi-image inputs in the API template #610

Closed
Tracked by #1074
fg-mindee opened this issue Nov 12, 2021 · 16 comments · Fixed by #1522
Closed
Tracked by #1074

[api] Add support of PDF / multi-image inputs in the API template #610

fg-mindee opened this issue Nov 12, 2021 · 16 comments · Fixed by #1522
Assignees
Labels
ext: api Related to api folder type: enhancement Improvement
Milestone

Comments

@fg-mindee
Copy link
Contributor

Currently, as specified in #609, the API template only supports single image input. With the latest version of docTR, it would be quite easy to change this to support PDF and multiple image inputs.

@fg-mindee fg-mindee added type: enhancement Improvement ext: api Related to api folder labels Nov 12, 2021
@fg-mindee fg-mindee added this to the 0.6.0 milestone Nov 12, 2021
@fg-mindee fg-mindee self-assigned this Nov 12, 2021
@frgfm frgfm mentioned this issue Jun 28, 2022
85 tasks
@felixdittrich92 felixdittrich92 modified the milestones: 0.6.0, 0.7.0 Sep 26, 2022
@SkaarFacee
Copy link
Contributor

Hey, can I start off working on this in case no one has ?

@felixdittrich92
Copy link
Contributor

Hey, can I start off working on this in case no one has ?

Sure :)

@felixdittrich92
Copy link
Contributor

@nikokks Still on it ? :)

@SkaarFacee
Copy link
Contributor

I apologize for the delay in responding to your request. Due to prior commitments, I was unable to attend to this matter sooner.

When attempting to install the required packages, I encountered an issue with the version dependency constraints of tensorflow-macos. This incompatibility prevented the installation of other essential Python packages. Has anyone else come across the issue ?

Fixes I have tried:

  • Removing the version constraint for tf in the requirements file
  • Changing python to version 3.8 and 3.9

@SkaarFacee
Copy link
Contributor

Just adding the initial error message for reference here

ERROR: Could not find a version that satisfies the requirement tensorflow==2.12.0 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0)
ERROR: No matching distribution found for tensorflow==2.12.0

@felixdittrich92
Copy link
Contributor

felixdittrich92 commented Feb 13, 2024

Hey @SkaarFacee 👋

Mh good question ^^
But from the traceback what happens if you pin TensorFlow to 2.13 or 2.14 or 2.15 ?

@SkaarFacee
Copy link
Contributor

Hey @felixdittrich92 :)
When I try TensorFlow 2.13, I get conflicting dependencies.
I tried with Tensorflow 2.14 as it had smaller amount of conflicting dependencies. That worked perfectly fine.

Thanks :)

@felixdittrich92
Copy link
Contributor

Hey @felixdittrich92 :) When I try TensorFlow 2.13, I get conflicting dependencies. I tried with Tensorflow 2.14 as it had smaller amount of conflicting dependencies. That worked perfectly fine.

Thanks :)

Mh crazy 😅 Unfortunately i can't test it without a Mac.. but nice that it works now 😊

@SkaarFacee
Copy link
Contributor

I came across another issue 😢
While trying run the api locally with the command

uvicorn --reload --workers 1 --host 0.0.0.0 --port=8002 --app-dir api/ app.main:app

I get the error saying

File "/Users/adi/Skaarfacee/doctr/api/app/config.py", line 8, in <module>
    import doctr
ModuleNotFoundError: No module named 'doctr

When I try importing doctr in my virtual env, it does get imported successfully

@felixdittrich92
Copy link
Contributor

Mhh...

cd doctr/api
uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8080

Does not work ?

@SkaarFacee
Copy link
Contributor

I'll give that a try and report back on the results. While I remember trying that and then encountering an error before, I'm not entirely clear on the specific details of the error. I'll do my best to investigate further and provide an update as soon as possible.

@SkaarFacee
Copy link
Contributor

Hey @felixdittrich92,
I did try running the command and it led to the same error :/

@SkaarFacee
Copy link
Contributor

Hey, I am still stuck with this error. reinstalling the virtual env and that did not help the issue either

@felixdittrich92
Copy link
Contributor

Hey @SkaarFacee 👋,

Sry for the late response, but if you run it as described in https://github.com/mindee/doctr/blob/main/api/README.md it runs without issues ?

@SkaarFacee
Copy link
Contributor

Yes, I did try that, I did create the environment using conda and then used pip. Could that be the problem ? I used anaconda to switch between python versions easily

@felixdittrich92
Copy link
Contributor

Hey @SkaarFacee 👋

pip on conda works fine but check that you use the correct env if you start the api
(If you use VSCode you can also see which interpreter is used (with conda it shows also which env is used)

conda list python-doctr
python3 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: api Related to api folder type: enhancement Improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants