YOLOv8 COCO Class List: Complete 80 Object Categories

The YOLOv8 COCO class list contains 80 object categories that pretrained YOLOv8 detection models can recognize. These classes come from the COCO dataset and include common objects such as people, cars, animals, furniture, food items, sports equipment, and household objects. Each class has a unique ID from 0 to 79, which YOLOv8 uses internally during detection.

Introduction to the YOLOv8 COCO Class List

YOLOv8 pretrained object detection models are commonly trained on the COCO dataset, which contains 80 standard object categories. These classes cover many everyday objects found in real-world images and videos.

When a pretrained YOLOv8 model detects an object, it predicts a bounding box, class ID, class name, and confidence score. For example, a detected person is assigned class ID 0, while a detected car uses class ID 2.

Understanding the COCO class list is useful when filtering detections, building object-specific applications, or deciding whether a custom YOLOv8 model is required.

What Is the COCO Dataset in YOLOv8?

COCO stands for Common Objects in Context. It is a widely used computer vision dataset containing images with labeled objects, bounding boxes, segmentation annotations, and other visual information.

YOLOv8 pretrained detection models use the 80-category COCO object detection class set.

These categories represent objects commonly found in everyday environments, including people, transportation, animals, kitchen items, furniture, electronics, and sports equipment.

Why YOLOv8 Uses COCO Classes

COCO provides a large and diverse collection of annotated images, making it useful for training general-purpose object detectors.

Because its classes cover many common real-world objects, a YOLOv8 model trained on COCO can perform useful detection immediately without requiring users to train a model from scratch.

For example, pretrained YOLOv8 models can recognize people, bicycles, cars, dogs, chairs, laptops, bottles, and many other common objects.

How COCO Classes Are Used in Object Detection

During detection, YOLOv8 analyzes an image and generates predictions for objects it recognizes.

Each prediction is associated with a COCO class ID. The model maps this numerical ID to a readable class label.

For example:

  • Class ID 0 represents person.
  • Class ID 1 represents bicycle.
  • Class ID 2 represents car.
  • Class ID 16 represents dog.

Along with the class label, YOLOv8 predicts the position of the object using a bounding box and provides a confidence score indicating how certain the model is about the prediction.

How Many Classes Does YOLOv8 COCO Have?

YOLOv8 models trained on the standard COCO detection dataset support 80 object classes.

These classes are indexed from 0 through 79.

The class numbering is important when working with predictions programmatically because YOLOv8 often returns a numeric class ID that can then be mapped to the corresponding class name.

Understanding the 80 COCO Object Classes

The 80 COCO categories cover multiple types of objects.

They include:

  • people,
  • transportation,
  • animals,
  • outdoor objects,
  • sports equipment,
  • kitchen items,
  • food,
  • furniture,
  • electronics,
  • indoor household objects.

This variety makes COCO-trained YOLOv8 models suitable for many general object detection applications.

COCO Class IDs and Labels

Every COCO category used by YOLOv8 has a unique numerical class ID.

The first class has ID 0 and the final class has ID 79.

For example, YOLOv8 maps:

0 → person

2 → car

15 → cat

16 → dog

39 → bottle

56 → chair

63 → laptop

These IDs remain useful when filtering or processing predictions in code.

Complete YOLOv8 COCO Class List

The complete YOLOv8 COCO class mapping is:

Class IDClass Name
0person
1bicycle
2car
3motorcycle
4airplane
5bus
6train
7truck
8boat
9traffic light
10fire hydrant
11stop sign
12parking meter
13bench
14bird
15cat
16dog
17horse
18sheep
19cow
20elephant
21bear
22zebra
23giraffe
24backpack
25umbrella
26handbag
27tie
28suitcase
29frisbee
30skis
31snowboard
32sports ball
33kite
34baseball bat
35baseball glove
36skateboard
37surfboard
38tennis racket
39bottle
40wine glass
41cup
42fork
43knife
44spoon
45bowl
46banana
47apple
48sandwich
49orange
50broccoli
51carrot
52hot dog
53pizza
54donut
55cake
56chair
57couch
58potted plant
59bed
60dining table
61toilet
62tv
63laptop
64mouse
65remote
66keyboard
67cell phone
68microwave
69oven
70toaster
71sink
72refrigerator
73book
74clock
75vase
76scissors
77teddy bear
78hair drier
79toothbrush

