0% found this document useful (0 votes)
13 views

YOLOv11 Intro-class

The document provides a comprehensive overview of object detection using YOLO v11, a state-of-the-art algorithm known for its speed and real-time tracking capabilities. It covers the introduction to deep learning, the YOLO architecture, environment setup, dataset preparation, training processes, and best practices. Additionally, it includes practical installation and usage instructions for tools like Anaconda, LabelImg, and Roboflow.

Uploaded by

ecolvntw
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

YOLOv11 Intro-class

The document provides a comprehensive overview of object detection using YOLO v11, a state-of-the-art algorithm known for its speed and real-time tracking capabilities. It covers the introduction to deep learning, the YOLO architecture, environment setup, dataset preparation, training processes, and best practices. Additionally, it includes practical installation and usage instructions for tools like Anaconda, LabelImg, and Roboflow.

Uploaded by

ecolvntw
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 73

OBJECT DETECTION WITH

YOLO v11

1
PART I - INTRODUCTION
o Introduction to Deep Learning

o Introduction to Object Detection

o Overview YOLO v11

o YOLO v11 Network Structure

2
INTRODUCTION TO DEEP LEARNING

- Deep learning is a method in


artificial intelligence (AI) that
teaches computers to process
data in a way that is inspired
by the human brain.
- Deep learning models can
recognize complex patterns in
pictures, text, sounds, and
other data to produce accurate
insights and predictions.

3
WHY DEEP LEARNING
Here are some of the reasons why
deep learning is so popular:
▪ Deep learning is very effective at
learning from data.
▪ Deep learning is very versatile.
▪ Deep learning is becoming
increasingly accessible.
▪ The amount of data available for
training deep learning models is
increasing rapidly.

4
WHAT WE CAN DO WITH DEEP
LEARNING

5
INTRODUCTION TO OBJECT
DETECTION

Object detection with deep learning is a computer vision technique that uses
deep learning algorithms to identify and locate objects in images or videos.
6
OBJECT DETECTION MODELS
There are a lot of object detection
models nowadays. However all of them
are branches of these main models.

One-stage : directly classify and


locate objects in the image without
generating candidate regions.

Two-stage : generate a set of


candidate regions containing objects in
the image in the first stage. In the
second stage, the algorithm classifies
each candidate region and refines its
location.

7
Object detection is a very competitive and challenging field!

8
https://paperswithcode.co
YOLO OBJECT DETECTION
▪ You Only Look Once (YOLO) is a state-of-the-art, real-time object detection algorithm
introduced in 2015 by Joseph Redmon, et al, in their famous research paper “You Only Look
Once: Unified, Real-Time Object Detection”. YOLO is a one-stage object detection algorithm,
which means that it predicts bounding boxes and class probabilities in a single pass.
▪ Here are the benefit of YOLO in practice:

YOLO is known for its fast processing speed, making it suitable for
• Speed
real-time applications.

Capable of tracking objects in real-time, which is crucial for dynamic


• Real-Time Tracking
environments.

YOLO's straightforward architecture makes it easier to integrate with


• Easy Integration
other systems or applications.

NOTE: There are many YOLO variants! Next, we will discuss YOLOv11 specifically.
9
10
YOLOv11 is state-of-the-art of YOLO-series

Performance comparison among YOLO-series

https://github.com/ultralytics/ultralyti
11
cs
YOLOv11 as state of the art YOLO-series
YOLOv11 was developed by Ultralytics https://github.com/ultralytics/ultralytics

Key features from the authors

• Advanced Backbone and Neck Architectures: YOLOv11 employs state-of-the-art


backbone and neck architectures, resulting in improved feature extraction and object
detection performance.

• Anchor-free Split Ultralytics Head: YOLOv11 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, YOLOv11 is suitable for real-time object
detection tasks in diverse application areas.

• Variety of Pre-trained Models: YOLOv11 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. 12
PART II - ENVIRONMENT SETUP
o Setup

o Hands-on Installation

13
Setup
1.open www.anaconda.com/download

14
Setup
2. Click Anaconda3-2023.x.x.exe

15
Setup
2. Install the Anaconda as below

16
Setup
2. Install the Anaconda as below

17
Setup
2. Install the Anaconda as below

18
Setup
3. Open Anaconda application and click CMD.exe
prompt

19
Setup
4. Create Environment Conda

$ conda create --name [name environment] -y python=x.x


$ conda activate [name environment]

Every time you want to use Yolo V11, activate your environment. In our case
the environment is “yolov11”

20
Setup
5. install YoloV11 Framework

If have Nvidia GPU

And

21
To add manually ultralytics YOLO v11

● go to
https://github.com/ultralytics/ultralytics

22
Download zip file and extract it in the working folder/yolov11 folder

