MCPcopy Create free account

hub / github.com/HuKai97/yolov5-5.x-annotations / functions

Functions311 in github.com/HuKai97/yolov5-5.x-annotations

Method__init__
(self, c1,c2)
models/common.py:328
Method__init__
:params: in_planes 输入模块的feature map的channel :params: ratio 降维/升维因子 通道注意力则是将一个通道内的信息直接进行全局处理,容易忽略通道内的信息交互
models/common.py:338
Method__init__
对空间注意力来说,由于将每个通道中的特征都做同等处理,容易忽略通道间的信息交互
models/common.py:361
Method__init__
(self, inp, oup, reduction=32)
models/common.py:385
Method__init__
(self)
models/common.py:440
Method__init__
(self, model)
models/common.py:463
Method__init__
(self, imgs, pred, files, times=None, names=None, shape=None)
models/common.py:532
Method__init__
这是一个二级分类模块, 什么是二级分类模块? 比如做车牌的识别, 先识别出车牌, 如果想对车牌上的字进行识别, 就需要二级分类进一步检测. 如果对模型输出的分类再进行分类, 就可以用这个模块. 不过这里这个类写的比较简单, 若进行复杂的二级分类, 可以根据自己的实际
models/common.py:617
Method__init__
(self, c1)
models/activations.py:105
Method__init__
(self, c1, k=1, s=1, r=16)
models/activations.py:121
Method__init__
(self, channels, reduction=4, k=2, conv_type='2d')
models/activations.py:140
Method__init__
(self, channels, reduction=4, k=2, conv_type='2d')
models/activations.py:172
Method__init__
(self, channels, reduction=4, k=2, conv_type='2d')
models/activations.py:193
Method__init__
(self, c1, c2, k=1, s=1, g=1, act=True)
models/experimental.py:18
Method__init__
(self, c1, c2, k=3, s=1)
models/experimental.py:35
Method__init__
:params c1: 输入feature map的通道数 :params c2: 输出的feature map的通道数(这个函数的关键点就是对c2进行分组) :params k: 混合的卷积核大小 其实论文里是[3, 5, 7...]用的比较多的
models/experimental.py:54
Method__init__
(self)
models/experimental.py:90
Method__init__
(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False)
models/experimental.py:142
Method__iter__
(self)
utils/datasets.py:141
Method__iter__
(self)
utils/datasets.py:154
Method__iter__
(self)
utils/datasets.py:1419
Method__iter__
(self)
utils/datasets.py:1461
Method__len__
(self)
utils/datasets.py:138
Method__len__
(self)
utils/datasets.py:387
Method__len__
(self)
utils/datasets.py:1343
Method__len__
(self)
utils/datasets.py:1442
Method__len__
(self)
utils/datasets.py:1500
Method__len__
(self)
models/common.py:613
Method__next__
与iter一起用?
utils/datasets.py:1292
Method__next__
(self)
utils/datasets.py:1423
Method__next__
(self)
utils/datasets.py:1465
Method_print_biases
打印模型中最后Detect层的偏置bias信息(也可以任选哪些层bias信息)
models/yolo.py:431
Method_print_weights
打印模型中Bottleneck层的权重参数weights信息(也可以任选哪些层weights信息)
models/yolo.py:441
Method_timeout_handler
(self, signum, frame)
utils/general.py:56
Methodautoshape
add AutoShape module 直接调用common.py中的AutoShape模块 也是一个扩展模型功能的模块
models/yolo.py:484
Methodautoshape
(self)
models/common.py:468
Functionautosplit
自行使用 自行划分数据集 自动将数据集划分为train/val/test并保存 path/autosplit_*.txt files Usage: from utils.datasets import *; autosplit() :params path: 数据集image
utils/datasets.py:1589
Methodbackward
(ctx, grad_output)
models/activations.py:27
Functionbutter_lowpass_filtfilt
当data值抖动太大, 就取data的平滑曲线
utils/plots.py:547
Functioncheck_wandb_config_file
(data_config_file)
utils/wandb_logging/wandb_utils.py:31
Methodcollate_fn
这个函数会在create_dataloader中生成dataloader时调用: 整理函数 将image和label整合到一起 :return torch.stack(img, 0): 如[16, 3, 640, 640] 整个batch的图片 :r
utils/datasets.py:531
Methodcollate_fn4
同样在create_dataloader中生成dataloader时调用: 这里是yolo-v5作者实验性的一个代码 quad-collate function 当train.py的opt参数quad=True 则调用collate_fn4代替collate_fn 作
utils/datasets.py:562
Methodcrop
(self, save_dir='runs/hub/exp')
models/common.py:586
Functiondataset_stats
yolov5数据集没有用 自行使用 返回数据集的状态字典 包含: 每个类别的图片数量 每个类别的实例数量 Return dataset statistics dictionary with images and instances counts per split per cl
utils/datasets.py:1615
Functiondownload
在voc.yaml中下载数据集 Multi-threaded file download and unzip function :params url: 下载文件的url地址 :params dir: 下载下来文件保存的目录 :params unzip: 下载后文件是
utils/general.py:419
Functionextract_boxes
自行使用 生成分类数据集 将目标检测数据集转化为分类数据集 集体做法: 把目标检测数据集中的每一个gt拆解开 分类别存储到对应的文件当中 Convert detection dataset into classification dataset, with one directory
utils/datasets.py:1544
Functionfind_modules
用于找到模型model中类型是mclass的层结构的索引 Finds layer indices matching module class 'mclass' :params model: 模型 :params mclass: 层结构类型 默认nn.Conv2d
utils/torch_utils.py:284
Functionflatten_recursive
没用到 不是很重要 将一个文件路径中的所有文件复制到另一个文件夹中 即将image文件和label文件放到一个新文件夹中 Flatten a recursive directory by bringing all files to top level
utils/datasets.py:1533
Methodforward
(self, pred, true)
utils/loss.py:33
Methodforward
(self, pred, true)
utils/loss.py:63
Methodforward
(self, pred, true)
utils/loss.py:99
Methodforward
(self, x)
models/yolo.py:151
Methodforward
:return train: 一个tensor list 存放三个元素 [bs, anchor_num, grid_w, grid_h, xywh+c+20classes] 分别是 [1, 3, 80, 80, 25] [1, 3,
models/yolo.py:197
Methodforward
(self, x)
models/common.py:51
Methodforward
(self, x)
models/common.py:82
Methodforward
(self, x)
models/common.py:104
Methodforward
(self, x)
models/common.py:130
Methodforward
(self, x)
models/common.py:155
Methodforward
(self, x)
models/common.py:172
Methodforward
(self, x)
models/common.py:185
Methodforward
(self, x)
models/common.py:211
Methodforward
(self, x)
models/common.py:228
Methodforward
(self, x)
models/common.py:256
Methodforward
(self, x)
models/common.py:278
Methodforward
(self, x)
models/common.py:316
Methodforward
(self, x)
models/common.py:333
Methodforward
(self, x)
models/common.py:355
Methodforward
(self, x)
models/common.py:369
Methodforward
(self, x)
models/common.py:402
Methodforward
:params x[0]: [batch, num_anchors(3个yolo预测层), (x+y+w+h+1+num_classes)] 直接调用的是general.py中的non_max_suppression函数给model扩展nms功能
models/common.py:443
Methodforward
(self, imgs, size=640, augment=False, profile=False)
models/common.py:473
Methodforward
(self, x)
models/common.py:631
Methodforward
(x)
models/activations.py:12
Methodforward
(ctx, x)
models/activations.py:19
Methodforward
(self, x)
models/activations.py:34
Methodforward
(x)
models/activations.py:43
Methodforward
(x)
models/activations.py:54
Methodforward
(ctx, x)
models/activations.py:63
Methodforward
(self, x)
models/activations.py:78
Methodforward
(self, x)
models/activations.py:93
Methodforward
(self, x)
models/activations.py:111
Methodforward
(self, x)
models/activations.py:131
Methodforward
(self, x)
models/activations.py:165
Methodforward
(self, x)
models/activations.py:176
Methodforward
(self, x)
models/activations.py:197
Methodforward
(self, x)
models/experimental.py:26
Methodforward
(self, x)
models/experimental.py:45
Methodforward
(self, x)
models/experimental.py:79
Methodforward
(self, x, augment=False)
models/experimental.py:93
Methodforward
(self, x)
models/experimental.py:151
Methodforward
(self, x)
models/experimental.py:169
Methodfuseforward
前向融合计算 减少推理时间
models/common.py:54
Functiongdrive_download
实现从google drive上下载压缩文件 :params id: url ?后面的id参数的参数值 :params file: 需要下载的压缩文件名
utils/google_utils.py:121
Functionhist_equalize
yolov5并没有使用直方图均衡化的增强操作 可以自己试试 直方图均衡化增强操作 Equalize histogram on BGR image 'img' with img.shape(n,m,3) and range 0-255 :params img: 要进行直方图均衡化的
utils/datasets.py:1504
Functionis_pip
没用到 当前文件是否在pip package(site-packages)文件里 Is file in a pip package?
utils/general.py:120
Functionload_mosaic9
用在LoadImagesAndLabels模块的__getitem__函数 替换mosaic数据增强 将九张图片拼接在一张马赛克图像中 loads images in a 9-mosaic :param self: :param index: 需要获取的图像索引 :
utils/datasets.py:849
Methodmatrix
(self)
utils/metrics.py:255
Functionplot_images
用在test.py中进行绘制前3个batch的ground truth和预测框predictions(两个图) 一起保存 将整个batch的labels都画在这个batch的images上 Plot image grid with labels :params images:
utils/plots.py:159
Functionplot_one_box_PIL
使用PIL在原图im上画一个bounding box :params box: 预测得到的bounding box [x1 y1 x2 y2] :params im: 原图 要将bounding box画在这个图上 array :params color: bo
utils/plots.py:86
Functionplot_targets_txt
没用到 和plot_labels作用重复 利用targets.txt xywh画出其直方图 Plot targets.txt histograms
utils/plots.py:352
← previousnext →201–300 of 311, ranked by callers