Giter Site home page Giter Site logo

Comments (6)

ashrewdmint avatar ashrewdmint commented on June 9, 2024 2

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.

Balthus1989 avatar Balthus1989 commented on June 9, 2024

Hey @ashrewdmint , despite the fact that in dev-requirements.txt is present the fix, I still got the _pickle.UnpicklingError

from layout-parser.

pedrohavay avatar pedrohavay commented on June 9, 2024

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.

junxi-liu avatar junxi-liu commented on June 9, 2024

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.

fabmeyer avatar fabmeyer commented on June 9, 2024

@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.

BiboyQG avatar BiboyQG commented on June 9, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.