YOLOX source code interpretation series

1. The overall structure of YOLOX

demo

insert image description here

MegEngine: Megvii Open Source Framework for Deep Learning – Tianyuan (released on March 25, 2020)
ONNX: Open Neural Network Exchange, is an ecosystem of deep learning development tools released by Microsoft and Facebook, designed to allow AI developers to choose as the project develops With the right tools, networks can be trained directly on different frameworks.
TensorRT: a high-performance deep learning support engine launched by Nvidia, in order to better utilize the GPU
openvino: a comprehensive tool suite launched by Intel for rapid deployment of applications and
solutions Especially android) open source deep learning forward framework

docs

insert image description here

manipulate_training_image_size.md: Describes how to control image size when training on your own data.
modle_zoo.md: Various standard models are introduced.
quick_run.md: Introduces the use and operation of the code
train_custom_data.mdand introduces how to use YOLOX to train your own custom data. We take fine-tuning the YOLOX-S model on the VOC dataset as an example to give clearer guidance.
updates_note.mdTalked about updating the code. For example: image caching is supported for faster training, which requires larger system RAM. Eliminates dependency on apex and supports torch amplifier training. Optimized preprocessing for faster training Replaced old warp augmentation with new HSV aug for faster training and better performance.

exps:examples

Introduces the configuration files used for different standard models, including various input parameters, module method selection, and specific configuration examples
insert image description here

tools

Some common files for training, training, testing, demo, etc.
insert image description here

yolox

core part
insert image description here

insert image description here
core: some loaded files

insert image description here
datasets: data processing
coco_classes.py: category of coco dataset
coco.py: initialization of coco dataset, data reading
voc_classes.py: category of voc dataset
voc.py: initialization of voc dataset, data reading.
datasets_wrapper.py: Organize and package the processed data set
mosaicdetection.py: Perform mosaic operation to achieve data enhancement
data_augment.py: The module performs related data processing, including some data enhancement methods such as hsv
data_prefetcher.py: Speeds up data loading of pytorch
dataloading.py: This module performs data loading and obtains data sets Documentation
samplers.py: This module performs sampling, a batch sampler that will generate a small batch of (mosaic, index) tuples from another sampler
init.py: some dependencies library
insert image description here
evaluator: evaluation

insert image description here
exp:base examples

insert image description here
model: model body code
init.py: some dependent packages, imported modules and functions
darknet.py: backbone network Darknet53
losses.pyloss: the function uses IOUloss, calculates the intersection ratio
network_blocks.py: the module that the network needs to call, uses the silu activation function
yolo_fpn.py: YOLOFPN module. Darknet 53 is the default backbone for this model. Call Darknet 53 as the backbone network
yolo_head.py: This module has three operations: decoupled head, Multi positives, SimOTA
yolo_pafpn.py: another backbone network, backbone-YOLOPAFPN. PA refers to the structure of PANet, and FPN refers to the feature pyramid structure.
yolox.py: YOLOX model module. The backbone network and components before the call, the module list is defined by the create_yolov3_modules function. The network returns loss values ​​from the three YOLO layers during training, and detection results during testing.
insert image description here
utils: tool code

2. Interpretation of datasets module

2.1 Mosaic data enhancement

reference blog

Guess you like

Origin blog.csdn.net/weixin_46297585/article/details/123469585