diff --git a/README.md b/README.md index c5fd4c7..04f35c8 100644 --- a/README.md +++ b/README.md @@ -27,19 +27,22 @@ This operator uses [PyTorch.yolov5](https://pytorch.org/hub/ultralytics_yolov5/) Writing the pipeline in the simplified way ```Python -from towhee.dc2 import pipe, ops +from towhee.dc2 import pipe, ops, DataCollection p = ( pipe.input('url') .map('url', 'img', ops.image_decode.cv2_rgb()) .flat_map('img', ('boxes', 'class', 'score'), ops.object_detection.yolo()) - .output('class', 'score') + .flat_map(('img', 'boxes'), 'object', ops.towhee.image_crop()) + .output('url', 'object', 'class', 'score') ) res = p('test.png') -res.get() +DataCollection(res).show() ``` +result +
diff --git a/result.png b/result.png new file mode 100644 index 0000000..1ab3903 Binary files /dev/null and b/result.png differ