Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme #198

Merged
merged 2 commits into from
Dec 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 8 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You can finally install <a href="https://github.com/ultralytics/yolov5">YOLOv5 o
<br>
This yolov5 package contains everything from ultralytics/yolov5 <a href="https://github.com/ultralytics/yolov5/tree/357cde9ee7da13ba3095995488c5a23631467f1a">at this commit</a> plus:
<br>
1. Easy installation via pip: `pip install yolov5`
1. Easy installation via pip: <b>pip install yolov5</b>
<br>
2. Full CLI integration with <a href="https://github.com/google/python-fire">fire</a> package
<br>
Expand All @@ -45,30 +45,24 @@ This yolov5 package contains everything from ultralytics/yolov5 <a href="https:/

## <div align="center">Install</div>

<details open>
<summary>Install yolov5 using pip (for Python >=3.7)</summary>
Install yolov5 using pip (for Python >=3.7)

```console
pip install yolov5
```

</details>
## <div align="center">Model Zoo</div>

<details closed>
<summary>Install yolov5 using pip `(for Python 3.6)`</summary>

```console
pip install "numpy>=1.18.5,<1.20" "matplotlib>=3.2.2,<4"
pip install yolov5
```

</details>
<div align="center">

## <div align="center">Use from Python</div>
Effortlessly explore and use finetuned YOLOv5 models with one line of code: <a href="https://github.com/keremberke/awesome-yolov5-models">awesome-yolov5-models</a>

<a href="https://github.com/keremberke/awesome-yolov5-models"><img src="https://user-images.githubusercontent.com/34196005/210134158-108b24f4-2b8e-43ea-95c8-44731625cde2.gif" width="640"></a>
</div>

<details open>
<summary>Basic</summary>
## <div align="center">Use from Python</div>

```python
import yolov5
Expand Down Expand Up @@ -112,52 +106,6 @@ results.save(save_dir='results/')

```

</details>

<details closed>
<summary>Alternative</summary>

```python
from yolov5 import YOLOv5

# set model params
model_path = "yolov5/weights/yolov5s.pt"
device = "cuda:0" # or "cpu"

# init yolov5 model
yolov5 = YOLOv5(model_path, device)

# load images
image1 = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
image2 = 'https://github.com/ultralytics/yolov5/blob/master/data/images/bus.jpg'

# perform inference
results = yolov5.predict(image1)

# perform inference with larger input size
results = yolov5.predict(image1, size=1280)

# perform inference with test time augmentation
results = yolov5.predict(image1, augment=True)

# perform inference on multiple images
results = yolov5.predict([image1, image2], size=1280, augment=True)

# parse results
predictions = results.pred[0]
boxes = predictions[:, :4] # x1, y1, x2, y2
scores = predictions[:, 4]
categories = predictions[:, 5]

# show detection bounding boxes on image
results.show()

# save results into "results/" folder
results.save(save_dir='results/')
```

</details>

<details closed>
<summary>Train/Detect/Test/Export</summary>

Expand Down