Person and Vehicle Classes

The COCO dataset includes one person class and several transportation-related categories.

Important examples include:

  • person — 0
  • bicycle — 1
  • car — 2
  • motorcycle — 3
  • airplane — 4
  • bus — 5
  • train — 6
  • truck — 7
  • boat — 8

These classes make pretrained YOLOv8 models useful for traffic monitoring, vehicle counting, pedestrian detection, and transportation analysis.

Animal Classes

YOLOv8 can recognize several common animal categories from the COCO dataset.

These include bird, cat, dog, horse, sheep, cow, elephant, bear, zebra, and giraffe.

For example, cat uses class ID 15, dog uses 16, and horse uses 17.

These categories can be useful for wildlife monitoring, pet detection, farm applications, and general image analysis.

Household and Indoor Object Classes

Many common indoor objects are also included in the COCO classes.

Examples include chair, couch, bed, toilet, television, laptop, mouse, keyboard, cell phone, microwave, refrigerator, book, clock, vase, and toothbrush.

These categories make YOLOv8 useful for smart-home systems, indoor scene analysis, inventory detection, and assistive computer vision applications.

Food and Kitchen Object Classes

COCO includes several food and kitchen-related classes.

Kitchen objects include bottle, wine glass, cup, fork, knife, spoon, and bowl.

Food classes include banana, apple, sandwich, orange, broccoli, carrot, hot dog, pizza, donut, and cake.

These classes can be used in food recognition, restaurant applications, kitchen monitoring, and automated image classification workflows.

Sports and Outdoor Object Classes

Sports-related COCO categories include frisbee, skis, snowboard, sports ball, kite, baseball bat, baseball glove, skateboard, surfboard, and tennis racket.

Outdoor objects such as traffic lights, fire hydrants, stop signs, parking meters, benches, and umbrellas are also represented.

These categories allow YOLOv8 to support sports analysis, street-scene detection, and outdoor monitoring applications.

YOLOv8 COCO Class IDs

Class IDs are numerical identifiers used internally to represent object categories.

Instead of storing the word “person” directly in every prediction operation, the model can return ID 0, which is then mapped to the class name.

Class ID Mapping from 0 to 79

YOLOv8 COCO classes follow a zero-based numbering system.

This means:

First class: 0 — person

Last class: 79 — toothbrush

There are 80 total values because the range starts at zero.

Class IDs should not be confused with category identifiers used in every raw COCO annotation format, because YOLO training configurations commonly remap the selected 80 classes into a continuous range from 0 to 79.

How to Find the Class ID of an Object

You can find an object’s class ID by checking the COCO class mapping used by your YOLOv8 model.

For example:

  • person = 0
  • car = 2
  • dog = 16
  • backpack = 24
  • bottle = 39
  • pizza = 53
  • laptop = 63
  • cell phone = 67

When processing predictions through Python, the predicted numerical ID can be mapped to the model’s class-name dictionary.

How YOLOv8 Predicts COCO Classes

When YOLOv8 receives an image, the backbone first extracts visual features. The neck combines features at multiple scales, and the detection head produces class and bounding box predictions.

The output is then processed to identify the most relevant detections.

Class Confidence Scores

For each potential object, YOLOv8 produces classification scores representing the model’s confidence in different classes.

A stronger score indicates that the model has greater confidence that the detected object belongs to a particular category.

For example, if an object strongly resembles a car, the class score associated with the car category may become the highest prediction.

Confidence thresholds can be used to remove weak detections.

Bounding Boxes and Class Labels

Each final object detection combines localization and classification information.

A typical prediction contains:

  • bounding box coordinates,
  • class ID,
  • class name,
  • confidence score.

The bounding box identifies where the object appears in the image, while the class label indicates what the model believes the object is.

For example, YOLOv8 might return a bounding box around a vehicle together with class ID 2 and the label “car.”

Using the COCO Class List in YOLOv8 Projects

You do not always need to detect all 80 COCO classes.

Many applications only require a small subset of categories. YOLOv8 allows predictions to be filtered so that your application focuses only on relevant objects.

