layout-parser
layout-parser copied to clipboard
Cannot run the model on Windows.
Hi, Thank you very much for your brilliant work. I've just passed the first step to install the package on my Windows 10. However, I am currently stuck with the second step to run the model. Would you have any hints to solve this error? Please check out the attached files below if you have a moment. Thank you very much.
Push! Have exact the same error. Help would be greatly appreciated
Hmmm very interesting. Looking into it.
Hmmm very interesting. Looking into it.
Hey loliposhock! Thanks for the great work and your help is much appreciated. Could you tell me on which system setup (python version, windows/linux etc pp.) the package is working for you? I am not able to get the lp.detrectron running (no matter which different version etc I install that were mentioned by other people here in the threads). Thanks a lot!
Detectron2 on windows is not supported:
- Can I install detectron2 on Win10? see https://github.com/facebookresearch/detectron2/issues/9 We do not officially support windows, but given that maskrcnn-benchmark can run on win10, it probably won't take a lot of changes to run detectron2 on win10.
More details on the link
-
There is conansherry implemtentation: https://github.com/conansherry/detectron2
-
https://ivanpp.cc/detectron2-walkthrough-windows/
-
There are some reports that in version 0.3 It can be simply installed it with conda. but user report issues see the thread at point 1.
Have you considered using mmdetection that relies on mmcv and mmpycocotools, instead of detectron2?
All models in detectron2 + tens of sota pretrained models are present in mmdetection model zoo.
Moreover, they support both windows and linux. They can be directly installed by pip install mmdet
in all platforms.
Have you considered using mmdetection that relies on mmcv and mmpycocotools, instead of detectron2?
All models in detectron2 + tens of sota pretrained models are present in mmdetection model zoo.
Moreover, they support both windows and linux. They can be directly installed by
pip install mmdet
in all platforms.
Yes! It's actually on the roadmap, see https://github.com/Layout-Parser/layout-parser/blob/master/.github/CONTRIBUTING.md . And MMOCR is more relevant: https://github.com/open-mmlab/mmocr .
Have you considered using mmdetection that relies on mmcv and mmpycocotools, instead of detectron2? All models in detectron2 + tens of sota pretrained models are present in mmdetection model zoo. Moreover, they support both windows and linux. They can be directly installed by
pip install mmdet
in all platforms.Yes! It's actually on the roadmap, see https://github.com/Layout-Parser/layout-parser/blob/master/.github/CONTRIBUTING.md . And MMOCR is more relevant: https://github.com/open-mmlab/mmocr .
Good to hear that. Thanks for providing the roadmap!
Have the same error, but the cache dir is iopath_cache instead of fvcore_cache
push, same here (Win10 user)
A fix for this is to clone and modify iopath, since its a Windows10 file naming error.
So clone iopath (this version worked for me)
git clone https://github.com/facebookresearch/iopath --single-branch --branch v0.1.8
Change iopath/iopath/common/file_io.py; class: HTTPURLHandler; method: _get_local_path line 753 (line number might change with newer versions)
- from this:
filename = path.split("/")[-1]
- to this:
filename = parsed_url.path.split("/")[-1]
Then call:
pip install -e iopath
And it will work.
Also detectron2v0.4 didnt work. Installed the latest one via:
python -m pip install "git+https://github.com/facebookresearch/detectron2.git"
The detectron2 installation will overwrite your modified iopath version because of dependency conflict, so its best to install iopath last. But it should work ok.
Update: It should also work with iopath v0.1.7, but i mentioned the newer one because it is in their GitHub tag release
@peter-malik thanks for the guidance! I made it work that way, albeit a somwhat dirty workaround I must damit...
Hi @peter-malik, thank you very much, your solution worked on my win10.
Doesn't address the problem of running natively on Windows but a possible workaround for Win 10 users. I have a working install using WSL Ubuntu 20.0 and Jupyter-Notebook sideloaded on Linux and accessed through the browser.
I have the same issue and have been unable to get the model path to work. Is there a fix for this soon?
As I am forced to work on Windows I downloaded config files and weights, thus feeding config_path
and model_path
to DetectronLayoutModel :P
As for detectron, indeed, it is pain in the neck to make it work on Windows. That worked for me:
conda install pywin32
pip install Cython
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
pip install git+https://github.com/DGMaxime/detectron2-windows.git
Hope it will help somebody :)
As I am forced to work on Windows I downloaded config files and weights, thus feeding
config_path
andmodel_path
to DetectronLayoutModel :P As for detectron, indeed, it is pain in the neck to make it work on Windows. That worked for me:conda install pywin32 pip install Cython pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI pip install git+https://github.com/DGMaxime/detectron2-windows.git
Hope it will help somebody :)
Thanks so much. This worked for me and saved me hours.
One workaround I found is, to change the WEIGHTS path inside the config.yaml file.
If the path is like
WEIGHTS: https://www.dropbox.com/s/8v4uqmz1at9v72a/model_final.pth?dl=1
Change it to
WEIGHTS: https://www.dropbox.com/s/8v4uqmz1at9v72a/model_final.pth
By removing the ?dl=1 at the end of the path resolved the OS Error for me.
One workaround I found is, to change the WEIGHTS path inside the config.yaml file.
If the path is like
WEIGHTS: https://www.dropbox.com/s/8v4uqmz1at9v72a/model_final.pth?dl=1
Change it to
WEIGHTS: https://www.dropbox.com/s/8v4uqmz1at9v72a/model_final.pth
By removing the ?dl=1 at the end of the path resolved the OS Error for me.
can you plz send me the config.yaml file plz