Update README.md
#2
by
keremberke
- opened
README.md
CHANGED
@@ -30,18 +30,19 @@ model-index:
|
|
30 |
['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush']
|
31 |
```
|
32 |
|
|
|
33 |
### How to use
|
34 |
|
35 |
-
- Install
|
36 |
|
37 |
```bash
|
38 |
-
pip install -U
|
39 |
```
|
40 |
|
41 |
- Load model and perform prediction:
|
42 |
|
43 |
```python
|
44 |
-
from ultralyticsplus import YOLO,
|
45 |
|
46 |
# load model
|
47 |
model = YOLO('ultralyticsplus/yolov8s')
|
@@ -53,12 +54,14 @@ model.overrides['agnostic_nms'] = False # NMS class-agnostic
|
|
53 |
model.overrides['max_det'] = 1000 # maximum number of detections per image
|
54 |
|
55 |
# set image
|
56 |
-
|
57 |
|
58 |
# perform inference
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
63 |
```
|
64 |
|
|
|
30 |
['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush']
|
31 |
```
|
32 |
|
33 |
+
|
34 |
### How to use
|
35 |
|
36 |
+
- Install [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus):
|
37 |
|
38 |
```bash
|
39 |
+
pip install -U ultralyticsplus==0.0.14
|
40 |
```
|
41 |
|
42 |
- Load model and perform prediction:
|
43 |
|
44 |
```python
|
45 |
+
from ultralyticsplus import YOLO, render_result
|
46 |
|
47 |
# load model
|
48 |
model = YOLO('ultralyticsplus/yolov8s')
|
|
|
54 |
model.overrides['max_det'] = 1000 # maximum number of detections per image
|
55 |
|
56 |
# set image
|
57 |
+
image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
|
58 |
|
59 |
# perform inference
|
60 |
+
results = model.predict(image)
|
61 |
+
|
62 |
+
# observe results
|
63 |
+
print(results[0].boxes)
|
64 |
+
render = render_result(model=model, image=image, result=results[0])
|
65 |
+
render.show()
|
66 |
```
|
67 |
|