Coder Social home page Coder Social logo

pdf-to-paragraph's Introduction

pdf から textbox を取り出して

Alt text

annotation アプリでラベルを選ぶ

Alt text

手順

1. データの準備

論文集を取得する。

wget hoge.zip
unzip hoge
remove img/, html/ and index.html in unzipped dir

2. データ形式の変換

pdf を png に変換する。そして、label studio の task 形式 (json) に変換する。

python tools/pdf_to_img.py
python tools/make_task.py

TODO: ぎりぎりまで dpi 小さくしたい TODO: command line arg で呼び出せる幼羽にする

3. label studio の構築

まず環境変数を定義する。

LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/path/to/repository

LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT はこのリポジトリの絶対パスを指定する。

できたら起動する。

pip install label-studio
label-studio start pdf-to-paragraph --init \
    --username [email protected] --password hoge \
    --label-config interface.xml

4. label studio と local storage を紐付ける

手動で UI を操作する必要がある。

https://labelstud.io/guide/storage#Local-storage

設定項目は以下:

path: /path/to/data-dir
filter: .*json

参考

pdf-to-paragraph's People

Contributors

yuji96 avatar

Stargazers

 avatar Verb avatar Kaito Sugimoto avatar Hayato Tsukagoshi avatar seiichi avatar

Watchers

 avatar

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.