You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I found QReader to be the best solution to catch hard to read QR codes, now I can't live without it.
The problem is I tried tu use pyinstaller with it but no success. I use Python 3.9 on Windows 10. My example code is:
It works with no issues inside PyCharm, but when I try to run the exe made with pyinstaller I get this:
C:\Users\Filip\PycharmProjects\testpyinstallqr\dist\main>main.exe
torchvision\io\image.py:13: UserWarning: Failed to load image Python extension:
torch\_jit_internal.py:839: UserWarning: Unable to retrieve source for @torch.jit._overload function: <function _DenseLayer.forward at 0x000001EEE768F550>.
warnings.warn(
torch\_jit_internal.py:839: UserWarning: Unable to retrieve source for @torch.jit._overload function: <function _DenseLayer.forward at 0x000001EEE768F790>.
warnings.warn(
Downloading weights...: 100%|████████████████████████████████| 74.8M/74.8M [00:08<00:00, 8.94MiB/s]
Traceback (most recent call last):
File "main.py", line 14, in <module>
File "qreader.py", line 26, in __init__
File "qrdet.py", line 27, in __init__
File "yolov7_package\model_utils.py", line 147, in __init__
File "yolov7_package\models\experimental.py", line 242, in attempt_load
File "torch\serialization.py", line 789, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "torch\serialization.py", line 1131, in _load
result = unpickler.load()
File "torch\serialization.py", line 1124, in find_class
return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'models'
[1940] Failed to execute script 'main' due to unhandled exception!
I'm a beginner so every help would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
I have been doing a bit of research and it seems that it seems that there is more people dealing with problems when using Pytorch together with Pyinstaller. (Pytorch is the Deep Learning library that implements the architecture of the YoloV7 model trained to detect QRs). If you google Pytorch with Pyinstaller there are a lot of forums that could offer some help with that problem.
Anyway, I'll make some research on my side and I will let you know if I find something that could help.
Thanks a lot for using QReader! It was a very small project I developed to solve some problems I had when reading difficult QRs, and that's amazing to see people building tools with it! In the following weeks I will try to find and solve that kind of problems that some people are facing when integrating it with different frameworks, and I will probably train a new model to make it more robust against difficult situations.
Thanks for a quick reply!
I found this article which might be useful. yolov5 issue 353
I don't understand half of it but it seems to describe a similar issue.
Hi, I found QReader to be the best solution to catch hard to read QR codes, now I can't live without it.
The problem is I tried tu use pyinstaller with it but no success. I use Python 3.9 on Windows 10. My example code is:
It works with no issues inside PyCharm, but when I try to run the exe made with pyinstaller I get this:
I'm a beginner so every help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: