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.15.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for inventory_card_reader-0.0.15.tar.gz
Algorithm Hash digest
SHA256 c660b85d8a84be9f1f2ba6e9538d202be710610bf3280c8497627d075a39c82f
MD5 d050d4de03b03ef7e36bbd1b58176e6b
BLAKE2b-256 86e164eb66d931f61338ddc05ba00378e71c2b18254ace795b9f7bf03bcee9e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for inventory_card_reader-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 328555af5bca745b6672cd33f3ab95a6cd8d3dbb464d81042531a0ab32e5b966
MD5 8f3a29a2b4295337863ca7f3bc159516
BLAKE2b-256 fb2635880323daa8ff02ba9c52a56015ed7d7fd5ba96fff1980ac49de815ba30

See more details on using hashes here.

Supported by

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