YOLOX source code line by line explanation of Anchor free series detectors (2)--Building PAFPN-like structure and data flow analysis

The learning of the entire YOLOX source code must be in the following order: Backbone->FPN->Head->->Data read source code->Data enhancement source code->loss calculation source code->simOTA source code->demo.py script ->train.py script. And this series of blog posts follows that sequence to analyze the code line by line. Note that it is line by line, including python syntax, tensor dimensions and the role and application of line-by-line code. In fact, there is no mysterious place in the network structure. Some modules are stacked together. You can modify any module without any reason. After reading this series, I can play with any network structure at will, not just limited to one parameter adjuster.

This article is about the construction of the PAFPN-like structure in YOLOX. Before that, you must read Part 1, otherwise, there will be a lot of content in Part 1 that you can't understand.


The above picture is the implementation diagram of YOLOX's FPN structure. The yellow font is the intermediate variable in the code, which is easy to understand. The dimension is the output feature dimension of the entire network when the yolox_s network is used. First open yolox\models\yolo_pafpn.py . The official implementation process of the entire FPN has only the following codes, which can be said to be very simple. Simple statements are directly annotated:

import torch
import to

Guess you like

Origin blog.csdn.net/qq_42308217/article/details/122909371