hanxiao / executor_image_uri_to_blob

Jina Executor: Convert image URI to blob

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImageUriToBlob

This allows you to use uri-to-blob conversion in the Flow rather than during doc processing.

Why?

  • Instead of processing input and query images separately, use one Executor to do them both.
  • Saves you having to write a for loop to convert every image (since many encoders expect blobs).

Usage

via Docker image (recommended)

from jina import Flow
	
f = Flow().add(uses='jinahub+docker://ImageUriToBlob')

via source code

from jina import Flow
	
f = Flow().add(uses='jinahub://ImageUriToBlob')
  • To override __init__ args & kwargs, use .add(..., uses_with: {'key': 'value'})
  • To override class metas, use .add(..., uses_metas: {'key': 'value})

About

Jina Executor: Convert image URI to blob


Languages

Language:Python 100.0%