Splitter
How to install or update the lib
# The .h5 models are installed along with the pip installation.
# There's no need to hardcode their path anywhere.
pip install git+https://gitlab.com/gpam/victor/SERVICES/splitter.git
# Or
pip install victor-services-splitter
How to uninstall the lib
pip uninstall victor-services-splitter
How to generate predictions
from splitter.model import ModelSplitter
# Setup the threading of the TensorFlow model operations
# (...)
model_splitter = ModelSplitter("path/to/model/page/image/features",
"path/to/model/page/classification")
# Create the image list. See the supported image types section
image_list = [...]
prediction_list = model_splitter.predict_pdf_pages(
image_list
)
# [1, 0, 0, 1, 1, 1, 0]
grouped_prediction_list = model_splitter.predict_pdf_pages(
image_list,
has_to_group_predictions=True
)
# [[1, 0, 0], [1], [1], [1, 0]]
precise_prediction_list = model_splitter.predict_pdf_pages(
image_list,
prediction_decimals=3
)
# [1.0, 0.312, 0.0, 0.963, 0.534, 0.744, 0.23]
Setup the threading of the TensorFlow model operations.
Read more at the TensorFlow docs about threading.
import tensorflow as tf
# a value of 0 means the system picks an appropriate number.
tf.config.threading.set_intra_op_parallelism_threads(
num_threads=0
)
# a value of 0 means the system picks an appropriate number.
tf.config.threading.set_inter_op_parallelism_threads(
num_threads=0
)
Supported image types
- Pillow
- Base64
- Bytes
- Image path ending with '.jpg', '.png' or '.jpeg'
Metadata
Release files for victor-services-splitter 0.1.1
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 |
|---|---|---|---|---|
| victor-services-splitter-0.1.1.tar.gz | 3.7 kB | Without provenance | Details for victor-services-splitter-0.1.1.tar.gz |
Release files / victor-services-splitter-0.1.1.tar.gz
| Download URL | victor-services-splitter-0.1.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5bfb2c0c831a383bb5c2f6b55d520235ba0b55340428f0b977d6a2201ecfdbf
|
|
BLAKE2b-256 checksum How to use checksums |
3ca30be143c769eaeb49afe876a7f38f06b4ec6c5d28e8c397f7046e216b8c7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3
|
Security for victor-services-splitter 0.1.1
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.