0% found this document useful (0 votes)
351 views8 pages

Yolo v8

Uploaded by

zde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
351 views8 pages

Yolo v8

Uploaded by

zde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

I will give you a question or an instruction.

Your objective is to answer my question or fulfill my


instruction.

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.

My question or instruction is: explication c'est quoi yolov8n.pt ?

For your reference, today's date is 2023-07-14T16:56:43+01:00.

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

For your reference, today's date is 2023-07-14T16:57:45+01:00.

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.

Optimized Accuracy-Speed Tradeoff: With a focus on maintaining an optimal balance between


accuracy and speed, YOLOv8 is suitable for real-time object detection tasks in diverse application
areas.

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

yolov8n.pt, yolov8s.pt, yolov8m.pt, yolov8l.pt, yolov8x.pt

Detection

YOLOv8-seg

yolov8n-seg.pt, yolov8s-seg.pt, yolov8m-seg.pt, yolov8l-seg.pt, yolov8x-seg.pt

Instance Segmentation

YOLOv8-pose

yolov8n-pose.pt, yolov8s-pose.pt, yolov8m-pose.pt, yolov8l-pose.pt, yolov8x-pose.pt ,yolov8x-pose-


p6

Pose/Keypoints

YOLOv8-cls

yolov8n-cls.pt, yolov8s-cls.pt, yolov8m-cls.pt, yolov8l-cls.pt, yolov8x-cls.pt

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/

TITLE: YOLOv8 - Comment l'utiliser ? Meilleur Tutoriel

CONTENT: Ultralytics vient de sortir sa dernière version de YOLO : YOLOv8. Dans cet article, on voit en
détail comment l’utiliser !

YOLOv8 est la première version de YOLO sortie en 2023, le 10 janvier.

YOLO (You Only Look Once) est un des algorithmes de détection d’objets les plus populaires dans le
domaine du Deep Learning.

La première version est sortie en 2016 !

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 ?

Car ces algorithmes ne pouvait détecter qu’un seul objet à la fois.

Une perte de temps considérable !

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.

En 2022, on a déjà vu sur Inside Machine Learning :

YOLOv6

YOLOv7
Je te propose de passer à la version 8.

Mais avant… YOLOv8 vaut-il le coup ?

Je te laisse juger par toi-même avec le graphe de ses performances comparées aux autres versions du
modèle :

Et maintenant, voyons comment l’utiliser !

Tout d’abord, tu auras besoin de la librairie ultralytics.

Pour l’installer depuis python utilise cette commande :

!pip install ultralytics

Enlève le ! si tu utilise un terminal.

Utiliser sur Python

Pour utiliser YOLOv8 et afficher le résultat, il te faudra les librairies suivantes:

from ultralytics import YOLO

import numpy as np

from PIL import Image

import requests

from io import BytesIO

import cv2

Et si tu es sur Google Colab aussi importe celle-là :

from google.colab.patches import cv2_imshow

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

CONTENT: Python Usage

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

object detection capabilities. Let's get started!

For example, users can load a model, train it, evaluate its performance on a validation set, and even
export it to ONNX

format with just a few lines of code.

Python

from ultralytics import YOLO

# Create a new YOLO model from scratch

model = YOLO('yolov8n.yaml')

# Load a pretrained YOLO model (recommended for training)

model = YOLO('yolov8n.pt')

# Train the model using the 'coco128.yaml' dataset for 3 epochs

results = model.train(data='coco128.yaml', epochs=3)

# Evaluate the model's performance on the validation set

results = model.val()

# Perform object detection on an image using the model

results = model('https://ultralytics.com/images/bus.jpg')

# Export the model to ONNX format

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

accurately predict the classes and locations of objects in an image.

Train

From pretrained(recommended)From scratchResume

from ultralytics import YOLO

model = YOLO('yolov8n.pt') # pass any model type

model.train(epochs=5)

from ultralytics import YOLO

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

of the model to improve its performance.

Val

Val after trainingVal independently

from ultralytics import YOLO

model = YOLO('yolov8n.yaml')

model.train(data='coco128.yaml', epochs=5)

model.val() # It'll automatically evaluate the data you trained.

from ultralytics import YOLO

model = YOLO("model.pt")

# It'll use the data yaml file in model.pt if you don't set data.

model.val()

# or you can set the data you want to 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 sourceResults usage

from ult

"""

Reply in Français

You might also like