MCPcopy Create free account

hub / github.com/datawhalechina/dive-into-cv-pytorch / functions

Functions274 in github.com/datawhalechina/dive-into-cv-pytorch

↓ 15 callersMethodstep
Update parameters and rate
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/train_utils.py:16
↓ 11 callersMethod__init__
(self, layer, N)
code/chapter06_transformer/6.2_recognition_by_transformer/transformer.py:69
↓ 11 callersMethod__init__
(self, layer, N)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/transformer.py:69
↓ 11 callersMethod__init__
(self, layer, N)
code/chapter06_transformer/6.1_hello_transformer/transformer.py:69
↓ 8 callersFunctionmake_layers
(cfg, batch_norm=False)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/pytorch-vgg-cifar10/vgg.py:46
↓ 8 callersFunctionmake_layers
(cfg, batch_norm=False)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/VGG/vgg_models.py:48
↓ 7 callersMethodupdate
(self, val, n=1)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/pytorch-vgg-cifar10/main.py:275
↓ 5 callersFunctionclones
Produce N identical layers.
code/chapter06_transformer/6.2_recognition_by_transformer/transformer.py:59
↓ 5 callersFunctionclones
Produce N identical layers.
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/transformer.py:59
↓ 5 callersFunctionclones
Produce N identical layers.
code/chapter06_transformer/6.1_hello_transformer/transformer.py:59
↓ 4 callersMethod__init__
(self, in_ch, out_ch, bilinear=True)
code/chapter04_segmentation_introduction/building_identification_baseline/unet/unet_parts.py:50
↓ 4 callersFunctionconv3x3
(in_channels, out_channels, stride=1)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/ResNet/ResNet.py:43
↓ 4 callersFunctionfind_jaccard_overlap
Find the Jaccard Overlap (IoU) of every box combination between two sets of boxes that are in boundary coordinates. :param set_1: set 1, a t
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:339
↓ 4 callersFunctionstatistics_max_len_label
统计标签文件中最长的label所包含的字符数
code/chapter06_transformer/6.2_recognition_by_transformer/analysis_recognition_dataset.py:31
↓ 4 callersFunctionstatistics_max_len_label
统计标签中最长的label所包含的字符数
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/analysis_recognition_dataset.py:22
↓ 3 callersMethod__init__
(self)
code/chapter03_object_detection_introduction/tiny_detector_demo/model.py:17
↓ 3 callersFunctiondata_gen
Generate random data for a src-tgt copy task. V: 词典数量,取值范围[0, V-1],约定0作为特殊符号使用代表padding slen: 生成的序列数据的长度 batch: batch_size nbatch
code/chapter06_transformer/6.1_hello_transformer/first_train_demo.py:50
↓ 3 callersFunctionlinear_model
(x)
code/chapter01_preliminary_knowledge/1.4_linear_regression_pytorch/linear_regression_pytorch.py:22
↓ 3 callersMethodmake_layer
(self, block, out_channels, blocks, stride=1)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/ResNet/ResNet.py:88
↓ 3 callersFunctionsubsequent_mask
Mask out subsequent positions.
code/chapter06_transformer/6.2_recognition_by_transformer/transformer.py:164
↓ 3 callersFunctionsubsequent_mask
Mask out subsequent positions.
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/transformer.py:181
↓ 3 callersFunctionsubsequent_mask
Mask out subsequent positions.
code/chapter06_transformer/6.1_hello_transformer/transformer.py:169
↓ 3 callersMethodupdate
(self, val, n=1)
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:683
↓ 2 callersFunctionaccuracy
Computes the precision@k for the specified values of k
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/pytorch-vgg-cifar10/main.py:289
↓ 2 callersFunctioncxcy_to_xy
Convert bounding boxes from center-size coordinates (c_x, c_y, w, h) to boundary coordinates (x_min, y_min, x_max, y_max). :param cxcy: boun
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:274
↓ 2 callersMethoddecode
(self, memory, src_mask, tgt, tgt_mask)
code/chapter06_transformer/6.2_recognition_by_transformer/ocr_by_transformer.py:177
↓ 2 callersMethoddecode
(self, memory, src_mask, tgt, tgt_mask)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/ocr_by_transformer.py:164
↓ 2 callersMethoddecode
(self, memory, src_mask, tgt, tgt_mask)
code/chapter06_transformer/6.1_hello_transformer/transformer.py:44
↓ 2 callersMethoddetect_objects
Decipher the 441 locations and class scores (output of the tiny_detector) to detect objects. For each class, perform Non-Maximum Sup
code/chapter03_object_detection_introduction/tiny_detector_demo/model.py:229
↓ 2 callersMethodencode
(self, src, src_mask)
code/chapter06_transformer/6.2_recognition_by_transformer/ocr_by_transformer.py:165
↓ 2 callersMethodencode
(self, src, src_mask)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/ocr_by_transformer.py:152
↓ 2 callersMethodencode
(self, src, src_mask)
code/chapter06_transformer/6.1_hello_transformer/transformer.py:40
↓ 2 callersFunctiongreedy_decode
(model, src, src_mask, max_len, start_symbol, end_symbol)
code/chapter06_transformer/6.2_recognition_by_transformer/ocr_by_transformer.py:257
↓ 2 callersFunctiongreedy_decode
(model, src, src_mask, max_len, start_symbol, end_symbol)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/ocr_by_transformer.py:244
↓ 2 callersFunctionjudge_is_correct
(pred, label)
code/chapter06_transformer/6.2_recognition_by_transformer/ocr_by_transformer.py:279
↓ 2 callersFunctionjudge_is_correct
(pred, label)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/ocr_by_transformer.py:266
↓ 2 callersFunctionmake_model
构建模型 params: src_vocab: tgt_vocab: N: 编码器和解码器堆叠基础模块的个数 d_model: 模型中embedding的size,默认512 d_ff: FeedFor
code/chapter06_transformer/6.1_hello_transformer/transformer.py:280
↓ 2 callersFunctionparse_annotation
(annotation_path)
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:24
↓ 2 callersFunctionpredict
(test_loader, model, tta=10)
code/chapter02_image_classification_introduction/2.4_classification_action_SVHN/baseline.py:173
↓ 2 callersFunctionresize
Resize image. For the SSD300, resize to (300, 300). For our demo, resize to (224, 224). Since percent/fractional coordinates are cal
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:510
↓ 2 callersFunctionrun_epoch
Standard Training and Logging Function
code/chapter06_transformer/6.2_recognition_by_transformer/ocr_by_transformer.py:224
↓ 2 callersFunctionrun_epoch
Standard Training and Logging Function
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/ocr_by_transformer.py:211
↓ 2 callersFunctionrun_epoch
Standard Training and Logging Function
code/chapter06_transformer/6.1_hello_transformer/first_train_demo.py:101
↓ 2 callersFunctionstatistics_label_cnt
统计标签文件中都包含哪些label以及各自出现的次数
code/chapter06_transformer/6.2_recognition_by_transformer/analysis_recognition_dataset.py:15
↓ 2 callersFunctionstatistics_label_cnt
统计标签文件中都包含哪些label以及各自出现的次数
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/analysis_recognition_dataset.py:34
↓ 2 callersFunctionvalidate
Run evaluation
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/pytorch-vgg-cifar10/main.py:208
↓ 1 callersMethod__init__
(self, model_size, factor, warmup, optimizer)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/train_utils.py:8
↓ 1 callersMethod__init__
(self, src, trg=None, pad=0)
code/chapter06_transformer/6.1_hello_transformer/first_train_demo.py:28
↓ 1 callersMethod__init__
(self, img_path, img_label, transform=None)
code/chapter02_image_classification_introduction/2.4_classification_action_SVHN/baseline.py:31
↓ 1 callersMethod__init__
(self, block, layers, num_classes=10)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/ResNet/ResNet.py:76
↓ 1 callersMethod__init__
(self, in_planes, n1x1, n3x3red, n3x3, n5x5red, n5x5, pool_planes)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/GoogLeNet/GoogLeNet.py:17
↓ 1 callersMethod__init__
(self)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/BN/BatchNormalization.py:100
↓ 1 callersFunctionadjust_learning_rate
Sets the learning rate to the initial LR decayed by 2 every 30 epochs
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/pytorch-vgg-cifar10/main.py:282
↓ 1 callersFunctionadjust_learning_rate
Scale learning rate by a specified factor. :param optimizer: optimizer whose learning rate must be shrunk. :param scale: factor to multi
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:626
↓ 1 callersFunctionattention
Compute 'Scaled Dot Product Attention
code/chapter06_transformer/6.2_recognition_by_transformer/transformer.py:172
↓ 1 callersFunctionattention
Compute 'Scaled Dot Product Attention
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/transformer.py:189
↓ 1 callersFunctionattention
Compute 'Scaled Dot Product Attention
code/chapter06_transformer/6.1_hello_transformer/transformer.py:177
↓ 1 callersFunctionbatch_norm
(is_training, X, gamma, beta, moving_mean, moving_var, eps, momentum)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/BN/BatchNormalization.py:11
↓ 1 callersFunctioncalculate_mAP
Calculate the Mean Average Precision (mAP) of detected objects. 这里的map指标遵循的VOC2007的标准,具体地: 统一用IOU>0.5作为目标框是否准召的标准 AP的计算标准采用召回分别为 0:0.
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:126
↓ 1 callersFunctioncreate_data_lists
Create lists of images, the bounding boxes and labels of the objects in these images, and save these to file. :param voc07_path: path to the
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:52
↓ 1 callersMethodcreate_prior_boxes
Create the 441 prior (default) boxes for the network, as described in the tutorial. VGG16最后的特征图尺寸为 7*7 我们为特征图上每一个cell定义了共9种不
code/chapter03_object_detection_introduction/tiny_detector_demo/model.py:200
↓ 1 callersFunctioncxcy_to_gcxgcy
Encode bounding boxes (that are in center-size form) w.r.t. the corresponding prior boxes (that are in center-size form). For the center coo
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:285
↓ 1 callersMethoddecode
(self, memory, src_mask, tgt, tgt_mask)
code/chapter06_transformer/6.2_recognition_by_transformer/transformer.py:44
↓ 1 callersMethoddecode
(self, memory, src_mask, tgt, tgt_mask)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/transformer.py:44
↓ 1 callersFunctiondetect
Detect objects in an image with a trained tiny object detector, and visualize the results. :param original_image: image, a PIL Image :pa
code/chapter03_object_detection_introduction/tiny_detector_demo/detect.py:23
↓ 1 callersMethodencode
(self, src, src_mask)
code/chapter06_transformer/6.2_recognition_by_transformer/transformer.py:40
↓ 1 callersMethodencode
(self, src, src_mask)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/transformer.py:40
↓ 1 callersFunctionevaluate
Evaluate. :param test_loader: DataLoader for test data :param model: model
code/chapter03_object_detection_introduction/tiny_detector_demo/eval.py:33
↓ 1 callersFunctionexpand
Perform a zooming out operation by placing the image in a larger canvas of filler material. Helps to learn to detect smaller objects. :
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:365
↓ 1 callersFunctionfind_intersection
Find the intersection of every box combination between two sets of boxes that are in boundary coordinates. :param set_1: set 1, a tensor of
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:323
↓ 1 callersFunctionflip
Flip image horizontally. :param image: image, a PIL Image :param boxes: bounding boxes in boundary coordinates, a tensor of dimensions (
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:490
↓ 1 callersMethodforward
Take in and process masked src and target sequences.
code/chapter06_transformer/6.2_recognition_by_transformer/ocr_by_transformer.py:159
↓ 1 callersMethodforward
Take in and process masked src and target sequences.
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/ocr_by_transformer.py:146
↓ 1 callersMethodforward
(self, x, target)
code/chapter06_transformer/6.1_hello_transformer/first_train_demo.py:134
↓ 1 callersFunctiongcxgcy_to_cxcy
Decode bounding box coordinates predicted by the model, since they are encoded in the form mentioned above. They are decoded into center-siz
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:306
↓ 1 callersFunctionget_args
()
code/chapter04_segmentation_introduction/building_identification_baseline/train.py:131
↓ 1 callersFunctionget_loss
(y_, y)
code/chapter01_preliminary_knowledge/1.4_linear_regression_pytorch/linear_regression_pytorch.py:33
↓ 1 callersFunctiongreedy_decode
(model, src, src_mask, max_len, start_symbol)
code/chapter06_transformer/6.1_hello_transformer/first_train_demo.py:204
↓ 1 callersMethodinit_conv2d
Initialize convolution parameters.
code/chapter03_object_detection_introduction/tiny_detector_demo/model.py:135
↓ 1 callersFunctionload_dataset_info
(img_dir, anno_path)
code/chapter04_segmentation_introduction/building_identification_baseline/dataset.py:74
↓ 1 callersFunctionload_lbl2id_map
读取label-id映射关系记录文件
code/chapter06_transformer/6.2_recognition_by_transformer/analysis_recognition_dataset.py:46
↓ 1 callersFunctionload_lbl2id_map
读取label-id映射关系记录文件
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/analysis_recognition_dataset.py:47
↓ 1 callersMethodload_pretrained_layers
we use a VGG-16 pretrained on the ImageNet task as the base network. There's one available in PyTorch, see https://pytorch.org/docs/s
code/chapter03_object_detection_introduction/tiny_detector_demo/model.py:80
↓ 1 callersFunctionmain
()
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/pytorch-vgg-cifar10/main.py:63
↓ 1 callersFunctionmain
Training.
code/chapter03_object_detection_introduction/tiny_detector_demo/train.py:29
↓ 1 callersFunctionmake_model
构建模型 params: src_vocab: tgt_vocab: N: 编码器和解码器堆叠基础模块的个数 d_model: 模型中embedding的size,默认512 d_ff: FeedFor
code/chapter06_transformer/6.2_recognition_by_transformer/transformer.py:264
↓ 1 callersFunctionmake_model
构建模型 params: src_vocab: tgt_vocab: N: 编码器和解码器堆叠基础模块的个数 d_model: 模型中embedding的size,默认512 d_ff: FeedFor
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/transformer.py:281
↓ 1 callersFunctionmake_ocr_model
构建模型 params: tgt_vocab: 输出的词典大小(82) N: 编码器和解码器堆叠基础模块的个数 d_model: 模型中embedding的size,默认512 d_ff: FeedForward La
code/chapter06_transformer/6.2_recognition_by_transformer/ocr_by_transformer.py:182
↓ 1 callersFunctionmake_ocr_model
构建模型 params: tgt_vocab: 输出的词典大小(82) N: 编码器和解码器堆叠基础模块的个数 d_model: 模型中embedding的size,默认512 d_ff: FeedForw
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/ocr_by_transformer.py:169
↓ 1 callersMethodmake_std_mask
Create a mask to hide padding and future words. padd 和 future words 均在mask中用0表示
code/chapter06_transformer/6.2_recognition_by_transformer/ocr_by_transformer.py:130
↓ 1 callersMethodmake_std_mask
Create a mask to hide padding and future words. padd 和 future words 均在mask中用0表示
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/ocr_by_transformer.py:117
↓ 1 callersMethodmake_std_mask
Create a mask to hide padding and future words. padd 和 future words 均在mask中用0表示
code/chapter06_transformer/6.1_hello_transformer/first_train_demo.py:38
↓ 1 callersFunctionphotometric_distort
Distort brightness, contrast, saturation, and hue, each with a 50% chance, in random order. :param image: image, a PIL Image :return: di
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:537
↓ 1 callersFunctionrandom_crop
Performs a random crop in the manner stated in the paper. Helps to learn to detect larger and partial objects. Note that some objects may be
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:404
↓ 1 callersMethodrate
Implement `lrate` above
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/train_utils.py:25
↓ 1 callersFunctionread_gas_image
(data)
code/chapter06_transformer/6.2_recognition_by_transformer(online_dataset)/analysis_recognition_dataset.py:16
↓ 1 callersMethodreset
(self)
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/pytorch-vgg-cifar10/main.py:269
↓ 1 callersMethodreset
(self)
code/chapter03_object_detection_introduction/tiny_detector_demo/utils.py:677
↓ 1 callersFunctionrle_decode
mask_rle: run-length as string formated (start length) shape: (height,width) of array to return Returns numpy array, 1 - mask, 0 - backg
code/chapter04_segmentation_introduction/building_identification_baseline/dataset.py:23
↓ 1 callersFunctionsave_checkpoint
Save the training model
code/chapter02_image_classification_introduction/2.2_introduction_of_image_classification/classical_cnn_models/pytorch-vgg-cifar10/main.py:258
next →1–100 of 274, ranked by callers