Week1 Where to find Padding or Convolution in Yolo5

Hi team,
I am going through all of the lectures and trying to understand the core of image preprocessing
before model training.
At the same time, I am going through yolo5 (GitHub - ultralytics/yolov5: YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite) and trying to find corresponding functions. Where in yolo5 can I find the padding or convolution? Is there somewhere in the PyTorch libraries?

Hello @Andriy_Fedorenko,

First, under ./model, you see a few yaml files, and they are some yolos’ configurations that the program will follow to build them.

Then, ./hubconf.py reads them, and, for example, calls this line to use them to build a model.

That line brings us here where you will see comments like # Define model, # Build strides, anchors, and # Init weights, biases, and among the codes, this function is used where you will finally see names like Bottleneck, Concat, Conv, etc. Those names are mostly defined in models/common.py, so go there if you want to see the details.

By now, I think you have seen that they save the architectures in text form in those yaml files, and let the program read the files to reconstruct the model.

Cheers,
Raymond