Yolo v8
Yolo v8
My question or instruction is: I will give you a question or an instruction. Your objective is to answer
my question or fulfill my instruction.
It's possible that the question or instruction, or just a portion of it, requires relevant information from
the internet to give a satisfactory answer or complete the task. Therefore, provided below is the
necessary information obtained from the internet, which sets the context for addressing the question
or fulfilling the instruction. You will write a comprehensive reply to the given question or instruction.
Make sure to cite results using [[NUMBER](URL)] notation after the reference. If the provided
information from the internet results refers to multiple subjects with the same name, write separate
answers for each subject:
"""
"""
Reply in Français
It's possible that the question or instruction, or just a portion of it, requires relevant information from
the internet to give a satisfactory answer or complete the task. Therefore, provided below is the
necessary information obtained from the internet, which sets the context for addressing the question
or fulfilling the instruction. You will write a comprehensive reply to the given question or instruction.
Make sure to cite results using [[NUMBER](URL)] notation after the reference. If the provided
information from the internet results refers to multiple subjects with the same name, write separate
answers for each subject:
"""
NUMBER:1
URL: https://docs.ultralytics.com/models/yolov8/
TITLE: YOLOv8
CONTENT: Overview
YOLOv8 is the latest iteration in the YOLO series of real-time object detectors, offering cutting-edge
performance in terms of accuracy and speed. Building upon the advancements of previous YOLO
versions, YOLOv8 introduces new features and optimizations that make it an ideal choice for various
object detection tasks in a wide range of applications.
Key Features
Advanced Backbone and Neck Architectures: YOLOv8 employs state-of-the-art backbone and neck
architectures, resulting in improved feature extraction and object detection performance.
Anchor-free Split Ultralytics Head: YOLOv8 adopts an anchor-free split Ultralytics head, which
contributes to better accuracy and a more efficient detection process compared to anchor-based
approaches.
Variety of Pre-trained Models: YOLOv8 offers a range of pre-trained models to cater to various tasks
and performance requirements, making it easier to find the right model for your specific use case.
Supported Tasks
Model Type
Pre-trained Weights
Task
YOLOv8
Detection
YOLOv8-seg
Instance Segmentation
YOLOv8-pose
Pose/Keypoints
YOLOv8-cls
Classification
Supported Modes
Mode
Supported
Inference
Validation
Training
Performance
DetectionSegmentationClassificationPose
Model
size(pixels)
mAPval50-95
SpeedCPU ONNX(ms)
SpeedA100 TensorRT(ms)
params(M)
FLOPs(B)
YOLOv8n
640
37.3
80.4
0.99
3.2
8.7
YOLOv8s
640
44.9
128.4
1.20
11.2
28.6
YOLOv8m
640
50.2
234.7
1.83
25.9
78.9
YOLOv8l
640
52.9
375.2
2.39
43.7
165.2
NUMBER:2
URL: https://inside-machinelearning.com/yolov8/
CONTENT: Ultralytics vient de sortir sa dernière version de YOLO : YOLOv8. Dans cet article, on voit en
détail comment l’utiliser !
YOLO (You Only Look Once) est un des algorithmes de détection d’objets les plus populaires dans le
domaine du Deep Learning.
L’idée principale, et qui fait le charme de YOLO, est sa capacité à détecter des objets dans une image
en une seul passe.
À l’époque, c’est une avancée majeure car la plupart des algorithmes devait être exécuter à plusieurs
reprises sur différentes parties de l’image.
Pourquoi ?
Les capacités de YOLO n’ont donc pas tarder à séduire les professionnels.
Et c’est ainsi qu’on a le droit a une nouvelle version de YOLO plusieurs fois par an.
YOLOv6
YOLOv7
Je te propose de passer à la version 8.
Je te laisse juger par toi-même avec le graphe de ses performances comparées aux autres versions du
modèle :
import numpy as np
import requests
import cv2
Maintenant, on peut charger une version de YOLOv8 pré-entraîné (par défaut ultralytics nous donne
la plus récente) :
model = YOLO("yolov8n.pt")
Ensuite, on peut charger une image depuis internet et la transformer en array numpy :
response = requests.get("https://images.unsplash.com/photo-1600880292203-757bb62b4baf?
ixlib=rb-
4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=207
0&q=80")
image = Image.open(BytesIO(response.content))
image = np.asarray(image)
Puis, on lance la prédiction sur notre image (cela devrait être rapide, même sans GPU) :
results = model.predict(image)
On a lancé n
NUMBER:3
URL: https://docs.ultralytics.com/usage/python/
TITLE: Python
Welcome to the YOLOv8 Python Usage documentation! This guide is designed to help you seamlessly
integrate YOLOv8 into
your Python projects for object detection, segmentation, and classification. Here, you'll learn how to
load and use
pretrained models, train new models, and perform predictions on images. The easy-to-use Python
interface is a valuable
resource for anyone looking to incorporate YOLOv8 into their Python projects, allowing you to quickly
implement advanced
For example, users can load a model, train it, evaluate its performance on a validation set, and even
export it to ONNX
Python
model = YOLO('yolov8n.yaml')
model = YOLO('yolov8n.pt')
results = model.val()
results = model('https://ultralytics.com/images/bus.jpg')
success = model.export(format='onnx')
Train
Train mode is used for training a YOLOv8 model on a custom dataset. In this mode, the model is
trained using the
specified dataset and hyperparameters. The training process involves optimizing the model's
parameters so that it can
Train
model.train(epochs=5)
model = YOLO('yolov8n.yaml')
model.train(data='coco128.yaml', epochs=5)
model = YOLO("last.pt")
model.train(resume=True)
Train Examples
Val
Val mode is used for validating a YOLOv8 model after it has been trained. In this mode, the model is
evaluated on a
validation set to measure its accuracy and generalization performance. This mode can be used to
tune the hyperparameters
Val
model = YOLO('yolov8n.yaml')
model.train(data='coco128.yaml', epochs=5)
model = YOLO("model.pt")
# It'll use the data yaml file in model.pt if you don't set data.
model.val()
model.val(data='coco128.yaml')
Val Examples
Predict
Predict mode is used for making predictions using a trained YOLOv8 model on new images or videos.
In this mode, the
model is loaded from a checkpoint file, and the user can provide images or videos to perform
inference. The model
predicts the classes and locations of objects in the input images or videos.
Predict
from ult
"""
Reply in Français