logo
Browse Source

change input data param

main
zhang chen 3 years ago
parent
commit
72f7459dcb
  1. 2
      README.md
  2. 26
      image_embedding_resnet50.yaml

2
README.md

@ -21,7 +21,7 @@ The pipeline returns a tuple `Tuple[('feature_vector', numpy.ndarray)]` containi
- feature_vector: - feature_vector:
- the embedding of input image - the embedding of input image
- data type: `numpy.ndarray` - data type: `numpy.ndarray`
- shape: (2048,)
## How to use ## How to use
1. Install [Towhee](https://github.com/towhee-io/towhee) 1. Install [Towhee](https://github.com/towhee-io/towhee)

26
image_embedding_resnet50.yaml

@ -14,22 +14,6 @@ operators:
df: 'image' df: 'image'
iter_info: iter_info:
type: map type: map
-
name: 'preprocessing'
function: 'towhee/transform-image' # default author is towhee
tag: 'main' # optional
init_args:
size: 256
inputs:
-
df: 'image'
name: 'img_path'
col: 0
outputs:
-
df: 'image_preproc'
iter_info:
type: map
- -
name: 'embedding_model' name: 'embedding_model'
function: 'towhee/resnet-image-embedding' # same as 'resnet50-image-embedding', default user is towhee function: 'towhee/resnet-image-embedding' # same as 'resnet50-image-embedding', default user is towhee
@ -38,8 +22,8 @@ operators:
model_name: 'resnet50' model_name: 'resnet50'
inputs: inputs:
- -
df: 'image_preproc'
name: 'img_tensor'
df: 'image'
name: 'img_path'
col: 0 col: 0
outputs: outputs:
- -
@ -73,12 +57,6 @@ dataframes:
- -
name: 'img_path' name: 'img_path'
vtype: 'str' vtype: 'str'
-
name: 'image_preproc'
columns:
-
name: 'img_transformed'
vtype: 'torch.Tensor'
- -
name: 'embedding' name: 'embedding'
columns: columns:

Loading…
Cancel
Save