23
PART III - DATASET PREPARATION
o Introduction to Image Labeling

o Labelling Your own Dataset

o Import Labelled Images to YOLO


v11

24
o Introduction to Image Labeling

Image labeling is the process of identifying and marking various details in an


image. Image labeling is useful when automating the process of generating
metadata or making recommendations to users based on details in their
images.

labelling currently can be separate into 4

- class name label ( for classification problem)

- bounding box label ( for detection problem)

- polygon label ( for segmentation problem)

- prompt label ( for generate image )


25
o Labelling Your own Dataset

LabelImg
LabelImg is a graphical image annotation tool.
It is written in Python and uses Qt for its graphical interface.
Annotations are saved as XML files in PASCAL VOC format.
Besides, it also supports YOLO and CreateML formats.

LabelImg installation for Windows

26
o Labelling Your own Dataset

27
Interface of Labelimg software

28
29
30
31
Here are some shortcuts which can be used while
using Labelimg

32
33
o Txt file

34
First 0
Second 1
Third 2

35
o Txt file

36
Another examples of labeling with single class

37
Single
label or
class for
all 4 tea
bags

38
Another examples of labeling with multiple class

39
multiple
labels or
classes for
all 4 tea
bags

40
o Labelling Your own Dataset

Roboflow
Roboflow is website base for help annotate the label with easy-to-use

41
Go to roboflow website
https://roboflow.com/ and sign in

after sign in, create a project


example:

42
Name the project and select what are we detecting e.g. Tea bag

Example:

43
Upload the images

44
Save the images and continue

45
Assign the images and go for
annotation

46
Start annotation

47
Annotation example

48
After annotation is complete,
Add the images to dataset

49
After adding images to dataset it will automatically split the data into
training and validation

50
the go to Versions and export the data to download

51
Select the format of annotation , for this case use YOLO v8 format and download

52
o Import Labelled Images to YOLO
v11
Follow this method to all labelling softwares except roboflow, which convert the data in training and
validation automatically

we will have two folders one having images and other


having labels
example:

53
we need to split the data into training and validation usually we split by
80% 20% means if we are having 100 images , 80 for training and 20 for
validation
we can do the manually
example how to manage the dataset into folders

54
Next we will create or edit(we will find it in yolo v8 folder after setup)
yaml file according to our dataset
Example

we need to open the yaml file and provide our dataset


information

55
This example is for single class
copy path of images training and validation folder and paste it
accordingly

56
This example is for multiple classes

57
PART IV - TRAINING THE MODEL
o YOLO v11 Training Process

o Training Your Model

o Evaluation and Testing

58
o YOLO v11 Training Process
First download the pretrained model from YOLO v11 repository
Steps

● go to https://github.com/ultralytics/ultralytics

● Find detection Option tab


Example

● Click on one of them and a table will pop up

● download the model based on requirements 59


Once the model is downloaded, keep the model file in the YOLO v8
folder

model file will be of .pt format

Example:

Next add Vscode on anaconda for the


training and test part:

60
What we have done so far?

● We Added Vscode on anaconda

● We have downloaded the pretrained

model

● We have created a yaml file

The next step is training and testing


61
TRAINING
we will first import the YOLO model and the load the pretrained model which
we have already downloaded and the start the training of model

code:
#import the model
from ultralytics import YOLO
#load the pretrained model
model = YOLO('yolov11n.yaml')
#training the model, add the path of yaml file, select epoch and image size
results = model.train(data=' dataset.yaml', epochs=300,imgsz=640)

62
we can also finetune the model

Example:

code:

# we can use different type of optimizers, not only this but we can use any type of fine tuning supported by YOLO v8

results = model.train(data='dataset.yaml', epochs=300,optimizer="AdamW",imgsz=1280,optimize=True)

63
The parameters you can experiment in Yolov11

64
The parameters you can experiment in Yolov11

65
o Training Your Model

66
Training process

67
Training result

68
o Evaluation and Testing

After the training is complete the model will save the results automatically and
display the save location of results
example:

Next we have testing our model


example
code:
# import the cv2 to visualize the results of testing
import cv2
#define model and path of best weights which are saved in the results
model = YOLO("runs/detect/train134/weights/best.pt")
# provide the image path
im1 = cv2.imread("path of image.png")
# define the model prediction and also we can define the confidence
results = model.predict(source=im1, save=True,conf=0.10)

69
Example of testing

70
PART V - BEST PRACTICE
o Follow the source and
Documentation

71
o Follow the source and Documentation

Anaconda
http://www.anaconda.com/download

YOLO v11 Github Repository


https://github.com/ultralytics/ultralytics

LabelImg software
https://pypi.org/project/labelImg/

Roboflow
https://roboflow.com/

72
THANK YOU

73

You might also like