Skip to main content

Client for OCR predictions against TensorFlow Serving

Project description

TensorFlow Serving Client

Client for OCR predictions against TensorFlow Serving

pip install tf-serving

Model

The served model must return the following schema:

{
  preds: StringTensor[BATCH x TOP_PATHS],
  logprobs: FloatTensor[BATCH x TOP_PATHS]
}

Usage

from tf.serving import predict, encode64

with open('path/to/image.jpg', 'rb') as f:
  img = encode64(f.read())

await predict([img], host='http://localhost', port=8501, endpoint='/v1/models/ocr:predict')
# Right(value=[ImagePreds(preds=['Place', 'Piace', ...], logprobs=[-0.187645972, -2.03857613, ...])], tag='right')

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

tf_serving-0.1.6.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

tf_serving-0.1.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file tf_serving-0.1.6.tar.gz.

File metadata

  • Download URL: tf_serving-0.1.6.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for tf_serving-0.1.6.tar.gz
Algorithm Hash digest
SHA256 588e34d61a453d7cafbab9fd49cb40080ceb08e81bd6b819e0b82b131247c507
MD5 00946ebbd1eafbebcfe89227f2df528f
BLAKE2b-256 ed4dbe7d5038bed25545e7a98e6a2437e4696d5f3fdbc29efb5659a344e3665f

See more details on using hashes here.

File details

Details for the file tf_serving-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: tf_serving-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for tf_serving-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad2f2082d6c70f07bf46da5644e4dc83c55b677202fe9fa4ac271d01d0c0277
MD5 634576e720a01b35ba2fbd1a61dea446
BLAKE2b-256 fbceee105d64f4a2f1e30369982b6e737099dea76c3bfb5a215362abe40b4879

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