GithubHelp home page GithubHelp logo

peetio / diard Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 7.0 10.88 MB

From document (PDF) or document images to analysis ready semi-structured data.

License: Apache License 2.0

Python 97.06% JavaScript 2.20% CSS 0.74%

diard's People

Contributors

peetio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

diard's Issues

Empty Data when using TableExtractor

Hi, I have issues when using TableExtractor.

first, the bottom_y = rows[-1]["bbox"][3] in tables.py line 142 variable seems not to be used in any of the code, or i am wrong?

after I comment on that line, it works, and into the second one

second, why i always get empty result pandas.errors.EmptyDataError: No columns to parse from file? trying to lower the threshold but it is still the same.

and last thing, maybe you could check roi = image.crop((xmin, ymin, xmax, ymax)) in tables.py line 56, i get this error ValueError: Coordinate 'lower' is less than 'upper' and i try to change the values like this one roi = image.crop((xmax, ymax, xmin, ymin))

Error when extracting tables

The layout detected table on pdf but when I enable table detection, it throws the following error.

Traceback (most recent call last):

  File "/var/folders/kt/7g6lg6l15s96drlgk_p123tc0000gp/T/ipykernel_81639/3626377987.py", line 2, in <module>
    doc.extract_layouts(visualize=True, segment_sections=True)

  File "/Users/rmehta/Diard/modules/document.py", line 361, in extract_layouts
    self.__set_extracted_data(b, img, page, j)

  File "/Users/rmehta/Diard/modules/document.py", line 262, in __set_extracted_data
    snippet, lang=self.lang, debug=False, threshold=0.7

  File "/Users/rmehta/Diard/modules/tables.py", line 420, in get_table_data
    objs = structure_table(objs, table_bbox)

  File "/Users/rmehta/Diard/modules/tables.py", line 142, in structure_table
    bottom_y = rows[-1]["bbox"][3]

IndexError: list index out of range

The pretrained model I used has been downloaded as given in instructions. pubtables1m_detection_detr_r18.pth

ModuleNotFoundError: No module named 'datasets.transforms'

Traceback (most recent call last):
  File "main.py", line 8, in <module>
    from modules.tables import TableExtractor
  File "/*/Diard/modules/tables.py", line 18, in <module>
    import datasets.transforms as R
ModuleNotFoundError: No module named 'datasets.transforms'

An error occurs when running the code:#python main.py --overwrite --skip-failures

How to fine tune DiT on custom data for Object Detection task?

Thanks for the code. There's one question from my side that given all the bounding boxes for the image, how can we fine tune DiT on objection detection task?

Let's suppose I want to predict 2 different types of BBoxes on my images, how can I do that? What would be the changes in config file, code etc? I don't have masks nor do I want to predict. Just the bounding boxes.

I have asked a similar question here

Any blog, code, your code etc etc would be helpful.

thanks in advance :)

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.