logo
Browse Source

Update yolov5 README

Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
main
shiyu22 3 years ago
parent
commit
da8f8bbb85
  1. 9
      README.md
  2. BIN
      results2.png
  3. BIN
      test.png

9
README.md

@ -29,7 +29,7 @@ Writing the pipeline in the simplified way
```Python
import towhee
towhee.glob('./test.jpg') \
towhee.glob('./test.png') \
.image_decode() \
.object_detection.yolov5() \
.show()
@ -45,11 +45,12 @@ import towhee
towhee.glob['path']('./test.png') \
.image_decode['path','img']() \
.object_detection.yolov5['img', ('box', 'class', 'score')]() \
.select('box', 'class', 'score') \
.image_crop[('img', 'box'), 'object'](clamp = True) \
.select['img','object']() \
.show()
```
<img src="./results2.png" alt="results1" height="90px"/>
<img src="./results2.png" alt="results1" height="190px"/>
@ -81,7 +82,7 @@ The operator takes an image as input. It first detects the objects appeared in t
**Return**: List[(int, int, int, int)], List[str], List[float]
**Return**: List[List[(int, int, int, int)], ...], List[str], List[float]
The return value is a tuple of (boxes, classes, scores). The *boxes* is a list of bounding boxes. Each bounding box is represented by the top-left and the bottom right points, i.e. (x1, y1, x2, y2). The *classes* is a list of prediction labels. The *scores* is a list of the confidence scores.

BIN
results2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 667 KiB

BIN
test.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 306 KiB

Loading…
Cancel
Save