Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mindee/demo-python-sdk
Mindee Python SDK demo using Jupyter notebooks
https://github.com/mindee/demo-python-sdk
demo jupyter-notebook ocr python python-sdk sdk
Last synced: 7 days ago
JSON representation
Mindee Python SDK demo using Jupyter notebooks
- Host: GitHub
- URL: https://github.com/mindee/demo-python-sdk
- Owner: mindee
- License: apache-2.0
- Created: 2022-01-03T17:29:17.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-18T21:44:28.000Z (almost 3 years ago)
- Last Synced: 2023-03-03T20:13:28.237Z (over 1 year ago)
- Topics: demo, jupyter-notebook, ocr, python, python-sdk, sdk
- Language: Jupyter Notebook
- Homepage:
- Size: 1010 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Tutorials for Mindee Python SDK
These samples all use Juypter Notebooks.
Python requirements:
```
pip install -r requirements.txt
```* Mindee is used for the OCR data extraction
* JSON to read the outputs
* cv2, pyplot numpy are all used to create the charts, and draw shapes on the charts
* Math is used to round the pixel math to an integer.
* Pretty prints the JSON nicely.To start a Jupyter Notebook:
1. [install Jupyter](https://jupyter.org/install)
2. Start the Jupyter instance ```jupyter notebook```
3. A tab will open in the browser and you can naviagte to the ipynb Jupyter file you wish to examine.To use these dociuments, you'll need a [Mindee API key](platform.mindee.com). Each APi endpoint uses a different key - so you must generate the key for the endpoint you are working with.
There are 4 docs:
1. invoice
2. receipt
3. passport
4. license platesAdditionally, there are sample images for all of the endpoints. To test with a new document, sinply add to the directory, and change the path for the 'image' variable.
## Drawing the polygon boxes
In the invoice and license plate examples - not only are the various values extracted from the document, but a box is drawn around the location of several of the attributes. This is done by retrieving the polygon data from the Mindee response, converting to a pixel corrdiante, and the using openCV to draw a rectangle on the image.