{"id":13642991,"url":"https://github.com/isLinXu/YOLOv8_Efficient","last_synced_at":"2025-04-20T21:32:30.813Z","repository":{"id":65303026,"uuid":"585766952","full_name":"isLinXu/YOLOv8_Efficient","owner":"isLinXu","description":" 🚀Simple and efficient use for Ultralytics yolov8🚀 ","archived":false,"fork":false,"pushed_at":"2023-09-19T18:07:27.000Z","size":9812,"stargazers_count":161,"open_issues_count":8,"forks_count":31,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-08-02T01:18:07.256Z","etag":null,"topics":["deeplearning","pytorch","ultralytics","yolov8"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isLinXu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-01-06T02:40:15.000Z","updated_at":"2024-07-26T09:49:08.000Z","dependencies_parsed_at":"2024-01-14T12:28:10.427Z","dependency_job_id":null,"html_url":"https://github.com/isLinXu/YOLOv8_Efficient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isLinXu%2FYOLOv8_Efficient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isLinXu%2FYOLOv8_Efficient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isLinXu%2FYOLOv8_Efficient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isLinXu%2FYOLOv8_Efficient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isLinXu","download_url":"https://codeload.github.com/isLinXu/YOLOv8_Efficient/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223839265,"owners_count":17211902,"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":["deeplearning","pytorch","ultralytics","yolov8"],"created_at":"2024-08-02T01:01:39.235Z","updated_at":"2025-04-20T21:32:30.794Z","avatar_url":"https://github.com/isLinXu.png","language":"Python","funding_links":[],"categories":["Other Versions of YOLO"],"sub_categories":[],"readme":"# Yolov8_Efficient\n\n![](./img/logo.png)\n\nSimple and efficient use for yolov8\n\n[English](README.md) | [简体中文](README.zh-CN.md)\n\n\n---\n\n![GitHub stars](https://img.shields.io/github/stars/isLinXu/Yolov8_Efficient)\n![GitHub forks](https://img.shields.io/github/forks/isLinXu/Yolov8_Efficient) \n![GitHub watchers](https://img.shields.io/github/watchers/isLinXu/Yolov8_Efficient) \n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fatrox%2Fsync-dotenv%2Fbadge\u0026style=flat)](https://github.com/isLinXu/Yolov8_Efficient)  ![img](https://badgen.net/badge/icon/learning?icon=deepscan\u0026label)![GitHub repo size](https://img.shields.io/github/repo-size/isLinXu/Yolov8_Efficient.svg?style=flat-square) ![GitHub language count](https://img.shields.io/github/languages/count/isLinXu/Yolov8_Efficient)  ![GitHub last commit](https://img.shields.io/github/last-commit/isLinXu/Yolov8_Efficient) ![GitHub](https://img.shields.io/github/license/isLinXu/Yolov8_Efficient.svg?style=flat-square)![img](https://hits.dwyl.com/isLinXu/Yolov8_Efficient.svg)\n\n\n## 😎 About\n\nThis is an unofficial repository maintained by independent developers for learning and communication based on the ultralytics v8 Weights and ultralytics Project.\nIf you have more questions and ideas, please feel free to discuss them together. \nIn addition, ultralytics has released the latest [ultralytics](https://github.com/ultralytics/ultralytics) repository, and it is recommended to use the official one first.\n\nThis project is based on ultralytics and yolov5 for comprehensive reference, and is committed to making the yolo series more efficient and easy to use.\n\nCurrently doing the following work:\n\n- build gradio demo\n- \n| ![](https://user-images.githubusercontent.com/59380685/265492490-9353cd87-052d-4dcb-9115-afb7954c00dd.png) | ![](https://user-images.githubusercontent.com/59380685/265493664-939d5c5f-f571-4a84-b6e9-6193f4613f37.png) | ![](https://user-images.githubusercontent.com/59380685/265493715-e920d82e-c85d-43e1-a7ae-c0a706c0bb95.png) | ![](https://user-images.githubusercontent.com/59380685/265493821-19954089-befb-4cec-baac-688427a84589.png) |\n| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |\n|                          YOLOv8-det                          |                          YOLOv8-seg                          |                          YOLOv8-seg                          |                          YOLOv8-seg                          |\n\n- Referring to the Configuration parameters in https://docs.ultralytics.com/config/, the configuration alignment of corresponding parameters has been made for train.py, detect.py, val.py, etc.\n\n\u003e ![config_1](./img/config_1.png)\n\n- Combined with yolov5's usage habits and code structure, it is compatible and optimized\n\n\u003e ![work](./img/work.png)\n\n\n- By verifying and calculating the weights of the index parameters on the coco dataset on their own machine, experimental records are stored:https://github.com/isLinXu/YOLOv8_Efficient/tree/main/log.\n\n  \u003e ![log](./img/log.png)\n\n- Experimental data are recorded in:https://github.com/isLinXu/YOLOv8_Efficient/blob/main/log/yolo_model_data.csv\n  \u003e ![model_metrics_data](./img/model_metrics_data.png)\n\n  \n\n- According to the calculated results, the corresponding index parameter comparison chart is drawn, this drawing program is also open source：https://github.com/isLinXu/model-metrics-plot。\n\n  \u003e ![model_metrics_plot](./img/model_metrics_plot.png)\n\n- integration and configuration with other network model structures is in progress...\n\n\n\n## 🥰Performance\n\n### Metrics\n\n![](./img/plot_metrics.jpg)\n\n### structure \n\n![](./img/v8_structure.jpg)\n\n\u003e Thanks to [jizhishutong](https://github.com/jizhishutong) for providing model structure diagrams for this project.\n\n![](./img/demo.png)\n\n- wandb train log:  [log](https://wandb.ai/glenn-jocher/YOLOv8)\n- Experiment log: [log](https://github.com/isLinXu/YOLOv8_Efficient/tree/main/log)\n\n\n\n## 🆕News!\n\n---\n\n- ... ...\n- 2023/09/20 - add yolov8 gradio demo and continue other work...\n- 2023/01/16 - add train_detect, train_cls and train_seg\n- 2023/01/10 - add yolov8 metrics and logs\n- 2023/01/09 - add val.py and fix some error\n- 2023/01/07 - fix some error and warning \n- 2023/01/06 - add train.py, detect.py and README.md\n- 2023/01/06 - Create and Init a new repository\n\n\n\n## 🤔 TODO：\n\n- [x] Model testing and validation in progress\n- [ ] \n\n\n\n## 🧙‍Quickstart\n\n- **Documentation**\n\n  [**Ultralytics YOLO Docs**](https://docs.ultralytics.com/)\n\n- [ultralytics assets releases](https://github.com/ultralytics/assets/releases/)\n\n\n### 1. CLI\n\nTo simply use the latest Ultralytics YOLO models\n\n```bash\nyolo task=detect    mode=train    model=yolov8n.yaml      args=...\n          classify       predict        yolov8n-cls.yaml  args=...\n          segment        val            yolov8n-seg.yaml  args=...\n                         export         yolov8n.pt        format=onnx\n```\n\n### 2. Python SDK\n\nTo use pythonic interface of Ultralytics YOLO model\n\n```python\nfrom ultralytics import YOLO\n\nmodel = YOLO(\"yolov8n.yaml\")  # create a new model from scratch\nmodel = YOLO(\n    \"yolov8n.pt\"\n)  # load a pretrained model (recommended for best training results)\nresults = model.train(data=\"coco128.yaml\", epochs=100, imgsz=640, ...)\nresults = model.val()\nresults = model.predict(source=\"bus.jpg\")\nsuccess = model.export(format=\"onnx\")\n```\n\nIf you're looking to modify YOLO for R\u0026D or to build on top of it, refer to https://docs.ultralytics.com/.\n\n\n\n### 3.Train custom datasets\n\nHere take coco128 as an example：\n\n- 1.To make data sets in YOLO format, you can divide and transform data sets by `prepare_data.py` in the project directory.\n  \n- 2.Modify the `.yaml` of the corresponding model weight in `config`, configure its data set path, and read the data loader.\n- 3.To modify the corresponding parameters in the model, it is mainly to modify the number of categories and network structure parameters. If it is only a simple application, it is not recommended to modify the following network structure parameters, but only the number of nc categories\n- 4.Run `train.py`, this step can be modified under the corresponding variable in `parse_opt`, which needs to be configured according to equipment and training needs, including `device`, `task`, `data`, `weights`,`epochs`, `batch_size`, etc. If this parameter is not specified, the default parameter is used.\n\n\n\n## 🧙‍Pretrained Checkpoints\n\n|                            Model                             | size (pixels) | mAPval 50-95 | mAPval 50 | Speed CPU b1 (ms) | Speed RTX 3080 b1(ms) | layers | params (M) | FLOPs @640 (B) |\n| :----------------------------------------------------------: | :-----------: | :----------: | :-------: | :---------------: | :-------------------: | :----: | :--------: | :------------: |\n| [yolov8n](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt) |      640      |     37.2     |   53.2    |       47.2        |          5.6          |  168   |    3.15    |      8.7       |\n| [yolov8n-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-seg.pt) |      640      |     30.7     |   50.0    |       59.3        |         11.3          |  195   |    3.40    |      12.6      |\n| [yolov8s](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s.pt) |      640      |     44.7     |   62.2    |       87.9        |          5.7          |  168   |   11.15    |      28.6      |\n| [yolov8s-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-seg.pt) |      640      |     37.0     |   58.8    |       107.6       |         11.4          |  195   |   11.81    |      42.6      |\n| [yolov8m](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m.pt) |      640      |     49.9     |   67.4    |       185.6       |          8.3          |  218   |   25.89    |      78.9      |\n| [yolov8m-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-seg.pt) |      640      |     40.6     |   63.5    |       207.7       |         15.3          |  245   |   27.27    |     110.2      |\n| [yolov8l](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l.pt) |      640      |     52.4     |   69.9    |       319.6       |         13.1          |  268   |   43.67    |     165.2      |\n| [yolov8l-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-seg.pt) |      640      |     42.5     |   66.1    |       296.9       |         16.8          |  295   |   45.97    |     220.5      |\n| [yolov8x](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x.pt) |      640      |     53.5     |   70.9    |       334.6       |         20.4          |  268   |   68.20    |     257.8      |\n| [yolov8x-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-seg.pt) |      640      |     43.2     |   67.1    |       418.8       |         23.8          |  295   |   71.80    |     344.1      |\n\n\u003e **Table Notes**\n\u003e The above data is generated by running tests in the following configured environment. See below for details.\n\u003e\n\u003e - GPU: NVIDIA GeForce RTX 3080/PCIe/SSE2\n\u003e - CPU: Intel® Core™ i9-10900K CPU @ 3.70GHz × 20\n\u003e - Memory: 31.3 GiB\n\u003e - System: Ubuntu 18.04 LTS\n\u003e - (ms): The statistical speed here is inference speed\n\n\n\n\n## Install\n\n### pip install\n\n```bash\npip install ultralytics\n```\n\n### Development\n\n```shell\ngit clone git@github.com:isLinXu/YOLOv8_Efficient.git\ncd YOLOv8_Efficient\ncd ultralytics-master\npip install -e .\n```\n\n![](./img/install_img.png)\n\n## 🔨Usage\n\n### Train\n\n- Single-GPU training:\n\n```shell\npython train.py --data coco128.yaml --weights weights/yolov8ns.pt --img 640  # from pretrained (recommended)\n```\n\n```python\npython train.py --data coco128.yaml --weights '' --cfg yolov8ns.yaml --img 640  # from scratch\n```\n\n\u003e Use IDE Pycharm\n\u003e\n\u003e ![](./img/pycharm_run_train.png)\n\n\n\n\n  - Multi-GPU DDP training:\n```shell\n    python -m torch.distributed.run --nproc_per_node 4 --master_port 1 train.py --data coco128.yaml --weights yolov8ns.pt --img 640 --device 0,1,2,3\n```\n\n​    \n\n### detect\n\n```shell\npython detect.py --weights yolov8s.pt --source 0                               # webcam\n                                                     img.jpg                         # image\n                                                     vid.mp4                         # video\n                                                     screen                          # screenshot\n                                                     path/                           # directory\n                                                     list.txt                        # list of images\n                                                     list.streams                    # list of streams\n                                                     'path/*.jpg'                    # glob\n                                                     'https://youtu.be/Zgi9g1ksQHc'  # YouTube\n                                                     'rtsp://example.com/media.mp4'  # RTSP, RTMP, HTTP stream\n```\n\n\u003e Use IDE Pycharm\n\u003e\n\u003e ![](./img/pycharm_run_detect.png)\n\n\n\n### val\n\n- i.e coco128:\n\n\u003e| ![](./img/val_batch1_pred.jpg) | ![](./img/F1_curve.png) | ![](./img/P_curve.png)          |\n\u003e | ------------------------------ | ----------------------- | ------------------------------- |\n\u003e| ![](./img/PR_curve.png)        | ![](./img/R_curve.png)  | ![](./img/confusion_matrix.png) |\n\n#### Usage:\n\n```shell\npython val.py --weights yolov8n.pt --data coco128.yaml --img 640\n```\n\n#### Usage - formats:\n\n\n```shell\npython val.py --weights yolov8s.pt                 # PyTorch\n                              yolov8s.torchscript        # TorchScript\n                              yolov8s.onnx               # ONNX Runtime or OpenCV DNN with --dnn\n                              yolov8s_openvino_model     # OpenVINO\n                              yolov8s.engine             # TensorRT\n                              yolov8s.mlmodel            # CoreML (macOS-only)\n                              yolov8s_saved_model        # TensorFlow SavedModel\n                              yolov8s.pb                 # TensorFlow GraphDef\n                              yolov8s.tflite             # TensorFlow Lite\n                              yolov8s_edgetpu.tflite     # TensorFlow Edge TPU\n                              yolov8s_paddle_model       # PaddlePaddle\n```\n\n\u003e Use IDE Pycharm\n\u003e ![](./img/pycharm_run_val.png)\n\n\n\n\n\n## 🌹Acknowledgements\n- [https://github.com/ultralytics/yolov3](https://github.com/ultralytics/yolov3)\n- [https://github.com/ultralytics/yolov5](https://github.com/ultralytics/yolov5)\n- https://github.com/meituan/YOLOv6\n- https://github.com/WongKinYiu/yolov7\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FisLinXu%2FYOLOv8_Efficient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FisLinXu%2FYOLOv8_Efficient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FisLinXu%2FYOLOv8_Efficient/lists"}