logo
Browse Source

update readme

Signed-off-by: junjiejiangjjj <junjie.jiang@zilliz.com>
main
junjiejiangjjj 2 years ago
parent
commit
88c112f50e
  1. 24
      README.md

24
README.md

@ -25,26 +25,18 @@ Load a image from path './dog.jpg'.
*Write the pipeline in simplified style:*
```python
import towhee
from towhee.dc2 import pipe, ops, DataCollection
towhee.glob('./dog.jpg') \
.image_decode.cv2() \
.show()
```
*Write a same pipeline with explicit inputs/outputs name specifications:*
```python
import towhee
p = (
pipe.input('url')
.map('url', 'image', ops.image_decode.cv2())
.output('image')
)
towhee.glob['path']('./dog.jpg') \
.image_decode.cv2['path', 'img']() \
.select['img']() \
.show()
DataCollection(p('./dog.jpg')).show()
```
<img src="./show_result.jpg" height="150px"/>
@ -75,7 +67,7 @@ An image decode operator takes an image path as input. It decodes the image back
**img**: *str*
Image file path.
Local file path or http url.

Loading…
Cancel
Save