Comments (6)
I had this issue, but I fixed it by using the version of detectron2
specified in the dev-requirements.txt
file: git+https://github.com/facebookresearch/[email protected]#egg=detectron2
This version differs with the version specified in the installation.md
file, which uses v0.5
. Fortunately, using that version also works for me.
I'm on linux and not using anaconda, so hopefully this fix will still work for you.
from layout-parser.
Hey @ashrewdmint , despite the fact that in dev-requirements.txt
is present the fix, I still got the _pickle.UnpicklingError
from layout-parser.
Hey @Balthus1989 and @ashrewdmint ! This has nothing to do with the version of detectron2
or torch
. Basically, the error occurs because pickle
does not load the model file due to its incorrect format, which in this case is an HTML returned by DropBox in the download attempt made based on the configuration passed to layoutparser
like, for example, lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config
.
I recommend you download the desired configuration file at this link and change the Dropbox URL to the address of the model on your computer. And then provide the address of your config.yaml file when initializing the layoutparser
.
Ex.: model = lp.Detectron2LayoutModel( "/Users/[youuser]/Downloads/config.yaml", label_map={ 0: "Text", 1: "Title", 2: "List", 3: "Table", 4: "Figure", })
from layout-parser.
Hey @pedrohavay , unfortunately this method still doesn't work for me.
Edit: installing detectron2==0.5 solved the issue. Using detectron2==0.6 always fails.
from layout-parser.
@junxi-liu is it possible to install an older version from source?
like python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
but with version 0.5 instead of the latest version? Else it doesn't match my torch version.
Edit: I found it out by myself.
Download the zip file (https://github.com/facebookresearch/detectron2/releases), unzip it and then run python -m pip install detectron2-0.5/
in the given directory.
from layout-parser.
@junxi-liu is it possible to install an older version from source? like
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
but with version 0.5 instead of the latest version? Else it doesn't match my torch version.Edit: I found it out by myself. Download the zip file (https://github.com/facebookresearch/detectron2/releases), unzip it and then run
python -m pip install detectron2-0.5/
in the given directory.
Really appreciate the help!
from layout-parser.
Related Issues (20)
- google-api-core error with lp.TesseractAgent(languages='eng')
- Watermark presents problems with bounding box generation
- AttributeError: 'GCVAgent' object has no attribute '_client'
- Detectron2LayoutModel requires the detectron2 library but it was not found in your environment HOT 4
- Failed to download https://www.dropbox.com/s/nau5ut6zgthunil/config.yaml?dl=1 HOT 2
- AttributeError: module 'PIL.Image' has no attribute 'LINEAR' HOT 4
- Support saving of layouts to open-standard hOCR file format.
- Update link to Detectron2 installation instruction HOT 1
- Improper results on scanned pdfs HOT 1
- Show Element Id when set to true breaks the code due to FreeTypeFont has no getsize attribute HOT 2
- Improper Documentation HOT 4
- Layout analysis custom training results are bad
- LayoutParser Installation Video
- Request for LINE Aggregation Level
- AttributeError: module 'layoutparser' has no attribute 'PaddleDetectionLayoutModel' HOT 1
- Including VGT pretrain model
- Not able to fetch all text data & Not able to extract text, table data in proper format HOT 1
- Cannot download the model on Windows!
- Layout blocks detected by models do not match blocks detected by Tesseract
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 layout-parser.