yolov8 source code interpretation (part1: backbone, head)

In addition to target detection, yolov8 also has an instance segmentation function.
Here is an explanation of the detection and segmentation code.

Let’s take a structural diagram first. There is no segmentation module in this diagram, and the segmentation module will be explained later in the code.
This article interprets the part in the red box.
You can see that there is a number on the right side of each module: 0, 1, ...
This number is the sequence number of the module, in the order of 0, 1, ..., 21, and the Concat module will specify which serial number layers to cat,
If you don't know which layer the serial number specified in Concat is, you can find it according to this number.

What is the specific structure of the C2f layer? Refer to here
insert image description here

Now start to read in the image, and the image size is (640, 640, 3) in the picture.
There is nothing special about preprocessing, only / 255.

enter yolov8/ultralytics/nn/autobackend.py.

class AutoBackend(nn.Module):
    

Guess you like

Origin blog.csdn.net/level_code/article/details/131327610