Skip to main content

Read, process, and integrate data from inventory cards.

Project description

Inventory Card Reader

This repository contains code to read, process, and integrate data from inventory cards. Currently it uses (pero-ocr)[https://github.com/DCGM/pero-ocr] for text recognition.

Installation

  1. Install the package from pip using pip install inventory-card-reader
  2. Or clone the repository and do your thing

Prepare config files

  • Create a config yaml to specify text regions in the inventory card and their mapping to table columns
    regions: 
        <<key1>>: [x1,y1,x2,y2]
        <<key2>>: [x1,y1,x2,y2]
        <<...>>: [...]

Where key define the column names to be extracted and x1,y1,x2,y2 denote the relative coordinates of the region where the values for the respective columns can be found in the inventory card. (x1,y1) denote the coordinates of the top left corner of the region, and x2,y2 the bottom right.

For example:

    regions:
        Gegenstand: [0.047,0,1,0.077],
        "Inv. Nr.": [0.047,0.077,0.275,0.135],
  • Download the pero ocr model weights provided by the pero developers (here)[https://nextcloud.fit.vutbr.cz/s/NtAbHTNkZFpapdJ], unzip the file and store the .pt and .pt.cpu files in the pero_resources folder
  • Start the extraction by invoking read_inventory_cards <<config>> <<input_folder>> where <<config>> is the path to the config yaml file described above and <<input folder>> the path to a directory of scanned jpgs of inventory cards to be processed.

Contributing

I'm happy to receive feedback and code contributions. Feel free to open issues or create pull requests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inventory_card_reader-0.0.16.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inventory_card_reader-0.0.16-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file inventory_card_reader-0.0.16.tar.gz.

File metadata

  • Download URL: inventory_card_reader-0.0.16.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for inventory_card_reader-0.0.16.tar.gz
Algorithm Hash digest
SHA256 d84b7f37c31b658eecdc57e481292e99ca75546ac0e0caf3b1c7f332edc74f92
MD5 d7603ec03b52c8974a1539bc2f215c9d
BLAKE2b-256 d57e229341ea14d466205ddc386e71e0d2ef0011a1650c99f67d1ba9b4a37d7a

See more details on using hashes here.

File details

Details for the file inventory_card_reader-0.0.16-py3-none-any.whl.

File metadata

File hashes

Hashes for inventory_card_reader-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 6cc67685a13dafc803d3746afb22f700e79e627f25982c1f4d84659c93d7159e
MD5 4e4e8648c84fcecf6917787ccbd4b631
BLAKE2b-256 4126627697c482138e2310dea759db4cea20c2b348ef3cec23f71b2330761d24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page