{"id":13642828,"url":"https://github.com/fcakyon/yolov5-pip","last_synced_at":"2025-05-14T20:09:09.401Z","repository":{"id":37483064,"uuid":"337705016","full_name":"fcakyon/yolov5-pip","owner":"fcakyon","description":"Packaged version of ultralytics/yolov5 + many extra features","archived":false,"fork":false,"pushed_at":"2025-03-08T22:41:17.000Z","size":1639,"stargazers_count":294,"open_issues_count":3,"forks_count":69,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-13T23:13:25.777Z","etag":null,"topics":["aws","cli","coco","computer-vision","deep-learning","machine-learning","neptune","neptune-ai","object-detection","pip","pypi","python","pytorch","s3","ultralytics","yolo","yolov3","yolov4","yolov5"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/yolov5/","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fcakyon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"fcakyon"}},"created_at":"2021-02-10T11:36:41.000Z","updated_at":"2025-05-08T13:53:09.000Z","dependencies_parsed_at":"2024-01-14T12:17:49.071Z","dependency_job_id":"dee8d871-c7ab-4f5f-b1d7-178acf858d57","html_url":"https://github.com/fcakyon/yolov5-pip","commit_stats":{"total_commits":234,"total_committers":10,"mean_commits":23.4,"dds":0.405982905982906,"last_synced_commit":"fd95e6f4686d948458f788e8b02c8d64e2821537"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcakyon%2Fyolov5-pip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcakyon%2Fyolov5-pip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcakyon%2Fyolov5-pip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcakyon%2Fyolov5-pip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcakyon","download_url":"https://codeload.github.com/fcakyon/yolov5-pip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059469,"owners_count":22007766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cli","coco","computer-vision","deep-learning","machine-learning","neptune","neptune-ai","object-detection","pip","pypi","python","pytorch","s3","ultralytics","yolo","yolov3","yolov4","yolov5"],"created_at":"2024-08-02T01:01:36.793Z","updated_at":"2025-05-14T20:09:09.377Z","avatar_url":"https://github.com/fcakyon.png","language":"Python","funding_links":["https://github.com/sponsors/fcakyon"],"categories":["Other Versions of YOLO"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  packaged ultralytics/yolov5\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e\n  pip install yolov5\n\u003c/h4\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://pepy.tech/project/yolov5\"\u003e\u003cimg src=\"https://pepy.tech/badge/yolov5\" alt=\"total downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pepy.tech/project/yolov5\"\u003e\u003cimg src=\"https://pepy.tech/badge/yolov5/month\" alt=\"monthly downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/fcakyon\"\u003e\u003cimg src=\"https://img.shields.io/badge/twitter-fcakyon_-blue?logo=twitter\u0026style=flat\" alt=\"fcakyon twitter\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://badge.fury.io/py/yolov5\"\u003e\u003cimg src=\"https://badge.fury.io/py/yolov5.svg?kill_cache=1\" alt=\"pypi version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/ci.yml/badge.svg\" alt=\"ci testing\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/package_testing.yml\"\u003e\u003cimg src=\"https://github.com/fcakyon/yolov5-pip/actions/workflows/package_testing.yml/badge.svg\" alt=\"package testing\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## \u003cdiv align=\"center\"\u003eOverview\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\nYou can finally install \u003ca href=\"https://github.com/ultralytics/yolov5\"\u003eYOLOv5 object detector\u003c/a\u003e using \u003ca href=\"https://pypi.org/project/yolov5/\"\u003epip\u003c/a\u003e and integrate into your project easily.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/26833433/136901921-abcfcd9d-f978-4942-9b97-0e3f202907df.png\" width=\"1000\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\nThis yolov5 package contains everything from ultralytics/yolov5 \u003ca href=\"https://github.com/ultralytics/yolov5/tree/5deff1471dede726f6399be43e7073ee7ed3a7d4\"\u003eat this commit\u003c/a\u003e plus:\n\u003cbr\u003e\n1. Easy installation via pip: \u003cb\u003epip install yolov5\u003c/b\u003e\n\u003cbr\u003e\n2. Full CLI integration with \u003ca href=\"https://github.com/google/python-fire\"\u003efire\u003c/a\u003e package\n\u003cbr\u003e\n3. COCO dataset format support (for training)\n\u003cbr\u003e\n4. Full \u003ca href=\"https://huggingface.co/models?other=yolov5\"\u003e🤗 Hub\u003c/a\u003e integration\n\u003cbr\u003e\n5. \u003ca href=\"https://aws.amazon.com/s3/\"\u003eS3\u003c/a\u003e support (model and dataset upload)\n\u003cbr\u003e\n6. \u003ca href=\"https://neptune.ai/\"\u003eNeptuneAI\u003c/a\u003e logger support (metric, model and dataset logging)\n\u003cbr\u003e\n7. Classwise AP logging during experiments\n\n\n\n## \u003cdiv align=\"center\"\u003eInstall\u003c/div\u003e\n\nInstall yolov5 using pip (for Python \u003e=3.7)\n\n```console\npip install yolov5\n```\n\n## \u003cdiv align=\"center\"\u003eModel Zoo\u003c/div\u003e\n\n\n\n\u003cdiv align=\"center\"\u003e\n\nEffortlessly explore and use finetuned YOLOv5 models with one line of code: \u003ca href=\"https://github.com/keremberke/awesome-yolov5-models\"\u003eawesome-yolov5-models\u003c/a\u003e\n\n\u003ca href=\"https://github.com/keremberke/awesome-yolov5-models\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/34196005/210134158-108b24f4-2b8e-43ea-95c8-44731625cde2.gif\" width=\"640\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## \u003cdiv align=\"center\"\u003eUse from Python\u003c/div\u003e\n\n```python\nimport yolov5\n\n# load pretrained model\nmodel = yolov5.load('yolov5s.pt')\n\n# or load custom model\nmodel = yolov5.load('train/best.pt')\n  \n# set model parameters\nmodel.conf = 0.25  # NMS confidence threshold\nmodel.iou = 0.45  # NMS IoU threshold\nmodel.agnostic = False  # NMS class-agnostic\nmodel.multi_label = False  # NMS multiple labels per box\nmodel.max_det = 1000  # maximum number of detections per image\n\n# set image\nimg = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'\n\n# perform 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# parse results\npredictions = results.pred[0]\nboxes = predictions[:, :4] # x1, y1, x2, y2\nscores = predictions[:, 4]\ncategories = predictions[:, 5]\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\n\u003cdetails closed\u003e\n\u003csummary\u003eTrain/Detect/Test/Export\u003c/summary\u003e\n\n- You can directly use these functions by importing them:\n\n```python\nfrom yolov5 import train, val, detect, export\n# from yolov5.classify import train, val, predict\n# from yolov5.segment import train, val, predict\n\ntrain.run(imgsz=640, data='coco128.yaml')\nval.run(imgsz=640, data='coco128.yaml', weights='yolov5s.pt')\ndetect.run(imgsz=640)\nexport.run(imgsz=640, weights='yolov5s.pt')\n```\n\n- You can pass any argument as input:\n\n```python\nfrom yolov5 import detect\n\nimg_url = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'\n\ndetect.run(source=img_url, weights=\"yolov5s6.pt\", conf_thres=0.25, imgsz=640)\n\n```\n\n\u003c/details\u003e\n\n## \u003cdiv align=\"center\"\u003eUse from CLI\u003c/div\u003e\n\nYou can call `yolov5 train`, `yolov5 detect`, `yolov5 val` and `yolov5 export` commands after installing the package via `pip`:\n\n\u003cdetails open\u003e\n\u003csummary\u003eTraining\u003c/summary\u003e\n\n- Finetune one of the pretrained YOLOv5 models using your custom `data.yaml`:\n\n```bash\n$ yolov5 train --data data.yaml --weights yolov5s.pt --batch-size 16 --img 640\n                                          yolov5m.pt              8\n                                          yolov5l.pt              4\n                                          yolov5x.pt              2\n```\n\n- Start a training using a COCO formatted dataset:\n\n```yaml\n# data.yml\ntrain_json_path: \"train.json\"\ntrain_image_dir: \"train_image_dir/\"\nval_json_path: \"val.json\"\nval_image_dir: \"val_image_dir/\"\n```\n\n```bash\n$ yolov5 train --data data.yaml --weights yolov5s.pt\n```\n\n- Train your model using [Roboflow Universe](https://universe.roboflow.com/) datasets (roboflow\u003e=0.2.29 required):\n\n```bash\n$ yolov5 train --data DATASET_UNIVERSE_URL --weights yolov5s.pt --roboflow_token YOUR_ROBOFLOW_TOKEN\n```\n\nWhere `DATASET_UNIVERSE_URL` must be in `https://universe.roboflow.com/workspace_name/project_name/project_version` format.\n\n- Visualize your experiments via [Neptune.AI](https://neptune.ai/) (neptune-client\u003e=0.10.10 required):\n\n```bash\n$ yolov5 train --data data.yaml --weights yolov5s.pt --neptune_project NAMESPACE/PROJECT_NAME --neptune_token YOUR_NEPTUNE_TOKEN\n```\n\n- Automatically upload weights to [Huggingface Hub](https://huggingface.co/models?other=yolov5):\n\n```bash\n$ yolov5 train --data data.yaml --weights yolov5s.pt --hf_model_id username/modelname --hf_token YOUR-HF-WRITE-TOKEN\n```\n\n- Automatically upload weights and datasets to AWS S3 (with Neptune.AI artifact tracking integration):\n\n```bash\nexport AWS_ACCESS_KEY_ID=YOUR_KEY\nexport AWS_SECRET_ACCESS_KEY=YOUR_KEY\n```\n\n```bash\n$ yolov5 train --data data.yaml --weights yolov5s.pt --s3_upload_dir YOUR_S3_FOLDER_DIRECTORY --upload_dataset\n```\n\n- Add `yolo_s3_data_dir` into `data.yaml` to match Neptune dataset with a present dataset in S3.\n\n```yaml\n# data.yml\ntrain_json_path: \"train.json\"\ntrain_image_dir: \"train_image_dir/\"\nval_json_path: \"val.json\"\nval_image_dir: \"val_image_dir/\"\nyolo_s3_data_dir: s3://bucket_name/data_dir/\n```\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n\u003csummary\u003eInference\u003c/summary\u003e\n\nyolov5 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$ yolov5 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\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n\u003csummary\u003eExport\u003c/summary\u003e\n\nYou can export your fine-tuned YOLOv5 weights to any format such as `torchscript`, `onnx`, `coreml`, `pb`, `tflite`, `tfjs`:\n\n```bash\n$ yolov5 export --weights yolov5s.pt --include torchscript,onnx,coreml,pb,tfjs\n```\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n\u003csummary\u003eClassify\u003c/summary\u003e\n\nTrain/Val/Predict with YOLOv5 image classifier:\n\n```bash\n$ yolov5 classify train --img 640 --data mnist2560 --weights yolov5s-cls.pt --epochs 1\n```\n\n```bash\n$ yolov5 classify predict --img 640 --weights yolov5s-cls.pt --source images/\n```\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n\u003csummary\u003eSegment\u003c/summary\u003e\n\nTrain/Val/Predict with YOLOv5 instance segmentation model:\n\n```bash\n$ yolov5 segment train --img 640 --weights yolov5s-seg.pt --epochs 1\n```\n\n```bash\n$ yolov5 segment predict --img 640 --weights yolov5s-seg.pt --source images/\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcakyon%2Fyolov5-pip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcakyon%2Fyolov5-pip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcakyon%2Fyolov5-pip/lists"}