MCPcopy Create free account

hub / github.com/FLyingLSJ/PyTorch-YOLOv3-master / functions

Functions47 in github.com/FLyingLSJ/PyTorch-YOLOv3-master

↓ 14 callersFunctionto_cpu
(tensor)
utils/utils.py:14
↓ 4 callersFunctionload_classes
Loads class labels at 'path'
utils/utils.py:18
↓ 4 callersMethodload_darknet_weights
Parses and loads the weights stored in 'weights_path
models.py:276
↓ 3 callersMethod__init__
(self, config_path, img_size=416)
models.py:247
↓ 3 callersFunctionbbox_iou
Returns the IoU of two bounding boxes
utils/utils.py:196
↓ 3 callersFunctionnon_max_suppression
Removes detections with lower object confidence score than 'conf_thres' and performs Non-Maximum Suppression to further filter detections.
utils/utils.py:229
↓ 2 callersFunctionconvert_annotation
(image_id,flag,savepath)
data/custom/3_trans.py:31
↓ 2 callersFunctionevaluate
(model, path, iou_thres, conf_thres, nms_thres, img_size, batch_size)
test.py:23
↓ 2 callersFunctioniou
计算一个 ground truth 边界盒和 k 个先验框(Anchor)的交并比(IOU)值。 参数box: 元组或者数据,代表 ground truth 的长宽。 参数clusters: 形如(k,2)的numpy数组,其中k是聚类Anchor框的个数 返回:g
data/custom/kmeans-anchor-boxes/gen_anchor.py:6
↓ 2 callersMethodlist_of_scalars_summary
Log scalar variables.
utils/logger.py:14
↓ 2 callersFunctionlistname
(path,idtxtpath)
data/custom/2_createID.py:5
↓ 2 callersFunctionpad_to_square
(img, pad_value)
utils/datasets.py:15
↓ 2 callersFunctionparse_data_config
Parses the data configuration file 解析数据配置文件、 返回的是字典 包括以下内容 classes= 1 # 类别数 train=data/custom/train.txt valid=data/c
utils/parse_config.py:23
↓ 2 callersFunctionrescale_boxes
Rescales bounding boxes to the original shape
utils/utils.py:39
↓ 2 callersFunctionresize
(image, size)
utils/datasets.py:28
↓ 2 callersFunctionxywh2xyxy
(x)
utils/utils.py:56
↓ 1 callersFunctionap_per_class
Compute the average precision, given the recall and precision curves. Source: https://github.com/rafaelpadilla/Object-Detection-Metrics. # Ar
utils/utils.py:65
↓ 1 callersFunctionavg_iou
计算一个ground truth和k个Anchor的交并比的均值。
data/custom/kmeans-anchor-boxes/gen_anchor.py:24
↓ 1 callersFunctionbbox_wh_iou
(wh1, wh2)
utils/utils.py:187
↓ 1 callersFunctionbuild_targets
(pred_boxes, pred_cls, target, anchors, ignore_thres)
utils/utils.py:270
↓ 1 callersFunctioncompute_ap
Compute the average precision, given the recall and precision curves. Code originally from https://github.com/rbgirshick/py-faster-rcnn. # A
utils/utils.py:120
↓ 1 callersMethodcompute_grid_offsets
(self, grid_size, cuda=True)
models.py:129
↓ 1 callersFunctionconvert
(size, box)
data/custom/3_trans.py:18
↓ 1 callersFunctioncreate_modules
Constructs module list of layer blocks from module configuration in module_defs 将配置文件的内容转成模型, 输入是一个列表,列表中是字典,每个字典代表一个网络块
models.py:16
↓ 1 callersFunctionget_batch_statistics
Compute true positives, predicted scores and predicted labels per sample
utils/utils.py:148
↓ 1 callersFunctionhorisontal_flip
(images, targets)
utils/augmentations.py:6
↓ 1 callersFunctionkmeans
利用IOU值进行K-means聚类 参数boxes: 形状为(r, 2)的ground truth框,其中r是ground truth的个数 参数k: Anchor的个数 参数dist: 距离函数 返回值:形状为(k, 2)的k个Anchor框
data/custom/kmeans-anchor-boxes/gen_anchor.py:31
↓ 1 callersFunctionload_dataset
(path)
data/custom/kmeans-anchor-boxes/gen_anchor.py:71
↓ 1 callersFunctionparse_model_config
Parses the yolo-v3 layer configuration file and returns module definitions
utils/parse_config.py:3
Method__getitem__
(self, index)
utils/datasets.py:44
Method__getitem__
(self, index)
utils/datasets.py:80
Method__init__
(self, scale_factor, mode="nearest")
models.py:95
Method__init__
(self)
models.py:108
Method__init__
(self, anchors, num_classes, img_dim=416)
models.py:115
Method__init__
Create a summary writer logging to log_dir.
utils/logger.py:5
Method__init__
(self, folder_path, img_size=416)
utils/datasets.py:40
Method__init__
list_path:数据集的路径,这个文件是一个 txt 文件,里面每一行是一个图片的路径
utils/datasets.py:60
Method__len__
(self)
utils/datasets.py:55
Method__len__
(self)
utils/datasets.py:153
Methodcollate_fn
(self, batch)
utils/datasets.py:137
Methodforward
(self, x)
models.py:100
Methodforward
(self, x, targets=None, img_dim=None)
models.py:141
Methodforward
(self, x, targets=None)
models.py:256
Functionrandom_resize
(images, min_size=288, max_size=448)
utils/datasets.py:33
Methodsave_darknet_weights
@:param path - path of the new weights file @:param cutoff - save layers between 0 and cutoff (cutoff = -1 -> all are sav
models.py:329
Methodscalar_summary
Log a scalar variable.
utils/logger.py:9
Functionweights_init_normal
对权重进行初始化
utils/utils.py:27