Comments (9)
Thank you!
I missed an argument. It should work now.
Let me know if there are any other problems.
from latex-ocr.
No problem!
The thing with the file is a bug right now. I've discovered it a while back, but I'm currently not really allowed to commit to this repo.
If you don't have a nvidia GPU in your system, that is handeled automatically (--no-cuda isn't needed, but also doesn't change anything)
From the error message it looks like torchvision is the problem here.
Try to reinstall that package
from latex-ocr.
Oh you're right, I don't know how I missed that torchvision was the problem.
The issue was that I had the Arch-package python-pytorch installed, while torch and torchvision were installed via pip. It seems that it tried to use the system-provided torch and the pip-provided torchvision.
Uninstalling the python-pytorch package and reinstalling torch and torchvision via pip fixed it, and everything seems to work now. Thanks.
from latex-ocr.
Feel free to reopen if the issue is not resolved.
from latex-ocr.
I am sorry if this is the wrong place to ask this, but I have a similar issue. When I start latexocr (GUI) or the command line program, I get the following error message:
UserWarning: Failed to load image Python extension: libc10_cuda.so: cannot open shared object file: No such file or directory
regardless if I start them with --no-cuda or not.
I should add that I installed the package via pip, did no additional training, and am running Arch with Python v3.10.5 .
from latex-ocr.
Looks more like a broken installation to me. Can you confirm the pytorch installation is valid?
This particular issue is resolved, I believe.
from latex-ocr.
I think so, at least running to commands provided in https://pytorch.org/get-started/locally/ worked fine. For the GUI application, it starts while throwing this error message, but hangs when trying to snip a formula.
from latex-ocr.
How about
import torch
print(torch.randn(2, device='cuda'))
and does the cli work?
from latex-ocr.
First of all, I want to say that I appreciate you answering this fast and helping me.
The python commands print
>>> import torch
>>> print(torch.randn(2, device='cuda'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/torch/cuda/__init__.py", line 211, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
which is to be expected, as my GPU is an AMD R9 290 and not nvidia, which is why I tried the "--no-cuda" flag.
The CLI output is
$ pix2tex -f Screenshot.png --no-cuda
/home/username/.local/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libc10_cuda.so: cannot open shared object file: No such file or directory
warn(f"Failed to load image Python extension: {e}")
Predict LaTeX code for image ("?"/"h" for help).
It seemingly ignores that I already specified a file. The only thing which does not just print the prompt again is when I enter the absolute path of the file, where it segfaults.
from latex-ocr.
Related Issues (20)
- Where is latex code stored and how do I capture it in a variable to post process it?
- Does the formula font have an effect when inserting an image?
- Screenshot doesn't work with grim on wayland HOT 1
- [bug] - Hugging Face Running Error
- AttributeError: module 'numpy' has no attribute 'float'. HOT 2
- Can similar methods be used to generate TikZ code from images?
- pdfs to latex HOT 1
- Issue with Qt6 on macOS: am I missing something? HOT 1
- Error in batchsize.
- Convert model Latex-OCR to ONNX sucessfully !
- latexocr snip window opaque Ubuntu 23.10 HOT 2
- latexocr sagment error regarding qt HOT 1
- Training with limited memory HOT 1
- logging error
- Models trained on 110 million large-scale datasets
- Clarifications on loss definition
- How to get rid of the $ sign in latexocr GUI output? HOT 1
- LaTeX without style components
- Formula recognition error HOT 5
- requests.exceptions.SSLError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /lukas-blecher/LaTeX-OCR/releases/download/v0.0.1/weights.pth (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latex-ocr.