yolo5


Nameyolo5 JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryPackaged version of the Yolov5 object detector
upload_time2021-05-28 21:52:49
maintainer
docs_urlNone
author
requires_python>=3.6
license
keywords machine-learning deep-learning ml pytorch yolo object-detection vision yolov3 yolov4 yolov5
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
  packaged ultralytics/yolov5
</h1>

<h4 align="center">
  pip install yolo5
</h4>

<div align="center">
  <a href="https://badge.fury.io/py/yolov5"><img src="https://badge.fury.io/py/yolov5.svg" alt="pypi version"></a>
  <a href="https://pepy.tech/project/yolov5"><img src="https://pepy.tech/badge/yolov5/month" alt="downloads"></a>
  <a href="https://github.com/fcakyon/yolov5-pip/actions/workflows/ci.yml"><img src="https://github.com/fcakyon/yolov5-pip/actions/workflows/ci.yml/badge.svg" alt="ci testing"></a>
  <a href="https://github.com/fcakyon/yolov5-pip/actions/workflows/package_testing.yml"><img src="https://github.com/fcakyon/yolov5-pip/actions/workflows/package_testing.yml/badge.svg" alt="package testing"></a>
</div>

## Overview

You can finally install [YOLOv5 object detector](https://github.com/ultralytics/yolov5) using [pip](https://pypi.org/project/yolov5/) and integrate into your project easily.

<img src="https://user-images.githubusercontent.com/26833433/114313216-f0a5e100-9af5-11eb-8445-c682b60da2e3.png" width="1000">

## Installation

- Install yolov5 using pip `(for Python >=3.7)`:

```console
pip install yolo5
```

- Install yolov5 using pip `(for Python 3.6)`:

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

## Basic Usage

```python
import yolov5

# model
model = yolov5.load('yolov5s')

# image
img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'

# inference
results = model(img)

# inference with larger input size
results = model(img, size=1280)

# inference with test time augmentation
results = model(img, augment=True)

# show results
results.show()

# save results
results.save(save_dir='results/')

```

## Alternative Usage

```python
from yolov5 import YOLOv5

# set model params
model_path = "yolov5/weights/yolov5s.pt" # it automatically downloads yolov5s model to given path
device = "cuda" # 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)

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

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

## Scripts

You can call yolo_train, yolo_detect and yolo_test commands after installing the package via `pip`:

### Training

Run commands below to reproduce results on [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh) dataset (dataset auto-downloads on first use). Training times for YOLOv5s/m/l/x are 2/4/6/8 days on a single V100 (multi-GPU times faster). Use the largest `--batch-size` your GPU allows (batch sizes shown for 16 GB devices).

```bash
$ yolo_train --data coco.yaml --cfg yolov5s.yaml --weights '' --batch-size 64
                                    yolov5m                                40
                                    yolov5l                                24
                                    yolov5x                                16
```

### Inference

yolo_detect command runs inference on a variety of sources, downloading models automatically from the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and saving results to `runs/detect`.

```bash
$ yolo_detect --source 0  # webcam
                       file.jpg  # image
                       file.mp4  # video
                       path/  # directory
                       path/*.jpg  # glob
                       rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa  # rtsp stream
                       rtmp://192.168.1.105/live/test  # rtmp stream
                       http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8  # http stream
```

To run inference on example images in `yolov5/data/images`:

```bash
$ yolo_detect --source yolov5/data/images --weights yolov5s.pt --conf 0.25
```

## Status

Builds for the latest commit for `Windows/Linux/MacOS` with `Python3.6/3.7/3.8`: <a href="https://github.com/fcakyon/yolov5-pip/actions/workflows/ci.yml"><img src="https://github.com/fcakyon/yolov5-python/workflows/CI%20CPU%20Testing/badge.svg" alt="CI CPU testing"></a>

Status for the train/detect/test scripts: <a href="https://github.com/fcakyon/yolov5-pip/actions/workflows/package_testing.yml"><img src="https://github.com/fcakyon/yolov5-python/workflows/Package%20CPU%20Testing/badge.svg" alt="Package CPU testing"></a>



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "yolo5",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "machine-learning,deep-learning,ml,pytorch,YOLO,object-detection,vision,YOLOv3,YOLOv4,YOLOv5",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/64/36/794c29dd5c549ca6d1abfb722e289fd937bf82b4b97bfa2d4ec14480d8cc/yolo5-0.0.1.tar.gz",
    "platform": "",
    "description": "<h1 align=\"center\">\n  packaged ultralytics/yolov5\n</h1>\n\n<h4 align=\"center\">\n  pip install yolo5\n</h4>\n\n<div align=\"center\">\n  <a href=\"https://badge.fury.io/py/yolov5\"><img src=\"https://badge.fury.io/py/yolov5.svg\" alt=\"pypi version\"></a>\n  <a href=\"https://pepy.tech/project/yolov5\"><img src=\"https://pepy.tech/badge/yolov5/month\" alt=\"downloads\"></a>\n  <a href=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/ci.yml\"><img src=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/ci.yml/badge.svg\" alt=\"ci testing\"></a>\n  <a href=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/package_testing.yml\"><img src=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/package_testing.yml/badge.svg\" alt=\"package testing\"></a>\n</div>\n\n## Overview\n\nYou can finally install [YOLOv5 object detector](https://github.com/ultralytics/yolov5) using [pip](https://pypi.org/project/yolov5/) and integrate into your project easily.\n\n<img src=\"https://user-images.githubusercontent.com/26833433/114313216-f0a5e100-9af5-11eb-8445-c682b60da2e3.png\" width=\"1000\">\n\n## Installation\n\n- Install yolov5 using pip `(for Python >=3.7)`:\n\n```console\npip install yolo5\n```\n\n- Install yolov5 using pip `(for Python 3.6)`:\n\n```console\npip install \"numpy>=1.18.5,<1.20\" \"matplotlib>=3.2.2,<4\"\npip install yolov5\n```\n\n## Basic Usage\n\n```python\nimport yolov5\n\n# model\nmodel = yolov5.load('yolov5s')\n\n# image\nimg = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'\n\n# inference\nresults = model(img)\n\n# inference with larger input size\nresults = model(img, size=1280)\n\n# inference with test time augmentation\nresults = model(img, augment=True)\n\n# show results\nresults.show()\n\n# save results\nresults.save(save_dir='results/')\n\n```\n\n## Alternative Usage\n\n```python\nfrom yolov5 import YOLOv5\n\n# set model params\nmodel_path = \"yolov5/weights/yolov5s.pt\" # it automatically downloads yolov5s model to given path\ndevice = \"cuda\" # or \"cpu\"\n\n# init yolov5 model\nyolov5 = YOLOv5(model_path, device)\n\n# load images\nimage1 = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'\nimage2 = 'https://github.com/ultralytics/yolov5/blob/master/data/images/bus.jpg'\n\n# perform inference\nresults = yolov5.predict(image1)\n\n# perform inference with larger input size\nresults = yolov5.predict(image1, size=1280)\n\n# perform inference with test time augmentation\nresults = yolov5.predict(image1, augment=True)\n\n# perform inference on multiple images\nresults = yolov5.predict([image1, image2], size=1280, augment=True)\n\n# show detection bounding boxes on image\nresults.show()\n\n# save results into \"results/\" folder\nresults.save(save_dir='results/')\n```\n\n## Scripts\n\nYou can call yolo_train, yolo_detect and yolo_test commands after installing the package via `pip`:\n\n### Training\n\nRun commands below to reproduce results on [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh) dataset (dataset auto-downloads on first use). Training times for YOLOv5s/m/l/x are 2/4/6/8 days on a single V100 (multi-GPU times faster). Use the largest `--batch-size` your GPU allows (batch sizes shown for 16 GB devices).\n\n```bash\n$ yolo_train --data coco.yaml --cfg yolov5s.yaml --weights '' --batch-size 64\n                                    yolov5m                                40\n                                    yolov5l                                24\n                                    yolov5x                                16\n```\n\n### Inference\n\nyolo_detect command runs inference on a variety of sources, downloading models automatically from the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and saving results to `runs/detect`.\n\n```bash\n$ yolo_detect --source 0  # webcam\n                       file.jpg  # image\n                       file.mp4  # video\n                       path/  # directory\n                       path/*.jpg  # glob\n                       rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa  # rtsp stream\n                       rtmp://192.168.1.105/live/test  # rtmp stream\n                       http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8  # http stream\n```\n\nTo run inference on example images in `yolov5/data/images`:\n\n```bash\n$ yolo_detect --source yolov5/data/images --weights yolov5s.pt --conf 0.25\n```\n\n## Status\n\nBuilds for the latest commit for `Windows/Linux/MacOS` with `Python3.6/3.7/3.8`: <a href=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/ci.yml\"><img src=\"https://github.com/fcakyon/yolov5-python/workflows/CI%20CPU%20Testing/badge.svg\" alt=\"CI CPU testing\"></a>\n\nStatus for the train/detect/test scripts: <a href=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/package_testing.yml\"><img src=\"https://github.com/fcakyon/yolov5-python/workflows/Package%20CPU%20Testing/badge.svg\" alt=\"Package CPU testing\"></a>\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Packaged version of the Yolov5 object detector",
    "version": "0.0.1",
    "project_urls": null,
    "split_keywords": [
        "machine-learning",
        "deep-learning",
        "ml",
        "pytorch",
        "yolo",
        "object-detection",
        "vision",
        "yolov3",
        "yolov4",
        "yolov5"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b00715a2969c18dd12736db37c41bdf6fdadf2ef4580c33970751a91f55d1297",
                "md5": "affcc00deb7632116abef4d1210cdfc4",
                "sha256": "66054e78abb01dfa9b34425c42f4a8c552a474656a1ae11ec86d9ede9d01bae1"
            },
            "downloads": -1,
            "filename": "yolo5-0.0.1-py36.py37.py38-none-any.whl",
            "has_sig": false,
            "md5_digest": "affcc00deb7632116abef4d1210cdfc4",
            "packagetype": "bdist_wheel",
            "python_version": "py36.py37.py38",
            "requires_python": ">=3.6",
            "size": 3156,
            "upload_time": "2021-05-28T21:52:43",
            "upload_time_iso_8601": "2021-05-28T21:52:43.614982Z",
            "url": "https://files.pythonhosted.org/packages/b0/07/15a2969c18dd12736db37c41bdf6fdadf2ef4580c33970751a91f55d1297/yolo5-0.0.1-py36.py37.py38-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6436794c29dd5c549ca6d1abfb722e289fd937bf82b4b97bfa2d4ec14480d8cc",
                "md5": "bb0d67bf5bf263fecfbe92ca0ae7b13d",
                "sha256": "907dd7b3099b5666bde681b1f2af9a41040211acb3cd8888cc75667776b8b774"
            },
            "downloads": -1,
            "filename": "yolo5-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bb0d67bf5bf263fecfbe92ca0ae7b13d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4043,
            "upload_time": "2021-05-28T21:52:49",
            "upload_time_iso_8601": "2021-05-28T21:52:49.311663Z",
            "url": "https://files.pythonhosted.org/packages/64/36/794c29dd5c549ca6d1abfb722e289fd937bf82b4b97bfa2d4ec14480d8cc/yolo5-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-28 21:52:49",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "yolo5"
}
        
Elapsed time: 0.24216s