• Stars
    star
    164
  • Rank 230,032 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🚀Simple and efficient use for Ultralytics yolov8🚀

Yolov8_Efficient

Simple and efficient use for yolov8

English | 简体中文


GitHub stars GitHub forks GitHub watchers Build Status imgGitHub repo size GitHub language count GitHub last commit GitHubimg

😎 About

This is an unofficial repository maintained by independent developers for learning and communication based on the ultralytics v8 Weights and ultralytics Project. If you have more questions and ideas, please feel free to discuss them together. In addition, ultralytics has released the latest ultralytics repository, and it is recommended to use the official one first.

This project is based on ultralytics and yolov5 for comprehensive reference, and is committed to making the yolo series more efficient and easy to use.

Currently doing the following work:

  • build gradio demo
YOLOv8-det YOLOv8-seg YOLOv8-seg YOLOv8-seg
  • 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.

config_1

  • Combined with yolov5's usage habits and code structure, it is compatible and optimized

work

🥰Performance

Metrics

structure

Thanks to jizhishutong for providing model structure diagrams for this project.

  • wandb train log: log
  • Experiment log: log

🆕News!


  • ... ...
  • 2023/09/20 - add yolov8 gradio demo and continue other work...
  • 2023/01/16 - add train_detect, train_cls and train_seg
  • 2023/01/10 - add yolov8 metrics and logs
  • 2023/01/09 - add val.py and fix some error
  • 2023/01/07 - fix some error and warning
  • 2023/01/06 - add train.py, detect.py and README.md
  • 2023/01/06 - Create and Init a new repository

🤔 TODO:

  • Model testing and validation in progress
  • [ ]

🧙‍Quickstart

1. CLI

To simply use the latest Ultralytics YOLO models

yolo task=detect    mode=train    model=yolov8n.yaml      args=...
          classify       predict        yolov8n-cls.yaml  args=...
          segment        val            yolov8n-seg.yaml  args=...
                         export         yolov8n.pt        format=onnx

2. Python SDK

To use pythonic interface of Ultralytics YOLO model

from ultralytics import YOLO

model = YOLO("yolov8n.yaml")  # create a new model from scratch
model = YOLO(
    "yolov8n.pt"
)  # load a pretrained model (recommended for best training results)
results = model.train(data="coco128.yaml", epochs=100, imgsz=640, ...)
results = model.val()
results = model.predict(source="bus.jpg")
success = model.export(format="onnx")

If you're looking to modify YOLO for R&D or to build on top of it, refer to https://docs.ultralytics.com/.

3.Train custom datasets

Here take coco128 as an example:

  • 1.To make data sets in YOLO format, you can divide and transform data sets by prepare_data.py in the project directory.

  • 2.Modify the .yaml of the corresponding model weight in config, configure its data set path, and read the data loader.

  • 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

  • 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.

🧙‍Pretrained Checkpoints

Model size (pixels) mAPval 50-95 mAPval 50 Speed CPU b1 (ms) Speed RTX 3080 b1(ms) layers params (M) FLOPs @640 (B)
yolov8n 640 37.2 53.2 47.2 5.6 168 3.15 8.7
yolov8n-seg 640 30.7 50.0 59.3 11.3 195 3.40 12.6
yolov8s 640 44.7 62.2 87.9 5.7 168 11.15 28.6
yolov8s-seg 640 37.0 58.8 107.6 11.4 195 11.81 42.6
yolov8m 640 49.9 67.4 185.6 8.3 218 25.89 78.9
yolov8m-seg 640 40.6 63.5 207.7 15.3 245 27.27 110.2
yolov8l 640 52.4 69.9 319.6 13.1 268 43.67 165.2
yolov8l-seg 640 42.5 66.1 296.9 16.8 295 45.97 220.5
yolov8x 640 53.5 70.9 334.6 20.4 268 68.20 257.8
yolov8x-seg 640 43.2 67.1 418.8 23.8 295 71.80 344.1

Table Notes The above data is generated by running tests in the following configured environment. See below for details.

  • GPU: NVIDIA GeForce RTX 3080/PCIe/SSE2
  • CPU: Intel® Core™ i9-10900K CPU @ 3.70GHz × 20
  • Memory: 31.3 GiB
  • System: Ubuntu 18.04 LTS
  • (ms): The statistical speed here is inference speed

Install

pip install

pip install ultralytics

Development

