Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexcg1/executor_image_uri_to_blob

Jina Executor: Convert image URI to blob
https://github.com/alexcg1/executor_image_uri_to_blob

Last synced: 16 days ago
JSON representation

Jina Executor: Convert image URI to blob

Awesome Lists containing this project

README

        

# 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 `blob`s).

## Usage

#### via Docker image (recommended)

```python
from jina import Flow

f = Flow().add(uses='jinahub+docker://ImageUriToBlob')
```

#### via source code

```python
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})`