Filtering Specific Classes

Class IDs can be used to filter detections.

For example, a traffic application might only need:

  • person — 0
  • bicycle — 1
  • car — 2
  • motorcycle — 3
  • bus — 5
  • truck — 7

Other detections can be ignored even though the pretrained model is capable of recognizing them.

This makes downstream processing simpler and allows an application to focus on its intended objects.

Detecting Only Selected COCO Objects

Selected class IDs can be provided when running YOLOv8 inference.

For example, in Ultralytics Python usage:

from ultralytics import YOLO

model = YOLO("yolov8n.pt")

results = model("image.jpg", classes=[0, 2, 5])

This example limits the desired detections to class IDs 0, 2, and 5, corresponding to person, car, and bus.

The exact available inference options can depend on the Ultralytics version being used.

Using Class Names in Python Predictions

YOLOv8 also provides access to the mapping between numerical class IDs and readable class names.

A typical example is:

from ultralytics import YOLO

model = YOLO("yolov8n.pt")
results = model("image.jpg")

for result in results:
    for box in result.boxes:
        class_id = int(box.cls[0])
        class_name = model.names[class_id]
        print(class_id, class_name)

This makes it easy to convert numerical predictions into labels that can be displayed or used elsewhere in an application.

YOLOv8 COCO Classes vs Custom Classes

Pretrained COCO classes are useful for general-purpose object detection, but they do not cover every object a user may want to detect.

For specialized tasks, YOLOv8 can be trained or fine-tuned on a custom dataset containing different classes.

When to Use Pretrained COCO Classes

Use pretrained COCO classes when the objects you need are already included among the standard 80 categories.

For example, a pretrained model may be sufficient if your project focuses on:

  • people,
  • cars,
  • buses,
  • animals,
  • furniture,
  • common household objects.

Using a pretrained model avoids the need to collect and annotate a new dataset for common detection tasks.

When to Train YOLOv8 on Custom Classes

Custom training is necessary when your target objects are not represented by the COCO class list or when the standard model is not specialized enough for your environment.

For example, you may need custom training to detect:

  • industrial machine components,
  • specific product models,
  • plant diseases,
  • medical objects,
  • custom logos,
  • specialized tools.

A custom dataset defines its own class names, so the resulting YOLOv8 model is no longer limited to the standard 80 COCO categories.

FAQs About the YOLOv8 COCO Class List

How many COCO classes are available in YOLOv8?

Standard YOLOv8 models pretrained on COCO support 80 object classes. Their class IDs range from 0 to 79.

What are the 80 classes in YOLOv8?

The 80 classes include person, bicycle, car, motorcycle, airplane, animals, sports equipment, food, furniture, electronics, kitchen objects, and other common real-world categories. The complete list is provided above with corresponding IDs.

What is class 0 in YOLOv8 COCO?

Class ID 0 represents person in the standard YOLOv8 COCO class mapping.

What is the class ID range in YOLOv8?

For a standard COCO-trained YOLOv8 detection model, class IDs range from 0 to 79.

Can YOLOv8 detect objects outside the COCO class list?

A standard COCO-pretrained YOLOv8 model does not automatically recognize arbitrary objects outside its trained classes. To reliably detect additional categories, the model should be trained or fine-tuned using a custom dataset containing those objects.

Can I use only selected COCO classes in YOLOv8?

Yes. You can filter YOLOv8 predictions by class IDs so that only specific COCO categories are returned or processed by your application.

How can I add custom classes to YOLOv8?

To use custom classes, create a labeled dataset containing your target categories, define the class names in the dataset configuration, and train or fine-tune a YOLOv8 model on that dataset. The trained model will then use the custom class mapping instead of being limited to the standard COCO list.

Conclusion

The YOLOv8 COCO class list contains 80 object categories, numbered from class ID 0 to 79. These classes include common people, vehicles, animals, food, sports equipment, furniture, electronics, and household objects.

Understanding the class mapping is useful when reading predictions, filtering detections, or building applications that only need certain object categories.

For objects already covered by COCO, pretrained YOLOv8 models provide a convenient starting point. When a project requires specialized categories outside these 80 classes, YOLOv8 can be trained on a custom dataset with its own class names and IDs.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top