git clone [email protected]:isLinXu/YOLOv8_Efficient.git
cd YOLOv8_Efficient
cd ultralytics-master
pip install -e .

🔨Usage

Train

  • Single-GPU training:
python train.py --data coco128.yaml --weights weights/yolov8ns.pt --img 640  # from pretrained (recommended)
python train.py --data coco128.yaml --weights '' --cfg yolov8ns.yaml --img 640  # from scratch

Use IDE Pycharm

  • Multi-GPU DDP training:
    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

detect

python detect.py --weights yolov8s.pt --source 0                               # webcam
                                                     img.jpg                         # image
                                                     vid.mp4                         # video
                                                     screen                          # screenshot
                                                     path/                           # directory
                                                     list.txt                        # list of images
                                                     list.streams                    # list of streams
                                                     'path/*.jpg'                    # glob
                                                     'https://youtu.be/Zgi9g1ksQHc'  # YouTube
                                                     'rtsp://example.com/media.mp4'  # RTSP, RTMP, HTTP stream

Use IDE Pycharm

val

  • i.e coco128:

Usage:

python val.py --weights yolov8n.pt --data coco128.yaml --img 640

Usage - formats:

python val.py --weights yolov8s.pt                 # PyTorch
                              yolov8s.torchscript        # TorchScript
                              yolov8s.onnx               # ONNX Runtime or OpenCV DNN with --dnn
                              yolov8s_openvino_model     # OpenVINO
                              yolov8s.engine             # TensorRT
                              yolov8s.mlmodel            # CoreML (macOS-only)
                              yolov8s_saved_model        # TensorFlow SavedModel
                              yolov8s.pb                 # TensorFlow GraphDef
                              yolov8s.tflite             # TensorFlow Lite
                              yolov8s_edgetpu.tflite     # TensorFlow Edge TPU
                              yolov8s_paddle_model       # PaddlePaddle

Use IDE Pycharm

🌹Acknowledgements

More Repositories

1

prompt-engineering-note

🔥🔔prompt-engineering-note🔔🔥
Jupyter Notebook
249
star
2

Stanford-CS-Course

Stanford-CS-Course
Python
211
star
3

model-metrics-plot

🔨🔨🔨(mmplot)used to draw graphs of multiple index parameters such as algorithm accuracy and speed of multiple deep learning models.
Jupyter Notebook
72
star
4

paper-list

autoupdate paper list
Python
56
star
5

vision-process-webui

💡💡💡awesome compute vision app in gradio
Python
42
star
6

YOLOv5_Efficient

🚀 Simple and efficient use for Ultralytics yolov5🚀
Python
32
star
7

awesome-road-map

🗺️awesome-road-map🗺️
Python
27
star
8

jetbrain-active

Shell
26
star
9

regex-tokenizer

Converted the Jina Tokenizer regex pattern to python.
Python
23
star
10

VALSE-WorkShop

This project is an unofficial summary of the resources related to VALSE and its annual seminar. Its main purpose is to more facilitate your communication and learning, and we also welcome your additions and suggestions.
Python
19
star
11

DatasetMarkerTool

🔨🔨🔨Tool for making model training data set
Python
17
star
12

CVProcessLib

Image processing library based on OpenCV visual development kit
Python
11
star
13

OpenMMLab-Learn-Exercise

openmmlab learn and exercise
Jupyter Notebook
11
star
14

paper-read-notes

paper-read-notes
Python
10
star
15

PaddleSpeech-Gradio-WebUI

PaddleSpeech-Gradio-WebUI
Python
7
star
16

YOLOv3_Detect_Web

Use Yolov3 detect on Web
Python
6
star
17

Detectron2Lab

use detectron2-pytorch train,val,test deep learning models
Python
6
star
18

MyStarsRepo

GitHub collection
5
star
19

PaddleWorkShop

Python
5
star
20

isLinXu

Readme
5
star
21

AIToolBox

AI Tool Box(AI工具箱)
Python
5
star
22

black-book-notes

black-book-notes
Python
5
star
23

pangu-ax

🪓🪓🪓pangu-ax is a related tool specifically for the Pangu model
Python
5
star
24

TrainNetHub

Model training integration Library
Python
5
star
25

PaddleNavigation

use PaddlePaddle frame work navigation
Python
5
star
26

paper-temple

TeX
5
star
27

project-list

isLinXu project list
5
star
28

Berkeley-CS-course

Python
5
star
29

isLinXu.github.io

TypeScript
5
star
30

onnx-explorer

