midv-500-models
The repository contains a model for binary semantic segmentation of the documents.
- Left: input.
- Center: prediction.
- Right: overlay of the image and predicted mask.
Installation
pip install -U midv500models
For more details: Example notebook
Dataset
Model is trained on MIDV-500: A Dataset for Identity Documents Analysis and Recognition on Mobile Devices in Video Stream.
Preparation
Download the dataset from the ftp server with
wget -r ftp://smartengines.com/midv-500/
Unpack the dataset
cd smartengines.com/midv-500/dataset/
unzip \*.zip
The resulting folder structure will be
smartengines.com
midv-500
dataset
01_alb_id
ground_truth
CA
CA01_01.tif
...
images
CA
CA01_01.json
...
...
...
...
...
To preprocess the data use the script
python midv500models/preprocess_data.py -i <input_folder> \
-o <output_folder>
where input_folder corresponds to the file with the unpacked dataset and output folder will look as:
images
CA01_01.jpg
...
masks
CA01_01.png
target binary masks will have values [0, 255], where 0 is background and 255 is the document.
Training
python midv500models/train.py -c midv500models/configs/2020-05-19.yaml \
-i <path to train>
Inference
python midv500models/inference.py -c midv500models/configs/2020-05-19.yaml \
-i <path to images> \
-o <path to save preidctions>
-w <path to weights>
Example notebook
Weights
Metadata
Release files for midv500models 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| midv500models-0.0.2.tar.gz | 9.1 kB | Without provenance | Details for midv500models-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| midv500models-0.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for midv500models-0.0.2-py2.py3-none-any.whl |
Total release size: 20.4 kB
Release files / midv500models-0.0.2.tar.gz
| Download URL | midv500models-0.0.2.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f315800d64a54bea9095b23e9d6da70c7c698d0973637e0be9fc0a3f10f2bb4
|
|
BLAKE2b-256 checksum How to use checksums |
fb17ae70bf3aacbb6f028c91946b24c181061f072a4a88a7b9efa748d5a7a1a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3
|
Release files / midv500models-0.0.2-py2.py3-none-any.whl
| Download URL | midv500models-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
af01509ce2d119ec6e08c052748b284cd4f1f1d64cdca831cef779a49dbef016
|
|
BLAKE2b-256 checksum How to use checksums |
ca2f66d12db9daa6f7d72f33a576f07999d40a409a253b3913199d145e9fc338
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3
|
Security for midv500models 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.