Git Product home page Git Product logo

docparser's People

Contributors

bobld avatar j-rausch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docparser's Issues

DocParser Inference

Is there an inference code to pass my own input document using your pre-trained model and get the detected tables output?

Thank you.

[Question] Unexpected results when running on custom PDF files

Hello, thank you for the effort you've put into this repository. I've recently tried to run it against my own pdfs (converted to images)

Click here to see the image

outputname-01

And this was result:

Click here to see the image

outputname-01

My code to draw:

import argparse
import json
import logging
import os
import cv2

import skimage.io

from docparser import stage1_entity_detector


image_name="outputname-01.png"
sample_img_path = "/home/ubuntu/projects/pdf-expirements/DocParser/images/{}".format(image_name)
output_dir = "/home/ubuntu/projects/pdf-expirements/DocParser/demos/output"

entity_detector = stage1_entity_detector.EntityDetector()
entity_detector.init_model(default_weights="highlevel_wsft")

sample_img = skimage.io.imread(sample_img_path)
results = entity_detector.predict(sample_img)

image = cv2.imread(sample_img_path)

shapes = []
for pred in results["prediction_list"]:
  box = pred["bbox_orig_coords"].tolist()
  label = pred["class_name"]
  score = pred["pred_score"]
  shapes.append({"box": box, "label": label, "score": score})

for shape in shapes:
  y1, x1, y2, x2 = shape["box"]
  image = cv2.rectangle(image, (x1, y1), (x2, y2), (255, 0, 0), 2)


cv2.imwrite("{}/{}".format(output_dir, image_name), image)

Most of the bounding boxes were drawn very incorrectly. Am I doing the drawing wrong, or does it not work with files, which contain a structure like this. ? Thank you for your time.

How to generate table structures for ICDAR 2019 Modern Images

Hello,
Thanks for your work. I am trying to use your model to generate structures for the tables in ICDAR 2019 TRACK B2 Modern images. Please can you point me to the file to use and how to generate the structures for the tables in those images?

Thanks

License

Hi,
Thanks for sharing the DocParser!
Is there a license associated with this repo?
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.