onnx explorer more features.
Python
5
star
31

PP-TinyPose

基于PaddleDetection PP-TinyPose,新增手势关键点检测模型
5
star
32

inference.cpp

C++
4
star
33

PaddlePaddle-Learn-Exercise

Paddle Suide Learn and Exercise
Python
4
star
34

Paddle_SportsClassify

使用PaddlePaddle框架进行100项运动的图像分类项目
Jupyter Notebook
4
star
35

PytorchWorkshop

Code Workshop On Python
Python
4
star
36

AlgorithmProblemSummary

Algorithm Problem Summary
C++
4
star
37

ml-cheat-sheets

Cheat Sheets for Machine Learning and Data Science
Python
4
star
38

PyCppProject

use Cpp and PyBind for Python
C++
4
star
39

MIT-CS-Course

MIT CS Course
Python
4
star
40

awesome-course-notes

awesome course notes
Python
4
star
41

Awesome-Pan

Awesome Pan Source
Python
4
star
42

Annotations_Images_Web

show your Annotations in JPEGImages
Python
4
star
43

cv-resume

my homepage
HTML
4
star
44

survey-read-notes

Read Survey and Notes
Python
4
star
45

yolov8-app

use yolov8 detect face
4
star
46

all-learn-notes

my learn notes in here
Shell
4
star
47

PytorchTemplateBuild

Python
4
star
48

Self-ReinforcingFurnace

The Ways and tools to improve yourself(修身炉的可操作实现方式)
4
star
49

RoboFlow-CV-Project

4
star
50

ROS_CV

4
star
51

docs-list

isLinXu docs list
4
star
52

Harvard-CS-Course

Harvard-CS-Course
Python
4
star
53

datasets-read-notes

datasets-read-notes
Python
4
star
54

model-graphviz-plot

Python
4
star
55

CMU-CS-Course

CMU CS Course
Python
4
star
56

hugging-downloader

hugging-face-downloader
Python
4
star
57

inference.py

4
star
58

Awesome-Reasearch-Work

Awesome AI Reasearch Work
4
star
59

GAN_All-Lab

GAN all done
3
star
60

MindSporeWorkShop

use MindSpore train and valid deeplearning models
Python
3
star
61

ADLTTI-Book

[Book Translation]Applied Deep Learning Tools, Techniques, and Implementation
3
star
62

language-process-webui

language process webui
Python
3
star
63

pytorch2-practice

practice pytorch2
Jupyter Notebook
3
star
64

experiment-logger

Python
3
star
65

cv-process-gui

Python
3
star
66

Tiny-GPT

Python
3
star
67

keras3-learning

3
star
68

awesome-cv-model

awesome cv model
Python
3
star
69

fine-tune-pretrain-model

(ftpm)fine-tune-pretrain-model
3
star
70

open-cv-inference

C++
3
star
71

PytorchAudioProject

Python
3
star
72

d2l-pytorch

3
star
73

lighter

3
star
74

AidLux_Learn

Use AidLux Learn frame
Python
3
star
75

awesome-hand-book

awesome-hand-book
3
star
76

KaggleLine

3
star
77

PytorchCV

PyTorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision.
3
star
78

blog

My Blog Site
HTML
3
star
79

OneInstaller

3
star
80

License

3
star
81

DL_Frame_Models

Models Research of Deep Learning Frame Work
Python
3
star
82

my-cnblog-theme

https://www.cnblogs.com/isLinXu/
CSS
3
star
83

FleetProject

Python
3
star
84

paddle-lighting

3
star
85

mm-install

3
star
86

AI-Map

Python
3
star
87

SQL_Learn

Learn SQL
3
star
88

AICppLab

Using C + + to develop opencv
C++
3
star
89

PointCloudLab

Some experiments based on Point Cloud
C++
3
star
90

MyJupyterNotebook

My Jupyter Notebook in Here
Jupyter Notebook
3
star
91

Matpy

3
star
92

yolo_series

yolo series
3
star
93

VS_SourceCode

3
star
94

PaddleCV

PaddleCV: A Paddle-Based Framework for Deep Learning in Computer Vision.
3
star
95

DeepNetModelLab

Deep Network Model Laboratory
Python
3
star
96

kaggle-pipeline

Kaggle Pipeline and Data analysis
3
star
97

RaspberryPi_Vgg16

Python
3
star
98

JetBot-AIOT

3
star
99

pp-install

3
star
100

AI-Docker

3
star