SYMBOL INDEX (3150 symbols across 440 files) FILE: data_set/split_data.py function mk_file (line 6) | def mk_file(file_path: str): function main (line 13) | def main(): FILE: deploying_service/deploying_pytorch/convert_onnx_cls/main.py function to_numpy (line 13) | def to_numpy(tensor): function main (line 17) | def main(save_path=None): FILE: deploying_service/deploying_pytorch/convert_onnx_cls/model.py class BasicBlock (line 5) | class BasicBlock(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 19) | def forward(self, x): class Bottleneck (line 37) | class Bottleneck(nn.Module): method __init__ (line 40) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 56) | def forward(self, x): class ResNet (line 78) | class ResNet(nn.Module): method __init__ (line 80) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 102) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 118) | def forward(self, x): function resnet34 (line 137) | def resnet34(num_classes=1000, include_top=True): function resnet101 (line 141) | def resnet101(num_classes=1000, include_top=True): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_resnet34/compare_fps.py function normalize (line 10) | def normalize(image: np.ndarray) -> np.ndarray: function onnx_inference (line 23) | def onnx_inference(onnx_path: str, image: np.ndarray, num_images: int = ... function ir_inference (line 43) | def ir_inference(ir_path: str, image: np.ndarray, num_images: int = 20): function pytorch_inference (line 67) | def pytorch_inference(image: np.ndarray, num_images: int = 20): function plot_fps (line 88) | def plot_fps(v: dict): function main (line 103) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_resnet34/compare_onnx_and_ir.py function normalize (line 6) | def normalize(image: np.ndarray) -> np.ndarray: function onnx_inference (line 19) | def onnx_inference(onnx_path: str, image: np.ndarray): function ir_inference (line 29) | def ir_inference(ir_path: str, image: np.ndarray): function main (line 44) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_resnet34/convert_pytorch2onnx.py function to_numpy (line 11) | def to_numpy(tensor): function main (line 15) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_resnet34/model.py function _make_divisible (line 9) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNActivation (line 25) | class ConvBNActivation(nn.Sequential): method __init__ (line 26) | def __init__(self, class SqueezeExcitation (line 50) | class SqueezeExcitation(nn.Module): method __init__ (line 51) | def __init__(self, input_c: int, squeeze_factor: int = 4): method forward (line 57) | def forward(self, x: Tensor) -> Tensor: class InvertedResidualConfig (line 66) | class InvertedResidualConfig: method __init__ (line 67) | def __init__(self, method adjust_channels (line 85) | def adjust_channels(channels: int, width_multi: float): class InvertedResidual (line 89) | class InvertedResidual(nn.Module): method __init__ (line 90) | def __init__(self, method forward (line 134) | def forward(self, x: Tensor) -> Tensor: class MobileNetV3 (line 142) | class MobileNetV3(nn.Module): method __init__ (line 143) | def __init__(self, method _forward_impl (line 205) | def _forward_impl(self, x: Tensor) -> Tensor: method forward (line 213) | def forward(self, x: Tensor) -> Tensor: function mobilenet_v3_large (line 217) | def mobilenet_v3_large(num_classes: int = 1000, function mobilenet_v3_small (line 263) | def mobilenet_v3_small(num_classes: int = 1000, FILE: deploying_service/deploying_pytorch/convert_openvino/convert_resnet34/quantization_int8.py function main (line 9) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_resnet34/utils.py function read_split_data (line 11) | def read_split_data(root: str, val_rate: float = 0.2): class Accuracy (line 60) | class Accuracy(Metric): method __init__ (line 62) | def __init__(self, top_k=1): method value (line 69) | def value(self): method avg_value (line 74) | def avg_value(self): method update (line 78) | def update(self, output, target): method reset (line 93) | def reset(self): method get_attributes (line 97) | def get_attributes(self): class MyDataLoader (line 107) | class MyDataLoader(DataLoader): method __init__ (line 108) | def __init__(self, cfg, images_path: list, images_label: list, img_w: ... method __len__ (line 119) | def __len__(self): method __getitem__ (line 122) | def __getitem__(self, index): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/compare_fps.py function normalize (line 9) | def normalize(image: np.ndarray) -> np.ndarray: function onnx_inference (line 18) | def onnx_inference(onnx_path: str, image: np.ndarray, num_images: int = ... function ir_inference (line 38) | def ir_inference(ir_path: str, image: np.ndarray, num_images: int = 20): function pytorch_inference (line 62) | def pytorch_inference(image: np.ndarray, num_images: int = 20): function plot_fps (line 83) | def plot_fps(v: dict): function main (line 98) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/compare_onnx_and_ir.py function normalize (line 6) | def normalize(image: np.ndarray) -> np.ndarray: function onnx_inference (line 15) | def onnx_inference(onnx_path: str, image: np.ndarray): function ir_inference (line 25) | def ir_inference(ir_path: str, image: np.ndarray): function main (line 40) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/draw_box_utils.py function draw_text (line 34) | def draw_text(draw, function draw_masks (line 78) | def draw_masks(image, masks, colors, thresh: float = 0.7, alpha: float =... function draw_objs (line 92) | def draw_objs(image: Image, FILE: deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/evaluation.py function main (line 7) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/predict.py function main (line 11) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/quantization_int8.py function main (line 11) | def main(): FILE: deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/utils.py function box_iou (line 27) | def box_iou(box1, box2): function xywh2xyxy (line 52) | def xywh2xyxy(x): function non_max_suppression (line 62) | def non_max_suppression(prediction, conf_thres=0.25, iou_thres=0.45, cla... class MAPMetric (line 156) | class MAPMetric(Metric): method __init__ (line 157) | def __init__(self, map_value="map", conf_thres=0.001, iou_thres=0.6): method value (line 176) | def value(self): method avg_value (line 184) | def avg_value(self): method update (line 191) | def update(self, output, target): method reset (line 239) | def reset(self): method get_attributes (line 245) | def get_attributes(self): function _coco_remove_images_without_annotations (line 254) | def _coco_remove_images_without_annotations(dataset, ids): function scale_coords (line 287) | def scale_coords(img1_shape, coords, img0_shape, ratio_pad=None): function clip_coords (line 304) | def clip_coords(boxes, shape): function letterbox (line 316) | def letterbox(im, new_shape=(640, 640), color=(114, 114, 114), auto=True... class MyDataLoader (line 349) | class MyDataLoader(DataLoader): method __init__ (line 357) | def __init__(self, root, dataset="train", size=(640, 640)): method parse_targets (line 382) | def parse_targets(self, method __getitem__ (line 433) | def __getitem__(self, index): method __len__ (line 470) | def __len__(self): method collate_fn (line 474) | def collate_fn(x): class EvalCOCOMetric (line 478) | class EvalCOCOMetric: method __init__ (line 479) | def __init__(self, method prepare_for_coco_detection (line 492) | def prepare_for_coco_detection(self, ann, output): method update (line 527) | def update(self, targets, outputs): method evaluate (line 533) | def evaluate(self): FILE: deploying_service/deploying_pytorch/convert_tensorrt/convert_resnet34/compare_onnx_and_trt.py function normalize (line 8) | def normalize(image: np.ndarray) -> np.ndarray: function onnx_inference (line 21) | def onnx_inference(onnx_path: str, image: np.ndarray): function trt_inference (line 31) | def trt_inference(trt_path: str, image: np.ndarray): function main (line 70) | def main(): FILE: deploying_service/deploying_pytorch/convert_tensorrt/convert_resnet34/convert_pytorch2onnx.py function to_numpy (line 11) | def to_numpy(tensor): function main (line 15) | def main(): FILE: deploying_service/deploying_pytorch/convert_tensorrt/convert_resnet34/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: deploying_service/deploying_pytorch/convert_tensorrt/convert_resnet34/quantization.py function export_onnx (line 26) | def export_onnx(model, onnx_filename, onnx_bs): function collect_stats (line 44) | def collect_stats(model, data_loader, num_batches): function compute_amax (line 71) | def compute_amax(model, **kwargs): function main (line 84) | def main(args): FILE: deploying_service/deploying_pytorch/convert_tensorrt/convert_resnet34/utils.py function read_split_data (line 11) | def read_split_data(root: str, val_rate: float = 0.2): function write_pickle (line 59) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 64) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 70) | def train_one_epoch(model, optimizer, data_loader, epoch): function evaluate (line 106) | def evaluate(model, data_loader, epoch): FILE: deploying_service/deploying_pytorch/pytorch_flask_service/main.py function transform_image (line 34) | def transform_image(image_bytes): function get_prediction (line 47) | def get_prediction(image_bytes): function predict (line 65) | def predict(): function root (line 73) | def root(): FILE: deploying_service/deploying_pytorch/pytorch_flask_service/model.py function _make_divisible (line 5) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNReLU (line 21) | class ConvBNReLU(nn.Sequential): method __init__ (line 22) | def __init__(self, in_channel, out_channel, kernel_size=3, stride=1, g... class InvertedResidual (line 31) | class InvertedResidual(nn.Module): method __init__ (line 32) | def __init__(self, in_channel, out_channel, stride, expand_ratio): method forward (line 51) | def forward(self, x): class MobileNetV2 (line 58) | class MobileNetV2(nn.Module): method __init__ (line 59) | def __init__(self, num_classes=1000, alpha=1.0, round_nearest=8): method forward (line 111) | def forward(self, x): FILE: deploying_service/pruning_model_pytorch/main.py function validate_model (line 22) | def validate_model(model: torch.nn.Module): function count_sparsity (line 45) | def count_sparsity(model: torch.nn.Module, p=True): function main (line 60) | def main(): FILE: deploying_service/pruning_model_pytorch/model.py class BasicBlock (line 5) | class BasicBlock(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 19) | def forward(self, x): class Bottleneck (line 37) | class Bottleneck(nn.Module): method __init__ (line 40) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 56) | def forward(self, x): class ResNet (line 78) | class ResNet(nn.Module): method __init__ (line 80) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 102) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 118) | def forward(self, x): function resnet34 (line 137) | def resnet34(num_classes=1000, include_top=True): function resnet101 (line 141) | def resnet101(num_classes=1000, include_top=True): FILE: others_project/draw_dilated_conv/main.py function dilated_conv_one_pixel (line 6) | def dilated_conv_one_pixel(center: (int, int), function dilated_conv_all_map (line 30) | def dilated_conv_all_map(dilated_map: np.ndarray, function plot_map (line 50) | def plot_map(matrix: np.ndarray): function main (line 79) | def main(): FILE: others_project/kmeans_anchors/main.py function anchor_fitness (line 10) | def anchor_fitness(k: np.ndarray, wh: np.ndarray, thr: float): # mutati... function main (line 20) | def main(img_size=512, n=9, thr=0.25, gen=1000): FILE: others_project/kmeans_anchors/plot_kmeans.py function plot_clusters (line 8) | def plot_clusters(data, cls, clusters, title=""): function distances (line 22) | def distances(data, clusters): function k_means (line 29) | def k_means(data, k, dist=np.mean): function main (line 65) | def main(): FILE: others_project/kmeans_anchors/read_voc.py class VOCDataSet (line 6) | class VOCDataSet(object): method __init__ (line 7) | def __init__(self, voc_root, year="2012", txt_name: str = "train.txt"): method __len__ (line 25) | def __len__(self): method parse_xml_to_dict (line 28) | def parse_xml_to_dict(self, xml): method get_info (line 52) | def get_info(self): FILE: others_project/kmeans_anchors/yolo_kmeans.py function wh_iou (line 4) | def wh_iou(wh1, wh2): function k_means (line 12) | def k_means(boxes, k, dist=np.median): FILE: others_project/openvinotest/openvino_cls_test/float32vsint8.py function check_path_exist (line 12) | def check_path_exist(path): function to_numpy (line 16) | def to_numpy(tensor): function openvino_model_speed (line 20) | def openvino_model_speed(data_loader, val_num, xml_path, bin_path): function main (line 74) | def main(): FILE: others_project/openvinotest/openvino_cls_test/main.py function main (line 11) | def main(): FILE: others_project/openvinotest/openvino_cls_test/model.py class BasicBlock (line 5) | class BasicBlock(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 19) | def forward(self, x): class Bottleneck (line 37) | class Bottleneck(nn.Module): method __init__ (line 40) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 56) | def forward(self, x): class ResNet (line 78) | class ResNet(nn.Module): method __init__ (line 80) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 102) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 118) | def forward(self, x): function resnet34 (line 137) | def resnet34(num_classes=1000, include_top=True): function resnet101 (line 141) | def resnet101(num_classes=1000, include_top=True): FILE: others_project/openvinotest/openvino_cls_test/speed_test.py function check_path_exist (line 15) | def check_path_exist(path): function to_numpy (line 19) | def to_numpy(tensor): function pytorch_model_speed (line 23) | def pytorch_model_speed(data_loader, val_num): function onnx_model_speed (line 51) | def onnx_model_speed(data_loader, val_num): function openvino_model_speed (line 80) | def openvino_model_speed(data_loader, val_num): function main (line 134) | def main(): FILE: others_project/readPbFile/using_function.py function filter_low_thresh (line 37) | def filter_low_thresh(boxes, scores, classes, category_index, thresh, bo... function draw_text (line 54) | def draw_text(draw, box_to_display_str_map, box, left, right, top, botto... function draw_box (line 84) | def draw_box(image, boxes, classes, scores, category_index, thresh=0.5, ... function read_pbtxt (line 105) | def read_pbtxt(filename): function get_inAndout_tensor (line 117) | def get_inAndout_tensor(): function convert_type (line 131) | def convert_type(output_dict): function read_image (line 139) | def read_image(image_path): FILE: others_project/textcnnKeras/dataGenerator.py function content2idList (line 6) | def content2idList(content, word2id_dict): function generatorInfo (line 19) | def generatorInfo(batch_size, seq_length, num_classes, file_name): FILE: others_project/textcnnKeras/main.py function lrSchedule (line 28) | def lrSchedule(epoch): FILE: others_project/textcnnKeras/models.py function text_cnn (line 4) | def text_cnn(seq_length, vocab_size, embedding_dim, num_cla, kernelNum): function text_cnn_V2 (line 38) | def text_cnn_V2(seq_length, vocab_size, embedding_dim, num_cla, kernelNu... function simpleNet (line 71) | def simpleNet(seq_length, vocab_size, embedding_dim, num_cla, kernelNum=... FILE: others_project/trans_widerface_to_xml/create_xml.py class XMLGenerator (line 6) | class XMLGenerator(object): method __init__ (line 7) | def __init__(self, xml_name: str): method create_append_node (line 11) | def create_append_node(self, node_name, root_node=None): method create_text_node (line 20) | def create_text_node(self, node_name, node_value, root_node): method create_object_node (line 30) | def create_object_node(self, info_dict: dict = None, root_node: str = ... method save_xml (line 44) | def save_xml(self): function create_pascal_voc_xml (line 50) | def create_pascal_voc_xml(filename: str = None, function create_xml_test (line 97) | def create_xml_test(): FILE: others_project/trans_widerface_to_xml/main.py function create_xml (line 8) | def create_xml(labels: list, img_root: str, img_path: str, save_root: st... function parse_wider_txt (line 64) | def parse_wider_txt(data_root: str, split: str, save_root: str): FILE: pytorch_classification/ConfusionMatrix/main.py class ConfusionMatrix (line 14) | class ConfusionMatrix(object): method __init__ (line 20) | def __init__(self, num_classes: int, labels: list): method update (line 25) | def update(self, preds, labels): method summary (line 29) | def summary(self): method plot (line 51) | def plot(self): FILE: pytorch_classification/ConfusionMatrix/model.py function _make_divisible (line 5) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNReLU (line 21) | class ConvBNReLU(nn.Sequential): method __init__ (line 22) | def __init__(self, in_channel, out_channel, kernel_size=3, stride=1, g... class InvertedResidual (line 31) | class InvertedResidual(nn.Module): method __init__ (line 32) | def __init__(self, in_channel, out_channel, stride, expand_ratio): method forward (line 51) | def forward(self, x): class MobileNetV2 (line 58) | class MobileNetV2(nn.Module): method __init__ (line 59) | def __init__(self, num_classes=1000, alpha=1.0, round_nearest=8): method forward (line 111) | def forward(self, x): FILE: pytorch_classification/ConvNeXt/model.py function drop_path (line 11) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 31) | class DropPath(nn.Module): method __init__ (line 34) | def __init__(self, drop_prob=None): method forward (line 38) | def forward(self, x): class LayerNorm (line 42) | class LayerNorm(nn.Module): method __init__ (line 49) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 59) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Block (line 71) | class Block(nn.Module): method __init__ (line 82) | def __init__(self, dim, drop_rate=0., layer_scale_init_value=1e-6): method forward (line 93) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNeXt (line 109) | class ConvNeXt(nn.Module): method __init__ (line 122) | def __init__(self, in_chans: int = 3, num_classes: int = 1000, depths:... method _init_weights (line 155) | def _init_weights(self, m): method forward_features (line 160) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward (line 167) | def forward(self, x: torch.Tensor) -> torch.Tensor: function convnext_tiny (line 173) | def convnext_tiny(num_classes: int): function convnext_small (line 181) | def convnext_small(num_classes: int): function convnext_base (line 189) | def convnext_base(num_classes: int): function convnext_large (line 198) | def convnext_large(num_classes: int): function convnext_xlarge (line 207) | def convnext_xlarge(num_classes: int): FILE: pytorch_classification/ConvNeXt/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/ConvNeXt/predict.py function main (line 12) | def main(): FILE: pytorch_classification/ConvNeXt/train.py function main (line 14) | def main(args): FILE: pytorch_classification/ConvNeXt/utils.py function read_split_data (line 14) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 83) | def plot_data_loader_image(data_loader): function write_pickle (line 108) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 113) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 119) | def train_one_epoch(model, optimizer, data_loader, device, epoch, lr_sch... function evaluate (line 160) | def evaluate(model, data_loader, device, epoch): function create_lr_scheduler (line 190) | def create_lr_scheduler(optimizer, function get_params_groups (line 219) | def get_params_groups(model: torch.nn.Module, weight_decay: float = 1e-5): FILE: pytorch_classification/MobileViT/model.py function make_divisible (line 17) | def make_divisible( class ConvLayer (line 41) | class ConvLayer(nn.Module): method __init__ (line 64) | def __init__( method forward (line 115) | def forward(self, x: Tensor) -> Tensor: class InvertedResidual (line 119) | class InvertedResidual(nn.Module): method __init__ (line 139) | def __init__( method forward (line 194) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: class MobileViTBlock (line 201) | class MobileViTBlock(nn.Module): method __init__ (line 222) | def __init__( method unfolding (line 306) | def unfolding(self, x: Tensor) -> Tuple[Tensor, Dict]: method folding (line 347) | def folding(self, x: Tensor, info_dict: Dict) -> Tensor: method forward (line 378) | def forward(self, x: Tensor) -> Tensor: class MobileViT (line 399) | class MobileViT(nn.Module): method __init__ (line 403) | def __init__(self, model_cfg: Dict, num_classes: int = 1000): method _make_layer (line 439) | def _make_layer(self, input_channel, cfg: Dict) -> Tuple[nn.Sequential... method _make_mobilenet_layer (line 447) | def _make_mobilenet_layer(input_channel: int, cfg: Dict) -> Tuple[nn.S... method _make_mit_layer (line 468) | def _make_mit_layer(input_channel: int, cfg: Dict) -> [nn.Sequential, ... method init_parameters (line 509) | def init_parameters(m): method forward (line 528) | def forward(self, x: Tensor) -> Tensor: function mobile_vit_xx_small (line 541) | def mobile_vit_xx_small(num_classes: int = 1000): function mobile_vit_x_small (line 549) | def mobile_vit_x_small(num_classes: int = 1000): function mobile_vit_small (line 557) | def mobile_vit_small(num_classes: int = 1000): FILE: pytorch_classification/MobileViT/model_config.py function get_config (line 1) | def get_config(mode: str = "xxs") -> dict: FILE: pytorch_classification/MobileViT/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/MobileViT/predict.py function main (line 12) | def main(): FILE: pytorch_classification/MobileViT/train.py function main (line 14) | def main(args): FILE: pytorch_classification/MobileViT/transformer.py class MultiHeadAttention (line 8) | class MultiHeadAttention(nn.Module): method __init__ (line 26) | def __init__( method forward (line 54) | def forward(self, x_q: Tensor) -> Tensor: class TransformerEncoder (line 90) | class TransformerEncoder(nn.Module): method __init__ (line 107) | def __init__( method forward (line 147) | def forward(self, x: Tensor) -> Tensor: FILE: pytorch_classification/MobileViT/unfold_test.py function official (line 14) | def official(x: torch.Tensor): function my_self (line 29) | def my_self(x: torch.Tensor): FILE: pytorch_classification/MobileViT/utils.py function read_split_data (line 13) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 82) | def plot_data_loader_image(data_loader): function write_pickle (line 107) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 112) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 118) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 154) | def evaluate(model, data_loader, device, epoch): FILE: pytorch_classification/Test10_regnet/model.py function _make_divisible (line 9) | def _make_divisible(ch, divisor=8, min_ch=None): function _mcfg (line 25) | def _mcfg(**kwargs): function generate_width_depth (line 59) | def generate_width_depth(wa, w0, wm, depth, q=8): function adjust_width_groups_comp (line 73) | def adjust_width_groups_comp(widths: list, groups: list): class ConvBNAct (line 81) | class ConvBNAct(nn.Module): method __init__ (line 82) | def __init__(self, method forward (line 103) | def forward(self, x: Tensor) -> Tensor: class RegHead (line 110) | class RegHead(nn.Module): method __init__ (line 111) | def __init__(self, method forward (line 126) | def forward(self, x: Tensor) -> Tensor: class SqueezeExcitation (line 134) | class SqueezeExcitation(nn.Module): method __init__ (line 135) | def __init__(self, input_c: int, expand_c: int, se_ratio: float = 0.25): method forward (line 143) | def forward(self, x: Tensor) -> Tensor: class Bottleneck (line 152) | class Bottleneck(nn.Module): method __init__ (line 153) | def __init__(self, method zero_init_last_bn (line 188) | def zero_init_last_bn(self): method forward (line 191) | def forward(self, x: Tensor) -> Tensor: class RegStage (line 208) | class RegStage(nn.Module): method __init__ (line 209) | def __init__(self, method forward (line 228) | def forward(self, x: Tensor) -> Tensor: class RegNet (line 234) | class RegNet(nn.Module): method __init__ (line 242) | def __init__(self, method forward (line 280) | def forward(self, x: Tensor) -> Tensor: method _build_stage_info (line 286) | def _build_stage_info(cfg: dict): function create_regnet (line 304) | def create_regnet(model_name="RegNetX_200MF", num_classes=1000): FILE: pytorch_classification/Test10_regnet/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/Test10_regnet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test10_regnet/pretrain_weights.py function main (line 32) | def main(): FILE: pytorch_classification/Test10_regnet/train.py function main (line 16) | def main(args): FILE: pytorch_classification/Test10_regnet/utils.py function read_split_data (line 13) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 82) | def plot_data_loader_image(data_loader): function write_pickle (line 107) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 112) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 118) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 148) | def evaluate(model, data_loader, device): FILE: pytorch_classification/Test11_efficientnetV2/model.py function drop_path (line 10) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 29) | class DropPath(nn.Module): method __init__ (line 34) | def __init__(self, drop_prob=None): method forward (line 38) | def forward(self, x): class ConvBNAct (line 42) | class ConvBNAct(nn.Module): method __init__ (line 43) | def __init__(self, method forward (line 70) | def forward(self, x): class SqueezeExcite (line 78) | class SqueezeExcite(nn.Module): method __init__ (line 79) | def __init__(self, method forward (line 90) | def forward(self, x: Tensor) -> Tensor: class MBConv (line 99) | class MBConv(nn.Module): method __init__ (line 100) | def __init__(self, method forward (line 153) | def forward(self, x: Tensor) -> Tensor: class FusedMBConv (line 167) | class FusedMBConv(nn.Module): method __init__ (line 168) | def __init__(self, method forward (line 221) | def forward(self, x: Tensor) -> Tensor: class EfficientNetV2 (line 237) | class EfficientNetV2(nn.Module): method __init__ (line 238) | def __init__(self, method forward (line 307) | def forward(self, x: Tensor) -> Tensor: function efficientnetv2_s (line 315) | def efficientnetv2_s(num_classes: int = 1000): function efficientnetv2_m (line 336) | def efficientnetv2_m(num_classes: int = 1000): function efficientnetv2_l (line 358) | def efficientnetv2_l(num_classes: int = 1000): FILE: pytorch_classification/Test11_efficientnetV2/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/Test11_efficientnetV2/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test11_efficientnetV2/train.py function main (line 16) | def main(args): FILE: pytorch_classification/Test11_efficientnetV2/trans_effv2_weights.py function main (line 6) | def main(model_name: str = "efficientnetv2-s", FILE: pytorch_classification/Test11_efficientnetV2/utils.py function read_split_data (line 13) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 82) | def plot_data_loader_image(data_loader): function write_pickle (line 107) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 112) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 118) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 154) | def evaluate(model, data_loader, device, epoch): FILE: pytorch_classification/Test1_official_demo/model.py class LeNet (line 5) | class LeNet(nn.Module): method __init__ (line 6) | def __init__(self): method forward (line 16) | def forward(self, x): FILE: pytorch_classification/Test1_official_demo/predict.py function main (line 8) | def main(): FILE: pytorch_classification/Test1_official_demo/train.py function main (line 9) | def main(): FILE: pytorch_classification/Test2_alexnet/model.py class AlexNet (line 5) | class AlexNet(nn.Module): method __init__ (line 6) | def __init__(self, num_classes=1000, init_weights=False): method forward (line 35) | def forward(self, x): method _initialize_weights (line 41) | def _initialize_weights(self): FILE: pytorch_classification/Test2_alexnet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test2_alexnet/train.py function main (line 16) | def main(): FILE: pytorch_classification/Test3_vggnet/model.py class VGG (line 13) | class VGG(nn.Module): method __init__ (line 14) | def __init__(self, features, num_classes=1000, init_weights=False): method forward (line 29) | def forward(self, x): method _initialize_weights (line 38) | def _initialize_weights(self): function make_features (line 51) | def make_features(cfg: list): function vgg (line 72) | def vgg(model_name="vgg16", **kwargs): FILE: pytorch_classification/Test3_vggnet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test3_vggnet/train.py function main (line 14) | def main(): FILE: pytorch_classification/Test4_googlenet/model.py class GoogLeNet (line 6) | class GoogLeNet(nn.Module): method __init__ (line 7) | def __init__(self, num_classes=1000, aux_logits=True, init_weights=Fal... method forward (line 42) | def forward(self, x): method _initialize_weights (line 95) | def _initialize_weights(self): class Inception (line 106) | class Inception(nn.Module): method __init__ (line 107) | def __init__(self, in_channels, ch1x1, ch3x3red, ch3x3, ch5x5red, ch5x... method forward (line 129) | def forward(self, x): class InceptionAux (line 139) | class InceptionAux(nn.Module): method __init__ (line 140) | def __init__(self, in_channels, num_classes): method forward (line 148) | def forward(self, x): class BasicConv2d (line 165) | class BasicConv2d(nn.Module): method __init__ (line 166) | def __init__(self, in_channels, out_channels, **kwargs): method forward (line 171) | def forward(self, x): FILE: pytorch_classification/Test4_googlenet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test4_googlenet/train.py function main (line 14) | def main(): FILE: pytorch_classification/Test5_resnet/batch_predict.py function main (line 11) | def main(): FILE: pytorch_classification/Test5_resnet/load_weights.py function main (line 7) | def main(): FILE: pytorch_classification/Test5_resnet/model.py class BasicBlock (line 5) | class BasicBlock(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None,... method forward (line 19) | def forward(self, x): class Bottleneck (line 37) | class Bottleneck(nn.Module): method __init__ (line 46) | def __init__(self, in_channel, out_channel, stride=1, downsample=None, method forward (line 66) | def forward(self, x): class ResNet (line 88) | class ResNet(nn.Module): method __init__ (line 90) | def __init__(self, method _make_layer (line 121) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 145) | def forward(self, x): function resnet34 (line 164) | def resnet34(num_classes=1000, include_top=True): function resnet50 (line 169) | def resnet50(num_classes=1000, include_top=True): function resnet101 (line 174) | def resnet101(num_classes=1000, include_top=True): function resnext50_32x4d (line 179) | def resnext50_32x4d(num_classes=1000, include_top=True): function resnext101_32x8d (line 190) | def resnext101_32x8d(num_classes=1000, include_top=True): FILE: pytorch_classification/Test5_resnet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test5_resnet/train.py function main (line 14) | def main(): FILE: pytorch_classification/Test6_mobilenet/model_v2.py function _make_divisible (line 5) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNReLU (line 21) | class ConvBNReLU(nn.Sequential): method __init__ (line 22) | def __init__(self, in_channel, out_channel, kernel_size=3, stride=1, g... class InvertedResidual (line 31) | class InvertedResidual(nn.Module): method __init__ (line 32) | def __init__(self, in_channel, out_channel, stride, expand_ratio): method forward (line 51) | def forward(self, x): class MobileNetV2 (line 58) | class MobileNetV2(nn.Module): method __init__ (line 59) | def __init__(self, num_classes=1000, alpha=1.0, round_nearest=8): method forward (line 111) | def forward(self, x): FILE: pytorch_classification/Test6_mobilenet/model_v3.py function _make_divisible (line 9) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNActivation (line 25) | class ConvBNActivation(nn.Sequential): method __init__ (line 26) | def __init__(self, class SqueezeExcitation (line 50) | class SqueezeExcitation(nn.Module): method __init__ (line 51) | def __init__(self, input_c: int, squeeze_factor: int = 4): method forward (line 57) | def forward(self, x: Tensor) -> Tensor: class InvertedResidualConfig (line 66) | class InvertedResidualConfig: method __init__ (line 67) | def __init__(self, method adjust_channels (line 85) | def adjust_channels(channels: int, width_multi: float): class InvertedResidual (line 89) | class InvertedResidual(nn.Module): method __init__ (line 90) | def __init__(self, method forward (line 134) | def forward(self, x: Tensor) -> Tensor: class MobileNetV3 (line 142) | class MobileNetV3(nn.Module): method __init__ (line 143) | def __init__(self, method _forward_impl (line 205) | def _forward_impl(self, x: Tensor) -> Tensor: method forward (line 213) | def forward(self, x: Tensor) -> Tensor: function mobilenet_v3_large (line 217) | def mobilenet_v3_large(num_classes: int = 1000, function mobilenet_v3_small (line 263) | def mobilenet_v3_small(num_classes: int = 1000, FILE: pytorch_classification/Test6_mobilenet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test6_mobilenet/train.py function main (line 14) | def main(): FILE: pytorch_classification/Test7_shufflenet/model.py function channel_shuffle (line 8) | def channel_shuffle(x: Tensor, groups: int) -> Tensor: class InvertedResidual (line 25) | class InvertedResidual(nn.Module): method __init__ (line 26) | def __init__(self, input_c: int, output_c: int, stride: int): method depthwise_conv (line 63) | def depthwise_conv(input_c: int, method forward (line 72) | def forward(self, x: Tensor) -> Tensor: class ShuffleNetV2 (line 84) | class ShuffleNetV2(nn.Module): method __init__ (line 85) | def __init__(self, method _forward_impl (line 134) | def _forward_impl(self, x: Tensor) -> Tensor: method forward (line 146) | def forward(self, x: Tensor) -> Tensor: function shufflenet_v2_x0_5 (line 150) | def shufflenet_v2_x0_5(num_classes=1000): function shufflenet_v2_x1_0 (line 167) | def shufflenet_v2_x1_0(num_classes=1000): function shufflenet_v2_x1_5 (line 184) | def shufflenet_v2_x1_5(num_classes=1000): function shufflenet_v2_x2_0 (line 201) | def shufflenet_v2_x2_0(num_classes=1000): FILE: pytorch_classification/Test7_shufflenet/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/Test7_shufflenet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test7_shufflenet/train.py function main (line 16) | def main(args): FILE: pytorch_classification/Test7_shufflenet/utils.py function read_split_data (line 13) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 82) | def plot_data_loader_image(data_loader): function write_pickle (line 107) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 112) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 118) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 148) | def evaluate(model, data_loader, device): FILE: pytorch_classification/Test8_densenet/model.py class _DenseLayer (line 12) | class _DenseLayer(nn.Module): method __init__ (line 13) | def __init__(self, method bn_function (line 39) | def bn_function(self, inputs: List[Tensor]) -> Tensor: method any_requires_grad (line 45) | def any_requires_grad(inputs: List[Tensor]) -> bool: method call_checkpoint_bottleneck (line 53) | def call_checkpoint_bottleneck(self, inputs: List[Tensor]) -> Tensor: method forward (line 59) | def forward(self, inputs: Tensor) -> Tensor: class _DenseBlock (line 82) | class _DenseBlock(nn.ModuleDict): method __init__ (line 85) | def __init__(self, method forward (line 101) | def forward(self, init_features: Tensor) -> Tensor: class _Transition (line 109) | class _Transition(nn.Sequential): method __init__ (line 110) | def __init__(self, class DenseNet (line 124) | class DenseNet(nn.Module): method __init__ (line 139) | def __init__(self, method forward (line 191) | def forward(self, x: Tensor) -> Tensor: function densenet121 (line 200) | def densenet121(**kwargs: Any) -> DenseNet: function densenet169 (line 209) | def densenet169(**kwargs: Any) -> DenseNet: function densenet201 (line 218) | def densenet201(**kwargs: Any) -> DenseNet: function densenet161 (line 227) | def densenet161(**kwargs: Any) -> DenseNet: function load_state_dict (line 236) | def load_state_dict(model: nn.Module, weights_path: str) -> None: FILE: pytorch_classification/Test8_densenet/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/Test8_densenet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test8_densenet/train.py function main (line 16) | def main(args): FILE: pytorch_classification/Test8_densenet/utils.py function read_split_data (line 13) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 82) | def plot_data_loader_image(data_loader): function write_pickle (line 107) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 112) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 118) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 148) | def evaluate(model, data_loader, device): FILE: pytorch_classification/Test9_efficientNet/model.py function _make_divisible (line 13) | def _make_divisible(ch, divisor=8, min_ch=None): function drop_path (line 29) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 48) | class DropPath(nn.Module): method __init__ (line 53) | def __init__(self, drop_prob=None): method forward (line 57) | def forward(self, x): class ConvBNActivation (line 61) | class ConvBNActivation(nn.Sequential): method __init__ (line 62) | def __init__(self, class SqueezeExcitation (line 87) | class SqueezeExcitation(nn.Module): method __init__ (line 88) | def __init__(self, method forward (line 99) | def forward(self, x: Tensor) -> Tensor: class InvertedResidualConfig (line 108) | class InvertedResidualConfig: method __init__ (line 110) | def __init__(self, method adjust_channels (line 130) | def adjust_channels(channels: int, width_coefficient: float): class InvertedResidual (line 134) | class InvertedResidual(nn.Module): method __init__ (line 135) | def __init__(self, method forward (line 186) | def forward(self, x: Tensor) -> Tensor: class EfficientNet (line 195) | class EfficientNet(nn.Module): method __init__ (line 196) | def __init__(self, method _forward_impl (line 293) | def _forward_impl(self, x: Tensor) -> Tensor: method forward (line 301) | def forward(self, x: Tensor) -> Tensor: function efficientnet_b0 (line 305) | def efficientnet_b0(num_classes=1000): function efficientnet_b1 (line 313) | def efficientnet_b1(num_classes=1000): function efficientnet_b2 (line 321) | def efficientnet_b2(num_classes=1000): function efficientnet_b3 (line 329) | def efficientnet_b3(num_classes=1000): function efficientnet_b4 (line 337) | def efficientnet_b4(num_classes=1000): function efficientnet_b5 (line 345) | def efficientnet_b5(num_classes=1000): function efficientnet_b6 (line 353) | def efficientnet_b6(num_classes=1000): function efficientnet_b7 (line 361) | def efficientnet_b7(num_classes=1000): FILE: pytorch_classification/Test9_efficientNet/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/Test9_efficientNet/predict.py function main (line 12) | def main(): FILE: pytorch_classification/Test9_efficientNet/train.py function main (line 16) | def main(args): FILE: pytorch_classification/Test9_efficientNet/trans_weights_to_pytorch.py function main (line 8) | def main(): FILE: pytorch_classification/Test9_efficientNet/utils.py function read_split_data (line 13) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 82) | def plot_data_loader_image(data_loader): function write_pickle (line 107) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 112) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 118) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 148) | def evaluate(model, data_loader, device): FILE: pytorch_classification/analyze_weights_featuremap/alexnet_model.py class AlexNet (line 5) | class AlexNet(nn.Module): method __init__ (line 6) | def __init__(self, num_classes=1000, init_weights=False): method forward (line 35) | def forward(self, x): method _initialize_weights (line 44) | def _initialize_weights(self): FILE: pytorch_classification/analyze_weights_featuremap/resnet_model.py class BasicBlock (line 5) | class BasicBlock(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 19) | def forward(self, x): class Bottleneck (line 37) | class Bottleneck(nn.Module): method __init__ (line 40) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 56) | def forward(self, x): class ResNet (line 78) | class ResNet(nn.Module): method __init__ (line 80) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 102) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 118) | def forward(self, x): function resnet34 (line 140) | def resnet34(num_classes=1000, include_top=True): function resnet101 (line 144) | def resnet101(num_classes=1000, include_top=True): FILE: pytorch_classification/custom_dataset/main.py function main (line 13) | def main(): FILE: pytorch_classification/custom_dataset/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/custom_dataset/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 74) | def plot_data_loader_image(data_loader): function write_pickle (line 99) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 104) | def read_pickle(file_name: str) -> list: FILE: pytorch_classification/grad_cam/main_cnn.py function main (line 11) | def main(): FILE: pytorch_classification/grad_cam/main_swin.py class ResizeTransform (line 12) | class ResizeTransform: method __init__ (line 13) | def __init__(self, im_h: int, im_w: int): method feature_size (line 18) | def feature_size(s): method __call__ (line 25) | def __call__(self, x): function main (line 39) | def main(): FILE: pytorch_classification/grad_cam/main_vit.py class ReshapeTransform (line 11) | class ReshapeTransform: method __init__ (line 12) | def __init__(self, model): method __call__ (line 18) | def __call__(self, x): function main (line 33) | def main(): FILE: pytorch_classification/grad_cam/swin_model.py function drop_path_f (line 17) | def drop_path_f(x, drop_prob: float = 0., training: bool = False): class DropPath (line 37) | class DropPath(nn.Module): method __init__ (line 40) | def __init__(self, drop_prob=None): method forward (line 44) | def forward(self, x): function window_partition (line 48) | def window_partition(x, window_size: int): function window_reverse (line 66) | def window_reverse(windows, window_size: int, H: int, W: int): class PatchEmbed (line 87) | class PatchEmbed(nn.Module): method __init__ (line 91) | def __init__(self, patch_size=4, in_c=3, embed_dim=96, norm_layer=None): method forward (line 100) | def forward(self, x): class PatchMerging (line 123) | class PatchMerging(nn.Module): method __init__ (line 131) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 137) | def forward(self, x, H, W): class Mlp (line 168) | class Mlp(nn.Module): method __init__ (line 171) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 182) | def forward(self, x): class WindowAttention (line 191) | class WindowAttention(nn.Module): method __init__ (line 204) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, attn_dr... method forward (line 239) | def forward(self, x, mask: Optional[torch.Tensor] = None): class SwinTransformerBlock (line 287) | class SwinTransformerBlock(nn.Module): method __init__ (line 304) | def __init__(self, dim, num_heads, window_size=7, shift_size=0, method forward (line 325) | def forward(self, x, attn_mask): class BasicLayer (line 379) | class BasicLayer(nn.Module): method __init__ (line 398) | def __init__(self, dim, depth, num_heads, window_size, method create_mask (line 429) | def create_mask(self, x, H, W): method forward (line 455) | def forward(self, x, H, W): class SwinTransformer (line 470) | class SwinTransformer(nn.Module): method __init__ (line 493) | def __init__(self, patch_size=4, in_chans=3, num_classes=1000, method _init_weights (line 543) | def _init_weights(self, m): method forward (line 552) | def forward(self, x): function swin_tiny_patch4_window7_224 (line 567) | def swin_tiny_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_small_patch4_window7_224 (line 581) | def swin_small_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_base_patch4_window7_224 (line 595) | def swin_base_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_base_patch4_window12_384 (line 609) | def swin_base_patch4_window12_384(num_classes: int = 1000, **kwargs): function swin_base_patch4_window7_224_in22k (line 623) | def swin_base_patch4_window7_224_in22k(num_classes: int = 21841, **kwargs): function swin_base_patch4_window12_384_in22k (line 637) | def swin_base_patch4_window12_384_in22k(num_classes: int = 21841, **kwar... function swin_large_patch4_window7_224_in22k (line 651) | def swin_large_patch4_window7_224_in22k(num_classes: int = 21841, **kwar... function swin_large_patch4_window12_384_in22k (line 665) | def swin_large_patch4_window12_384_in22k(num_classes: int = 21841, **kwa... FILE: pytorch_classification/grad_cam/utils.py class ActivationsAndGradients (line 5) | class ActivationsAndGradients: method __init__ (line 9) | def __init__(self, model, target_layers, reshape_transform): method save_activation (line 29) | def save_activation(self, module, input, output): method save_gradient (line 35) | def save_gradient(self, module, grad_input, grad_output): method __call__ (line 42) | def __call__(self, x): method release (line 47) | def release(self): class GradCAM (line 52) | class GradCAM: method __init__ (line 53) | def __init__(self, method get_cam_weights (line 72) | def get_cam_weights(grads): method get_loss (line 76) | def get_loss(output, target_category): method get_cam_image (line 82) | def get_cam_image(self, activations, grads): method get_target_width_height (line 90) | def get_target_width_height(input_tensor): method compute_cam_per_layer (line 94) | def compute_cam_per_layer(self, input_tensor): method aggregate_multi_layers (line 112) | def aggregate_multi_layers(self, cam_per_target_layer): method scale_cam_image (line 119) | def scale_cam_image(cam, target_size=None): method __call__ (line 131) | def __call__(self, input_tensor, target_category=None): method __del__ (line 163) | def __del__(self): method __enter__ (line 166) | def __enter__(self): method __exit__ (line 169) | def __exit__(self, exc_type, exc_value, exc_tb): function show_cam_on_image (line 178) | def show_cam_on_image(img: np.ndarray, function center_crop_img (line 206) | def center_crop_img(img: np.ndarray, size: int): FILE: pytorch_classification/grad_cam/vit_model.py function drop_path (line 12) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 31) | class DropPath(nn.Module): method __init__ (line 35) | def __init__(self, drop_prob=None): method forward (line 39) | def forward(self, x): class PatchEmbed (line 43) | class PatchEmbed(nn.Module): method __init__ (line 47) | def __init__(self, img_size=224, patch_size=16, in_c=3, embed_dim=768,... method forward (line 59) | def forward(self, x): class Attention (line 71) | class Attention(nn.Module): method __init__ (line 72) | def __init__(self, method forward (line 88) | def forward(self, x): class Mlp (line 114) | class Mlp(nn.Module): method __init__ (line 118) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 127) | def forward(self, x): class Block (line 136) | class Block(nn.Module): method __init__ (line 137) | def __init__(self, method forward (line 158) | def forward(self, x): class VisionTransformer (line 164) | class VisionTransformer(nn.Module): method __init__ (line 165) | def __init__(self, img_size=224, patch_size=16, in_c=3, num_classes=1000, method forward_features (line 240) | def forward_features(self, x): method forward (line 258) | def forward(self, x): function _init_vit_weights (line 272) | def _init_vit_weights(m): function vit_base_patch16_224 (line 290) | def vit_base_patch16_224(num_classes: int = 1000): function vit_base_patch16_224_in21k (line 307) | def vit_base_patch16_224_in21k(num_classes: int = 21843, has_logits: boo... function vit_base_patch32_224 (line 324) | def vit_base_patch32_224(num_classes: int = 1000): function vit_base_patch32_224_in21k (line 341) | def vit_base_patch32_224_in21k(num_classes: int = 21843, has_logits: boo... function vit_large_patch16_224 (line 358) | def vit_large_patch16_224(num_classes: int = 1000): function vit_large_patch16_224_in21k (line 375) | def vit_large_patch16_224_in21k(num_classes: int = 21843, has_logits: bo... function vit_large_patch32_224_in21k (line 392) | def vit_large_patch32_224_in21k(num_classes: int = 21843, has_logits: bo... function vit_huge_patch14_224_in21k (line 409) | def vit_huge_patch14_224_in21k(num_classes: int = 21843, has_logits: boo... FILE: pytorch_classification/mini_imagenet/model.py function channel_shuffle (line 8) | def channel_shuffle(x: Tensor, groups: int) -> Tensor: class InvertedResidual (line 25) | class InvertedResidual(nn.Module): method __init__ (line 26) | def __init__(self, input_c: int, output_c: int, stride: int): method depthwise_conv (line 63) | def depthwise_conv(input_c: int, method forward (line 72) | def forward(self, x: Tensor) -> Tensor: class ShuffleNetV2 (line 84) | class ShuffleNetV2(nn.Module): method __init__ (line 85) | def __init__(self, method _forward_impl (line 134) | def _forward_impl(self, x: Tensor) -> Tensor: method forward (line 146) | def forward(self, x: Tensor) -> Tensor: function shufflenet_v2_x1_0 (line 150) | def shufflenet_v2_x1_0(num_classes=1000): function shufflenet_v2_x0_5 (line 167) | def shufflenet_v2_x0_5(num_classes=1000): FILE: pytorch_classification/mini_imagenet/multi_train_utils/distributed_utils.py function init_distributed_mode (line 7) | def init_distributed_mode(args): function cleanup (line 31) | def cleanup(): function is_dist_avail_and_initialized (line 35) | def is_dist_avail_and_initialized(): function get_world_size (line 44) | def get_world_size(): function get_rank (line 50) | def get_rank(): function is_main_process (line 56) | def is_main_process(): function reduce_value (line 60) | def reduce_value(value, average=True): function warmup_lr_scheduler (line 73) | def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor): FILE: pytorch_classification/mini_imagenet/multi_train_utils/train_eval_utils.py function train_one_epoch (line 9) | def train_one_epoch(model, optimizer, data_loader, device, epoch, use_am... function evaluate (line 74) | def evaluate(model, data_loader, device): FILE: pytorch_classification/mini_imagenet/my_dataset.py class MyDataSet (line 9) | class MyDataSet(Dataset): method __init__ (line 12) | def __init__(self, method __len__ (line 33) | def __len__(self): method __getitem__ (line 36) | def __getitem__(self, item): method collate_fn (line 49) | def collate_fn(batch): FILE: pytorch_classification/mini_imagenet/restructure_csv.py function read_csv_classes (line 9) | def read_csv_classes(csv_dir: str, csv_name: str): function calculate_split_info (line 21) | def calculate_split_info(path: str, label_dict: dict, rate: float = 0.2): function main (line 85) | def main(): FILE: pytorch_classification/mini_imagenet/train_multi_gpu_using_launch.py function main (line 17) | def main(args): FILE: pytorch_classification/mini_imagenet/train_single_gpu.py function main (line 16) | def main(args): FILE: pytorch_classification/model_complexity/main.py function main (line 7) | def main(): FILE: pytorch_classification/model_complexity/model.py function drop_path (line 12) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 31) | class DropPath(nn.Module): method __init__ (line 36) | def __init__(self, drop_prob=None): method forward (line 40) | def forward(self, x): class ConvBNAct (line 44) | class ConvBNAct(nn.Module): method __init__ (line 45) | def __init__(self, method forward (line 72) | def forward(self, x): method complexity (line 79) | def complexity(self, cx): class SqueezeExcite (line 93) | class SqueezeExcite(nn.Module): method __init__ (line 94) | def __init__(self, method forward (line 105) | def forward(self, x: Tensor) -> Tensor: method complexity (line 113) | def complexity(self, cx): class MBConv (line 133) | class MBConv(nn.Module): method __init__ (line 134) | def __init__(self, method forward (line 187) | def forward(self, x: Tensor) -> Tensor: method complexity (line 200) | def complexity(self, cx): class FusedMBConv (line 209) | class FusedMBConv(nn.Module): method __init__ (line 210) | def __init__(self, method forward (line 263) | def forward(self, x: Tensor) -> Tensor: method complexity (line 278) | def complexity(self, cx): class EfficientNetV2 (line 288) | class EfficientNetV2(nn.Module): method __init__ (line 289) | def __init__(self, method forward (line 361) | def forward(self, x: Tensor) -> Tensor: method complexity (line 368) | def complexity(self, h, w, c): function efficientnetv2_s (line 390) | def efficientnetv2_s(num_classes: int = 1000): function efficientnetv2_m (line 411) | def efficientnetv2_m(num_classes: int = 1000): function efficientnetv2_l (line 433) | def efficientnetv2_l(num_classes: int = 1000): FILE: pytorch_classification/model_complexity/utils.py function conv2d_cx (line 7) | def conv2d_cx(cx, in_c, out_c, k, *, stride=1, groups=1, bias=False, tra... function pool2d_cx (line 24) | def pool2d_cx(cx, in_c, k, *, stride=1): function norm2d_cx (line 36) | def norm2d_cx(cx, in_c, trainable=True): function gap2d_cx (line 47) | def gap2d_cx(cx): function linear_cx (line 54) | def linear_cx(cx, in_units, out_units, *, bias=False, trainable=True): FILE: pytorch_classification/swin_transformer/create_confusion_matrix.py class ConfusionMatrix (line 18) | class ConfusionMatrix(object): method __init__ (line 24) | def __init__(self, num_classes: int, labels: list): method update (line 29) | def update(self, preds, labels): method summary (line 33) | def summary(self): method plot (line 55) | def plot(self): function main (line 84) | def main(args): FILE: pytorch_classification/swin_transformer/model.py function drop_path_f (line 17) | def drop_path_f(x, drop_prob: float = 0., training: bool = False): class DropPath (line 37) | class DropPath(nn.Module): method __init__ (line 40) | def __init__(self, drop_prob=None): method forward (line 44) | def forward(self, x): function window_partition (line 48) | def window_partition(x, window_size: int): function window_reverse (line 66) | def window_reverse(windows, window_size: int, H: int, W: int): class PatchEmbed (line 87) | class PatchEmbed(nn.Module): method __init__ (line 91) | def __init__(self, patch_size=4, in_c=3, embed_dim=96, norm_layer=None): method forward (line 100) | def forward(self, x): class PatchMerging (line 123) | class PatchMerging(nn.Module): method __init__ (line 131) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 137) | def forward(self, x, H, W): class Mlp (line 168) | class Mlp(nn.Module): method __init__ (line 171) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 182) | def forward(self, x): class WindowAttention (line 191) | class WindowAttention(nn.Module): method __init__ (line 204) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, attn_dr... method forward (line 239) | def forward(self, x, mask: Optional[torch.Tensor] = None): class SwinTransformerBlock (line 287) | class SwinTransformerBlock(nn.Module): method __init__ (line 304) | def __init__(self, dim, num_heads, window_size=7, shift_size=0, method forward (line 325) | def forward(self, x, attn_mask): class BasicLayer (line 379) | class BasicLayer(nn.Module): method __init__ (line 398) | def __init__(self, dim, depth, num_heads, window_size, method create_mask (line 429) | def create_mask(self, x, H, W): method forward (line 455) | def forward(self, x, H, W): class SwinTransformer (line 470) | class SwinTransformer(nn.Module): method __init__ (line 493) | def __init__(self, patch_size=4, in_chans=3, num_classes=1000, method _init_weights (line 543) | def _init_weights(self, m): method forward (line 552) | def forward(self, x): function swin_tiny_patch4_window7_224 (line 567) | def swin_tiny_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_small_patch4_window7_224 (line 581) | def swin_small_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_base_patch4_window7_224 (line 595) | def swin_base_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_base_patch4_window12_384 (line 609) | def swin_base_patch4_window12_384(num_classes: int = 1000, **kwargs): function swin_base_patch4_window7_224_in22k (line 623) | def swin_base_patch4_window7_224_in22k(num_classes: int = 21841, **kwargs): function swin_base_patch4_window12_384_in22k (line 637) | def swin_base_patch4_window12_384_in22k(num_classes: int = 21841, **kwar... function swin_large_patch4_window7_224_in22k (line 651) | def swin_large_patch4_window7_224_in22k(num_classes: int = 21841, **kwar... function swin_large_patch4_window12_384_in22k (line 665) | def swin_large_patch4_window12_384_in22k(num_classes: int = 21841, **kwa... FILE: pytorch_classification/swin_transformer/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/swin_transformer/predict.py function main (line 12) | def main(): FILE: pytorch_classification/swin_transformer/select_incorrect_samples.py function main (line 18) | def main(args): FILE: pytorch_classification/swin_transformer/train.py function main (line 14) | def main(args): FILE: pytorch_classification/swin_transformer/utils.py function read_split_data (line 13) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 82) | def plot_data_loader_image(data_loader): function write_pickle (line 107) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 112) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 118) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 154) | def evaluate(model, data_loader, device, epoch): FILE: pytorch_classification/tensorboard_test/data_utils.py function read_split_data (line 12) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 77) | def plot_data_loader_image(data_loader): function write_pickle (line 102) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 107) | def read_pickle(file_name: str) -> list: function plot_class_preds (line 113) | def plot_class_preds(net, FILE: pytorch_classification/tensorboard_test/model.py class BasicBlock (line 5) | class BasicBlock(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 19) | def forward(self, x): class Bottleneck (line 37) | class Bottleneck(nn.Module): method __init__ (line 40) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 56) | def forward(self, x): class ResNet (line 78) | class ResNet(nn.Module): method __init__ (line 80) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 102) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 118) | def forward(self, x): function resnet34 (line 137) | def resnet34(num_classes=1000, include_top=True): function resnet101 (line 141) | def resnet101(num_classes=1000, include_top=True): FILE: pytorch_classification/tensorboard_test/my_dataset.py class MyDataSet (line 7) | class MyDataSet(Dataset): method __init__ (line 10) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 28) | def __len__(self): method __getitem__ (line 31) | def __getitem__(self, item): method collate_fn (line 44) | def collate_fn(batch): FILE: pytorch_classification/tensorboard_test/train.py function main (line 17) | def main(args): FILE: pytorch_classification/tensorboard_test/train_eval_utils.py function train_one_epoch (line 7) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 36) | def evaluate(model, data_loader, device): FILE: pytorch_classification/train_multi_GPU/model.py class BasicBlock (line 5) | class BasicBlock(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 19) | def forward(self, x): class Bottleneck (line 37) | class Bottleneck(nn.Module): method __init__ (line 40) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 56) | def forward(self, x): class ResNet (line 78) | class ResNet(nn.Module): method __init__ (line 80) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 102) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 118) | def forward(self, x): function resnet34 (line 137) | def resnet34(num_classes=1000, include_top=True): function resnet101 (line 141) | def resnet101(num_classes=1000, include_top=True): FILE: pytorch_classification/train_multi_GPU/multi_train_utils/distributed_utils.py function init_distributed_mode (line 7) | def init_distributed_mode(args): function cleanup (line 31) | def cleanup(): function is_dist_avail_and_initialized (line 35) | def is_dist_avail_and_initialized(): function get_world_size (line 44) | def get_world_size(): function get_rank (line 50) | def get_rank(): function is_main_process (line 56) | def is_main_process(): function reduce_value (line 60) | def reduce_value(value, average=True): FILE: pytorch_classification/train_multi_GPU/multi_train_utils/train_eval_utils.py function train_one_epoch (line 9) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 48) | def evaluate(model, data_loader, device): FILE: pytorch_classification/train_multi_GPU/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/train_multi_GPU/train_multi_gpu_using_launch.py function main (line 19) | def main(args): FILE: pytorch_classification/train_multi_GPU/train_multi_gpu_using_spawn.py function main_fun (line 21) | def main_fun(rank, world_size, args): FILE: pytorch_classification/train_multi_GPU/train_single_gpu.py function main (line 17) | def main(args): FILE: pytorch_classification/train_multi_GPU/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 78) | def plot_data_loader_image(data_loader): function write_pickle (line 103) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 108) | def read_pickle(file_name: str) -> list: FILE: pytorch_classification/vision_transformer/flops.py function main (line 7) | def main(): FILE: pytorch_classification/vision_transformer/my_dataset.py class MyDataSet (line 6) | class MyDataSet(Dataset): method __init__ (line 9) | def __init__(self, images_path: list, images_class: list, transform=No... method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, item): method collate_fn (line 30) | def collate_fn(batch): FILE: pytorch_classification/vision_transformer/predict.py function main (line 12) | def main(): FILE: pytorch_classification/vision_transformer/train.py function main (line 17) | def main(args): FILE: pytorch_classification/vision_transformer/utils.py function read_split_data (line 13) | def read_split_data(root: str, val_rate: float = 0.2): function plot_data_loader_image (line 82) | def plot_data_loader_image(data_loader): function write_pickle (line 107) | def write_pickle(list_info: list, file_name: str): function read_pickle (line 112) | def read_pickle(file_name: str) -> list: function train_one_epoch (line 118) | def train_one_epoch(model, optimizer, data_loader, device, epoch): function evaluate (line 154) | def evaluate(model, data_loader, device, epoch): FILE: pytorch_classification/vision_transformer/vit_model.py function drop_path (line 12) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 31) | class DropPath(nn.Module): method __init__ (line 35) | def __init__(self, drop_prob=None): method forward (line 39) | def forward(self, x): class PatchEmbed (line 43) | class PatchEmbed(nn.Module): method __init__ (line 47) | def __init__(self, img_size=224, patch_size=16, in_c=3, embed_dim=768,... method forward (line 59) | def forward(self, x): class Attention (line 71) | class Attention(nn.Module): method __init__ (line 72) | def __init__(self, method forward (line 88) | def forward(self, x): class Mlp (line 114) | class Mlp(nn.Module): method __init__ (line 118) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 127) | def forward(self, x): class Block (line 136) | class Block(nn.Module): method __init__ (line 137) | def __init__(self, method forward (line 158) | def forward(self, x): class VisionTransformer (line 164) | class VisionTransformer(nn.Module): method __init__ (line 165) | def __init__(self, img_size=224, patch_size=16, in_c=3, num_classes=1000, method forward_features (line 240) | def forward_features(self, x): method forward (line 258) | def forward(self, x): function _init_vit_weights (line 272) | def _init_vit_weights(m): function vit_base_patch16_224 (line 290) | def vit_base_patch16_224(num_classes: int = 1000): function vit_base_patch16_224_in21k (line 307) | def vit_base_patch16_224_in21k(num_classes: int = 21843, has_logits: boo... function vit_base_patch32_224 (line 324) | def vit_base_patch32_224(num_classes: int = 1000): function vit_base_patch32_224_in21k (line 341) | def vit_base_patch32_224_in21k(num_classes: int = 21843, has_logits: boo... function vit_large_patch16_224 (line 358) | def vit_large_patch16_224(num_classes: int = 1000): function vit_large_patch16_224_in21k (line 375) | def vit_large_patch16_224_in21k(num_classes: int = 21843, has_logits: bo... function vit_large_patch32_224_in21k (line 392) | def vit_large_patch32_224_in21k(num_classes: int = 21843, has_logits: bo... function vit_huge_patch14_224_in21k (line 409) | def vit_huge_patch14_224_in21k(num_classes: int = 21843, has_logits: boo... FILE: pytorch_keypoint/DeepPose/datasets.py class WFLWDataset (line 10) | class WFLWDataset(data.Dataset): method __init__ (line 27) | def __init__(self, method get_5_points (line 58) | def get_5_points(keypoints: List[str]) -> List[float]: method get_98_points (line 67) | def get_98_points(keypoints: List[str]) -> List[float]: method collate_fn (line 71) | def collate_fn(batch_infos: List[Tuple[torch.Tensor, dict]]): method __getitem__ (line 89) | def __getitem__(self, idx: int): method __len__ (line 104) | def __len__(self): FILE: pytorch_keypoint/DeepPose/export_onnx.py function main (line 6) | def main(): FILE: pytorch_keypoint/DeepPose/model.py function create_deep_pose_model (line 6) | def create_deep_pose_model(num_keypoints: int) -> nn.Module: FILE: pytorch_keypoint/DeepPose/predict.py function main (line 12) | def main(): FILE: pytorch_keypoint/DeepPose/train.py function get_args_parser (line 14) | def get_args_parser(add_help=True): function main (line 38) | def main(args): FILE: pytorch_keypoint/DeepPose/train_multi_GPU.py function get_args_parser (line 15) | def get_args_parser(add_help=True): function main (line 40) | def main(args): FILE: pytorch_keypoint/DeepPose/train_utils/distributed_utils.py function reduce_value (line 7) | def reduce_value(input_value: torch.Tensor, average=True) -> torch.Tensor: function setup_for_distributed (line 27) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 42) | def is_dist_avail_and_initialized(): function get_world_size (line 51) | def get_world_size(): function get_rank (line 57) | def get_rank(): function is_main_process (line 63) | def is_main_process(): function init_distributed_mode (line 67) | def init_distributed_mode(args): FILE: pytorch_keypoint/DeepPose/train_utils/losses.py class L1Loss (line 8) | class L1Loss(nn.Module): method __init__ (line 9) | def __init__(self) -> None: method forward (line 12) | def forward(self, pred: torch.Tensor, label: torch.Tensor, mask: torch... class SmoothL1Loss (line 27) | class SmoothL1Loss(nn.Module): method __init__ (line 28) | def __init__(self) -> None: method forward (line 31) | def forward(self, pred: torch.Tensor, label: torch.Tensor, mask: torch... class L2Loss (line 46) | class L2Loss(nn.Module): method __init__ (line 47) | def __init__(self) -> None: method forward (line 50) | def forward(self, pred: torch.Tensor, label: torch.Tensor, mask: torch... class WingLoss (line 65) | class WingLoss(nn.Module): method __init__ (line 68) | def __init__(self, w: float = 10.0, epsilon: float = 2.0) -> None: method forward (line 74) | def forward(self, class SoftWingLoss (line 97) | class SoftWingLoss(nn.Module): method __init__ (line 100) | def __init__(self, omega1: float = 2.0, omega2: float = 20.0, epsilon:... method forward (line 107) | def forward(self, FILE: pytorch_keypoint/DeepPose/train_utils/metrics.py class NMEMetric (line 6) | class NMEMetric: method __init__ (line 7) | def __init__(self, device: torch.device) -> None: method update (line 14) | def update(self, pred: torch.Tensor, gt: torch.Tensor, mask: torch.Ten... method evaluate (line 40) | def evaluate(self): method synchronize_results (line 43) | def synchronize_results(self): FILE: pytorch_keypoint/DeepPose/train_utils/train_eval_utils.py function train_one_epoch (line 15) | def train_one_epoch(model: torch.nn.Module, function evaluate (line 61) | def evaluate(model: torch.nn.Module, FILE: pytorch_keypoint/DeepPose/transforms.py function adjust_box (line 12) | def adjust_box(xmin: int, ymin: int, xmax: int, ymax: int, fixed_size: T... function affine_points_np (line 34) | def affine_points_np(keypoint: np.ndarray, m: np.ndarray) -> np.ndarray: function affine_points_torch (line 46) | def affine_points_torch(keypoint: torch.Tensor, m: torch.Tensor) -> torc... class Compose (line 62) | class Compose(object): method __init__ (line 64) | def __init__(self, transforms): method __call__ (line 67) | def __call__(self, image, target): class Resize (line 73) | class Resize(object): method __init__ (line 74) | def __init__(self, h: int, w: int): method __call__ (line 78) | def __call__(self, image: np.ndarray, target): class ToTensor (line 85) | class ToTensor(object): method __call__ (line 87) | def __call__(self, image, target): class Normalize (line 98) | class Normalize(object): method __init__ (line 99) | def __init__(self, mean=None, std=None): method __call__ (line 103) | def __call__(self, image: torch.Tensor, target: dict): class RandomHorizontalFlip (line 115) | class RandomHorizontalFlip(object): method __init__ (line 117) | def __init__(self, p: float = 0.5): method __call__ (line 121) | def __call__(self, image: np.ndarray, target: dict): class AffineTransform (line 137) | class AffineTransform(object): method __init__ (line 139) | def __init__(self, method __call__ (line 155) | def __call__(self, img: np.ndarray, target: dict): FILE: pytorch_keypoint/DeepPose/utils.py function draw_keypoints (line 5) | def draw_keypoints(img: np.ndarray, coordinate: np.ndarray, save_path: s... FILE: pytorch_keypoint/HRNet/draw_utils.py function draw_keypoints (line 29) | def draw_keypoints(img: Image, FILE: pytorch_keypoint/HRNet/model/hrnet.py class BasicBlock (line 6) | class BasicBlock(nn.Module): method __init__ (line 9) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 19) | def forward(self, x): class Bottleneck (line 38) | class Bottleneck(nn.Module): method __init__ (line 41) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 56) | def forward(self, x): class StageModule (line 79) | class StageModule(nn.Module): method __init__ (line 80) | def __init__(self, input_branches, output_branches, c): method forward (line 144) | def forward(self, x): class HighResolutionNet (line 160) | class HighResolutionNet(nn.Module): method __init__ (line 161) | def __init__(self, base_channel: int = 32, num_joints: int = 17): method forward (line 248) | def forward(self, x): FILE: pytorch_keypoint/HRNet/my_dataset_coco.py class CocoKeypoint (line 11) | class CocoKeypoint(data.Dataset): method __init__ (line 12) | def __init__(self, method __getitem__ (line 84) | def __getitem__(self, idx): method __len__ (line 94) | def __len__(self): method collate_fn (line 98) | def collate_fn(batch): FILE: pytorch_keypoint/HRNet/plot_curve.py function plot_loss_and_lr (line 5) | def plot_loss_and_lr(train_loss, learning_rate): function plot_map (line 33) | def plot_map(mAP): FILE: pytorch_keypoint/HRNet/predict.py function predict_all_person (line 14) | def predict_all_person(): function predict_single_person (line 19) | def predict_single_person(): FILE: pytorch_keypoint/HRNet/train.py function create_model (line 15) | def create_model(num_joints, load_pretrain_weights=True): function main (line 40) | def main(args): FILE: pytorch_keypoint/HRNet/train_multi_GPU.py function create_model (line 17) | def create_model(num_joints, load_pretrain_weights=True): function main (line 42) | def main(args): FILE: pytorch_keypoint/HRNet/train_utils/coco_eval.py function merge (line 12) | def merge(img_ids, eval_results): class EvalCOCOMetric (line 35) | class EvalCOCOMetric: method __init__ (line 36) | def __init__(self, method plot_img (line 53) | def plot_img(self, img_path, keypoints, r=3): method prepare_for_coco_keypoints (line 61) | def prepare_for_coco_keypoints(self, targets, outputs): method update (line 95) | def update(self, targets, outputs): method synchronize_results (line 101) | def synchronize_results(self): method evaluate (line 115) | def evaluate(self): FILE: pytorch_keypoint/HRNet/train_utils/coco_utils.py function coco_remove_images_without_annotations (line 7) | def coco_remove_images_without_annotations(dataset, ids): function convert_coco_poly_mask (line 40) | def convert_coco_poly_mask(segmentations, height, width): function convert_to_coco_api (line 58) | def convert_to_coco_api(self): FILE: pytorch_keypoint/HRNet/train_utils/distributed_utils.py class SmoothedValue (line 12) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): # @property 是装饰器,这里可简单理解为增加median属性(只读) method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): function all_gather (line 73) | def all_gather(data): function reduce_dict (line 92) | def reduce_dict(input_dict, average=True): class MetricLogger (line 120) | class MetricLogger(object): method __init__ (line 121) | def __init__(self, delimiter="\t"): method update (line 125) | def update(self, **kwargs): method __getattr__ (line 132) | def __getattr__(self, attr): method __str__ (line 140) | def __str__(self): method synchronize_between_processes (line 148) | def synchronize_between_processes(self): method add_meter (line 152) | def add_meter(self, name, meter): method log_every (line 155) | def log_every(self, iterable, print_freq, header=None): function warmup_lr_scheduler (line 209) | def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor): function mkdir (line 222) | def mkdir(path): function setup_for_distributed (line 230) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 245) | def is_dist_avail_and_initialized(): function get_world_size (line 254) | def get_world_size(): function get_rank (line 260) | def get_rank(): function is_main_process (line 266) | def is_main_process(): function save_on_master (line 270) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 275) | def init_distributed_mode(args): FILE: pytorch_keypoint/HRNet/train_utils/group_by_aspect_ratio.py function _repeat_to_at_least (line 17) | def _repeat_to_at_least(iterable, n): class GroupedBatchSampler (line 23) | class GroupedBatchSampler(BatchSampler): method __init__ (line 37) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 47) | def __iter__(self): method __len__ (line 83) | def __len__(self): function _compute_aspect_ratios_slow (line 87) | def _compute_aspect_ratios_slow(dataset, indices=None): function _compute_aspect_ratios_custom_dataset (line 120) | def _compute_aspect_ratios_custom_dataset(dataset, indices=None): function _compute_aspect_ratios_coco_dataset (line 131) | def _compute_aspect_ratios_coco_dataset(dataset, indices=None): function _compute_aspect_ratios_voc_dataset (line 142) | def _compute_aspect_ratios_voc_dataset(dataset, indices=None): function _compute_aspect_ratios_subset_dataset (line 154) | def _compute_aspect_ratios_subset_dataset(dataset, indices=None): function compute_aspect_ratios (line 162) | def compute_aspect_ratios(dataset, indices=None): function _quantize (line 179) | def _quantize(x, bins): function create_aspect_ratio_groups (line 187) | def create_aspect_ratio_groups(dataset, k=0): FILE: pytorch_keypoint/HRNet/train_utils/loss.py class KpLoss (line 4) | class KpLoss(object): method __init__ (line 5) | def __init__(self): method __call__ (line 8) | def __call__(self, logits, targets): FILE: pytorch_keypoint/HRNet/train_utils/train_eval_utils.py function train_one_epoch (line 13) | def train_one_epoch(model, optimizer, data_loader, device, epoch, function evaluate (line 71) | def evaluate(model, data_loader, device, flip=False, flip_pairs=None): FILE: pytorch_keypoint/HRNet/transforms.py function flip_images (line 12) | def flip_images(img): function flip_back (line 18) | def flip_back(output_flipped, matched_parts): function get_max_preds (line 30) | def get_max_preds(batch_heatmaps): function affine_points (line 56) | def affine_points(pt, t): function get_final_preds (line 63) | def get_final_preds(batch_heatmaps: torch.Tensor, function decode_keypoints (line 97) | def decode_keypoints(outputs, origin_hw, num_joints: int = 17): function resize_pad (line 119) | def resize_pad(img: np.ndarray, size: tuple): function adjust_box (line 157) | def adjust_box(xmin: float, ymin: float, w: float, h: float, fixed_size:... function scale_box (line 179) | def scale_box(xmin: float, ymin: float, w: float, h: float, scale_ratio:... function plot_heatmap (line 188) | def plot_heatmap(image, heatmap, kps, kps_weights): class Compose (line 202) | class Compose(object): method __init__ (line 204) | def __init__(self, transforms): method __call__ (line 207) | def __call__(self, image, target): class ToTensor (line 213) | class ToTensor(object): method __call__ (line 215) | def __call__(self, image, target): class Normalize (line 220) | class Normalize(object): method __init__ (line 221) | def __init__(self, mean=None, std=None): method __call__ (line 225) | def __call__(self, image, target): class HalfBody (line 230) | class HalfBody(object): method __init__ (line 231) | def __init__(self, p: float = 0.3, upper_body_ids=None, lower_body_ids... method __call__ (line 238) | def __call__(self, image, target): class AffineTransform (line 274) | class AffineTransform(object): method __init__ (line 276) | def __init__(self, method __call__ (line 284) | def __call__(self, img, target): class RandomHorizontalFlip (line 339) | class RandomHorizontalFlip(object): method __init__ (line 341) | def __init__(self, p: float = 0.5, matched_parts: list = None): method __call__ (line 346) | def __call__(self, image, target): class KeypointToHeatMap (line 371) | class KeypointToHeatMap(object): method __init__ (line 372) | def __init__(self, method __call__ (line 393) | def __call__(self, image, target): FILE: pytorch_keypoint/HRNet/validation.py function summarize (line 18) | def summarize(self, catId=None): function save_info (line 88) | def save_info(coco_evaluator, function main (line 99) | def main(args): FILE: pytorch_object_detection/faster_rcnn/backbone/feature_pyramid_network.py class IntermediateLayerGetter (line 11) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 32) | def __init__(self, model, return_layers): method forward (line 52) | def forward(self, x): class FeaturePyramidNetwork (line 64) | class FeaturePyramidNetwork(nn.Module): method __init__ (line 82) | def __init__(self, in_channels_list, out_channels, extra_blocks=None): method get_result_from_inner_blocks (line 104) | def get_result_from_inner_blocks(self, x: Tensor, idx: int) -> Tensor: method get_result_from_layer_blocks (line 120) | def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor: method forward (line 136) | def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]: class LastLevelMaxPool (line 175) | class LastLevelMaxPool(torch.nn.Module): method forward (line 180) | def forward(self, x: List[Tensor], y: List[Tensor], names: List[str]) ... class BackboneWithFPN (line 186) | class BackboneWithFPN(nn.Module): method __init__ (line 206) | def __init__(self, method forward (line 232) | def forward(self, x): FILE: pytorch_object_detection/faster_rcnn/backbone/mobilenetv2_model.py function _make_divisible (line 6) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNReLU (line 22) | class ConvBNReLU(nn.Sequential): method __init__ (line 23) | def __init__(self, in_channel, out_channel, kernel_size=3, stride=1, g... class InvertedResidual (line 34) | class InvertedResidual(nn.Module): method __init__ (line 35) | def __init__(self, in_channel, out_channel, stride, expand_ratio, norm... method forward (line 56) | def forward(self, x): class MobileNetV2 (line 63) | class MobileNetV2(nn.Module): method __init__ (line 64) | def __init__(self, num_classes=1000, alpha=1.0, round_nearest=8, weigh... method forward (line 122) | def forward(self, x): FILE: pytorch_object_detection/faster_rcnn/backbone/resnet50_fpn_model.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, in_channel, out_channel, stride=1, downsample=None,... method forward (line 32) | def forward(self, x): class ResNet (line 54) | class ResNet(nn.Module): method __init__ (line 56) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 82) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 100) | def forward(self, x): function overwrite_eps (line 119) | def overwrite_eps(model, eps): function resnet50_fpn_backbone (line 137) | def resnet50_fpn_backbone(pretrain_path="", FILE: pytorch_object_detection/faster_rcnn/backbone/vgg_model.py class VGG (line 5) | class VGG(nn.Module): method __init__ (line 6) | def __init__(self, features, class_num=1000, init_weights=False, weigh... method forward (line 24) | def forward(self, x): method _initialize_weights (line 33) | def _initialize_weights(self): function make_features (line 46) | def make_features(cfg: list): function vgg (line 67) | def vgg(model_name="vgg16", weights_path=None): FILE: pytorch_object_detection/faster_rcnn/change_backbone_with_fpn.py function create_model (line 14) | def create_model(num_classes): function main (line 68) | def main(args): FILE: pytorch_object_detection/faster_rcnn/change_backbone_without_fpn.py function create_model (line 13) | def create_model(num_classes): function main (line 56) | def main(args): FILE: pytorch_object_detection/faster_rcnn/draw_box_utils.py function draw_text (line 34) | def draw_text(draw, function draw_masks (line 78) | def draw_masks(image, masks, colors, thresh: float = 0.7, alpha: float =... function draw_objs (line 92) | def draw_objs(image: Image, FILE: pytorch_object_detection/faster_rcnn/my_dataset.py class VOCDataSet (line 10) | class VOCDataSet(Dataset): method __init__ (line 13) | def __init__(self, voc_root, year="2012", transforms=None, txt_name: s... method __len__ (line 59) | def __len__(self): method __getitem__ (line 62) | def __getitem__(self, idx): method get_height_and_width (line 115) | def get_height_and_width(self, idx): method parse_xml_to_dict (line 126) | def parse_xml_to_dict(self, xml): method coco_index (line 150) | def coco_index(self, idx): method collate_fn (line 199) | def collate_fn(batch): FILE: pytorch_object_detection/faster_rcnn/network_files/boxes.py function nms (line 7) | def nms(boxes, scores, iou_threshold): function batched_nms (line 38) | def batched_nms(boxes, scores, idxs, iou_threshold): function remove_small_boxes (line 86) | def remove_small_boxes(boxes, min_size): function clip_boxes_to_image (line 108) | def clip_boxes_to_image(boxes, size): function box_area (line 139) | def box_area(boxes): function box_iou (line 154) | def box_iou(boxes1, boxes2): FILE: pytorch_object_detection/faster_rcnn/network_files/det_utils.py class BalancedPositiveNegativeSampler (line 7) | class BalancedPositiveNegativeSampler(object): method __init__ (line 12) | def __init__(self, batch_size_per_image, positive_fraction): method __call__ (line 22) | def __call__(self, matched_idxs): function encode_boxes (line 88) | def encode_boxes(reference_boxes, proposals, weights): class BoxCoder (line 140) | class BoxCoder(object): method __init__ (line 146) | def __init__(self, weights, bbox_xform_clip=math.log(1000. / 16)): method encode (line 156) | def encode(self, reference_boxes, proposals): method encode_single (line 177) | def encode_single(self, reference_boxes, proposals): method decode (line 193) | def decode(self, rel_codes, boxes): method decode_single (line 224) | def decode_single(self, rel_codes, boxes): class Matcher (line 270) | class Matcher(object): method __init__ (line 279) | def __init__(self, high_threshold, low_threshold, allow_low_quality_ma... method __call__ (line 301) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 355) | def set_low_quality_matches_(self, matches, all_matches, match_quality... function smooth_l1_loss (line 397) | def smooth_l1_loss(input, target, beta: float = 1. / 9, size_average: bo... FILE: pytorch_object_detection/faster_rcnn/network_files/faster_rcnn_framework.py class FasterRCNNBase (line 15) | class FasterRCNNBase(nn.Module): method __init__ (line 28) | def __init__(self, backbone, rpn, roi_heads, transform): method eager_outputs (line 38) | def eager_outputs(self, losses, detections): method forward (line 45) | def forward(self, images, targets=None): class TwoMLPHead (line 118) | class TwoMLPHead(nn.Module): method __init__ (line 127) | def __init__(self, in_channels, representation_size): method forward (line 133) | def forward(self, x): class FastRCNNPredictor (line 142) | class FastRCNNPredictor(nn.Module): method __init__ (line 152) | def __init__(self, in_channels, num_classes): method forward (line 157) | def forward(self, x): class FasterRCNN (line 167) | class FasterRCNN(FasterRCNNBase): method __init__ (line 247) | def __init__(self, backbone, num_classes=None, FILE: pytorch_object_detection/faster_rcnn/network_files/image_list.py class ImageList (line 5) | class ImageList(object): method __init__ (line 13) | def __init__(self, tensors, image_sizes): method to (line 23) | def to(self, device): FILE: pytorch_object_detection/faster_rcnn/network_files/roi_head.py function fastrcnn_loss (line 11) | def fastrcnn_loss(class_logits, box_regression, labels, regression_targe... class RoIHeads (line 59) | class RoIHeads(torch.nn.Module): method __init__ (line 66) | def __init__(self, method assign_targets_to_proposals (line 103) | def assign_targets_to_proposals(self, proposals, gt_boxes, gt_labels): method subsample (line 158) | def subsample(self, labels): method add_gt_proposals (line 171) | def add_gt_proposals(self, proposals, gt_boxes): method check_targets (line 188) | def check_targets(self, targets): method select_training_samples (line 194) | def select_training_samples(self, method postprocess_detections (line 256) | def postprocess_detections(self, method forward (line 349) | def forward(self, FILE: pytorch_object_detection/faster_rcnn/network_files/rpn_function.py function _onnx_get_num_anchors_and_pre_nms_top_n (line 14) | def _onnx_get_num_anchors_and_pre_nms_top_n(ob, orig_pre_nms_top_n): class AnchorsGenerator (line 25) | class AnchorsGenerator(nn.Module): method __init__ (line 51) | def __init__(self, sizes=(128, 256, 512), aspect_ratios=(0.5, 1.0, 2.0)): method generate_anchors (line 67) | def generate_anchors(self, scales, aspect_ratios, dtype=torch.float32,... method set_cell_anchors (line 93) | def set_cell_anchors(self, dtype, device): method num_anchors_per_location (line 111) | def num_anchors_per_location(self): method grid_anchors (line 117) | def grid_anchors(self, grid_sizes, strides): method cached_grid_anchors (line 161) | def cached_grid_anchors(self, grid_sizes, strides): method forward (line 172) | def forward(self, image_list, feature_maps): class RPNHead (line 211) | class RPNHead(nn.Module): method __init__ (line 221) | def __init__(self, in_channels, num_anchors): method forward (line 235) | def forward(self, x): function permute_and_flatten (line 246) | def permute_and_flatten(layer, N, A, C, H, W): function concat_box_prediction_layers (line 272) | def concat_box_prediction_layers(box_cls, box_regression): class RegionProposalNetwork (line 312) | class RegionProposalNetwork(torch.nn.Module): method __init__ (line 345) | def __init__(self, anchor_generator, head, method pre_nms_top_n (line 375) | def pre_nms_top_n(self): method post_nms_top_n (line 380) | def post_nms_top_n(self): method assign_targets_to_anchors (line 385) | def assign_targets_to_anchors(self, anchors, targets): method _get_top_n_idx (line 439) | def _get_top_n_idx(self, objectness, num_anchors_per_level): method filter_proposals (line 465) | def filter_proposals(self, proposals, objectness, image_shapes, num_an... method compute_loss (line 536) | def compute_loss(self, objectness, pred_bbox_deltas, labels, regressio... method forward (line 580) | def forward(self, FILE: pytorch_object_detection/faster_rcnn/network_files/transform.py function _resize_image_onnx (line 12) | def _resize_image_onnx(image, self_min_size, self_max_size): function _resize_image (line 27) | def _resize_image(image, self_min_size, self_max_size): class GeneralizedRCNNTransform (line 48) | class GeneralizedRCNNTransform(nn.Module): method __init__ (line 60) | def __init__(self, min_size, max_size, image_mean, image_std): method normalize (line 69) | def normalize(self, image): method torch_choice (line 77) | def torch_choice(self, k): method resize (line 87) | def resize(self, image, target): method _onnx_batch_images (line 126) | def _onnx_batch_images(self, images, size_divisible=32): method max_by_axis (line 148) | def max_by_axis(self, the_list): method batch_images (line 156) | def batch_images(self, images, size_divisible=32): method postprocess (line 196) | def postprocess(self, method __repr__ (line 222) | def __repr__(self): method forward (line 232) | def forward(self, function resize_boxes (line 264) | def resize_boxes(boxes, original_size, new_size): FILE: pytorch_object_detection/faster_rcnn/plot_curve.py function plot_loss_and_lr (line 5) | def plot_loss_and_lr(train_loss, learning_rate): function plot_map (line 33) | def plot_map(mAP): FILE: pytorch_object_detection/faster_rcnn/predict.py function create_model (line 16) | def create_model(num_classes): function time_synchronized (line 41) | def time_synchronized(): function main (line 46) | def main(): FILE: pytorch_object_detection/faster_rcnn/split_data.py function main (line 5) | def main(): FILE: pytorch_object_detection/faster_rcnn/train_mobilenetv2.py function create_model (line 15) | def create_model(num_classes): function main (line 41) | def main(): FILE: pytorch_object_detection/faster_rcnn/train_multi_GPU.py function create_model (line 15) | def create_model(num_classes): function main (line 38) | def main(args): FILE: pytorch_object_detection/faster_rcnn/train_res50_fpn.py function create_model (line 14) | def create_model(num_classes, load_pretrain_weights=True): function main (line 43) | def main(args): FILE: pytorch_object_detection/faster_rcnn/train_utils/coco_eval.py class CocoEvaluator (line 15) | class CocoEvaluator(object): method __init__ (line 16) | def __init__(self, coco_gt, iou_types): method update (line 29) | def update(self, predictions): method synchronize_between_processes (line 44) | def synchronize_between_processes(self): method accumulate (line 49) | def accumulate(self): method summarize (line 53) | def summarize(self): method prepare (line 58) | def prepare(self, predictions, iou_type): method prepare_for_coco_detection (line 68) | def prepare_for_coco_detection(self, predictions): method prepare_for_coco_segmentation (line 92) | def prepare_for_coco_segmentation(self, predictions): method prepare_for_coco_keypoint (line 127) | def prepare_for_coco_keypoint(self, predictions): function convert_to_xywh (line 154) | def convert_to_xywh(boxes): function merge (line 159) | def merge(img_ids, eval_imgs): function create_common_coco_eval (line 181) | def create_common_coco_eval(coco_eval, img_ids, eval_imgs): function createIndex (line 199) | def createIndex(self): function loadRes (line 234) | def loadRes(self, resFile): function evaluate (line 296) | def evaluate(self): FILE: pytorch_object_detection/faster_rcnn/train_utils/coco_utils.py function convert_to_coco_api (line 7) | def convert_to_coco_api(ds): function get_coco_api_from_dataset (line 46) | def get_coco_api_from_dataset(dataset): FILE: pytorch_object_detection/faster_rcnn/train_utils/distributed_utils.py class SmoothedValue (line 12) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): # @property 是装饰器,这里可简单理解为增加median属性(只读) method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): function all_gather (line 73) | def all_gather(data): function reduce_dict (line 116) | def reduce_dict(input_dict, average=True): class MetricLogger (line 144) | class MetricLogger(object): method __init__ (line 145) | def __init__(self, delimiter="\t"): method update (line 149) | def update(self, **kwargs): method __getattr__ (line 156) | def __getattr__(self, attr): method __str__ (line 164) | def __str__(self): method synchronize_between_processes (line 172) | def synchronize_between_processes(self): method add_meter (line 176) | def add_meter(self, name, meter): method log_every (line 179) | def log_every(self, iterable, print_freq, header=None): function warmup_lr_scheduler (line 234) | def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor): function mkdir (line 247) | def mkdir(path): function setup_for_distributed (line 255) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 270) | def is_dist_avail_and_initialized(): function get_world_size (line 279) | def get_world_size(): function get_rank (line 285) | def get_rank(): function is_main_process (line 291) | def is_main_process(): function save_on_master (line 295) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 300) | def init_distributed_mode(args): FILE: pytorch_object_detection/faster_rcnn/train_utils/group_by_aspect_ratio.py function _repeat_to_at_least (line 17) | def _repeat_to_at_least(iterable, n): class GroupedBatchSampler (line 23) | class GroupedBatchSampler(BatchSampler): method __init__ (line 37) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 47) | def __iter__(self): method __len__ (line 83) | def __len__(self): function _compute_aspect_ratios_slow (line 87) | def _compute_aspect_ratios_slow(dataset, indices=None): function _compute_aspect_ratios_custom_dataset (line 120) | def _compute_aspect_ratios_custom_dataset(dataset, indices=None): function _compute_aspect_ratios_coco_dataset (line 131) | def _compute_aspect_ratios_coco_dataset(dataset, indices=None): function _compute_aspect_ratios_voc_dataset (line 142) | def _compute_aspect_ratios_voc_dataset(dataset, indices=None): function _compute_aspect_ratios_subset_dataset (line 154) | def _compute_aspect_ratios_subset_dataset(dataset, indices=None): function compute_aspect_ratios (line 162) | def compute_aspect_ratios(dataset, indices=None): function _quantize (line 179) | def _quantize(x, bins): function create_aspect_ratio_groups (line 187) | def create_aspect_ratio_groups(dataset, k=0): FILE: pytorch_object_detection/faster_rcnn/train_utils/train_eval_utils.py function train_one_epoch (line 12) | def train_one_epoch(model, optimizer, data_loader, device, epoch, function evaluate (line 69) | def evaluate(model, data_loader, device): function _get_iou_types (line 114) | def _get_iou_types(model): FILE: pytorch_object_detection/faster_rcnn/transforms.py class Compose (line 5) | class Compose(object): method __init__ (line 7) | def __init__(self, transforms): method __call__ (line 10) | def __call__(self, image, target): class ToTensor (line 16) | class ToTensor(object): method __call__ (line 18) | def __call__(self, image, target): class RandomHorizontalFlip (line 23) | class RandomHorizontalFlip(object): method __init__ (line 25) | def __init__(self, prob=0.5): method __call__ (line 28) | def __call__(self, image, target): FILE: pytorch_object_detection/faster_rcnn/validation.py function summarize (line 20) | def summarize(self, catId=None): function main (line 92) | def main(parser_data): FILE: pytorch_object_detection/mask_rcnn/backbone/feature_pyramid_network.py class IntermediateLayerGetter (line 11) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 32) | def __init__(self, model, return_layers): method forward (line 52) | def forward(self, x): class BackboneWithFPN (line 64) | class BackboneWithFPN(nn.Module): method __init__ (line 84) | def __init__(self, method forward (line 110) | def forward(self, x): class FeaturePyramidNetwork (line 116) | class FeaturePyramidNetwork(nn.Module): method __init__ (line 134) | def __init__(self, in_channels_list, out_channels, extra_blocks=None): method get_result_from_inner_blocks (line 156) | def get_result_from_inner_blocks(self, x: Tensor, idx: int) -> Tensor: method get_result_from_layer_blocks (line 172) | def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor: method forward (line 188) | def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]: class LastLevelMaxPool (line 227) | class LastLevelMaxPool(torch.nn.Module): method forward (line 232) | def forward(self, x: List[Tensor], y: List[Tensor], names: List[str]) ... FILE: pytorch_object_detection/mask_rcnn/backbone/resnet50_fpn_model.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, in_channel, out_channel, stride=1, downsample=None,... method forward (line 32) | def forward(self, x): class ResNet (line 54) | class ResNet(nn.Module): method __init__ (line 56) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 82) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 100) | def forward(self, x): function overwrite_eps (line 119) | def overwrite_eps(model, eps): function resnet50_fpn_backbone (line 137) | def resnet50_fpn_backbone(pretrain_path="", FILE: pytorch_object_detection/mask_rcnn/draw_box_utils.py function draw_text (line 34) | def draw_text(draw, function draw_masks (line 78) | def draw_masks(image, masks, colors, thresh: float = 0.7, alpha: float =... function draw_objs (line 92) | def draw_objs(image: Image, FILE: pytorch_object_detection/mask_rcnn/my_dataset_coco.py class CocoDetection (line 11) | class CocoDetection(data.Dataset): method __init__ (line 21) | def __init__(self, root, dataset="train", transforms=None, years="2017"): method parse_targets (line 62) | def parse_targets(self, method __getitem__ (line 111) | def __getitem__(self, index): method __len__ (line 134) | def __len__(self): method get_height_and_width (line 137) | def get_height_and_width(self, index): method collate_fn (line 147) | def collate_fn(batch): FILE: pytorch_object_detection/mask_rcnn/my_dataset_voc.py class VOCInstances (line 12) | class VOCInstances(Dataset): method __init__ (line 13) | def __init__(self, voc_root, year="2012", txt_name: str = "train.txt",... method parse_mask (line 85) | def parse_mask(self, idx: int): method __getitem__ (line 95) | def __getitem__(self, idx): method __len__ (line 113) | def __len__(self): method get_height_and_width (line 116) | def get_height_and_width(self, idx): method get_annotations (line 124) | def get_annotations(self, idx): method collate_fn (line 135) | def collate_fn(batch): function parse_xml_to_dict (line 139) | def parse_xml_to_dict(xml): function parse_objects (line 164) | def parse_objects(data: dict, xml_path: str, class_dict: dict, idx: int): FILE: pytorch_object_detection/mask_rcnn/network_files/boxes.py function nms (line 7) | def nms(boxes, scores, iou_threshold): function batched_nms (line 38) | def batched_nms(boxes, scores, idxs, iou_threshold): function remove_small_boxes (line 86) | def remove_small_boxes(boxes, min_size): function clip_boxes_to_image (line 108) | def clip_boxes_to_image(boxes, size): function box_area (line 139) | def box_area(boxes): function box_iou (line 154) | def box_iou(boxes1, boxes2): FILE: pytorch_object_detection/mask_rcnn/network_files/det_utils.py class BalancedPositiveNegativeSampler (line 7) | class BalancedPositiveNegativeSampler(object): method __init__ (line 12) | def __init__(self, batch_size_per_image, positive_fraction): method __call__ (line 22) | def __call__(self, matched_idxs): function encode_boxes (line 88) | def encode_boxes(reference_boxes, proposals, weights): class BoxCoder (line 140) | class BoxCoder(object): method __init__ (line 146) | def __init__(self, weights, bbox_xform_clip=math.log(1000. / 16)): method encode (line 156) | def encode(self, reference_boxes, proposals): method encode_single (line 177) | def encode_single(self, reference_boxes, proposals): method decode (line 193) | def decode(self, rel_codes, boxes): method decode_single (line 224) | def decode_single(self, rel_codes, boxes): class Matcher (line 270) | class Matcher(object): method __init__ (line 279) | def __init__(self, high_threshold, low_threshold, allow_low_quality_ma... method __call__ (line 301) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 355) | def set_low_quality_matches_(self, matches, all_matches, match_quality... function smooth_l1_loss (line 397) | def smooth_l1_loss(input, target, beta: float = 1. / 9, size_average: bo... FILE: pytorch_object_detection/mask_rcnn/network_files/faster_rcnn_framework.py class FasterRCNNBase (line 15) | class FasterRCNNBase(nn.Module): method __init__ (line 28) | def __init__(self, backbone, rpn, roi_heads, transform): method eager_outputs (line 38) | def eager_outputs(self, losses, detections): method forward (line 45) | def forward(self, images, targets=None): class TwoMLPHead (line 117) | class TwoMLPHead(nn.Module): method __init__ (line 126) | def __init__(self, in_channels, representation_size): method forward (line 132) | def forward(self, x): class FastRCNNPredictor (line 141) | class FastRCNNPredictor(nn.Module): method __init__ (line 151) | def __init__(self, in_channels, num_classes): method forward (line 156) | def forward(self, x): class FasterRCNN (line 166) | class FasterRCNN(FasterRCNNBase): method __init__ (line 246) | def __init__(self, backbone, num_classes=None, FILE: pytorch_object_detection/mask_rcnn/network_files/image_list.py class ImageList (line 5) | class ImageList(object): method __init__ (line 13) | def __init__(self, tensors, image_sizes): method to (line 23) | def to(self, device): FILE: pytorch_object_detection/mask_rcnn/network_files/mask_rcnn.py class MaskRCNN (line 8) | class MaskRCNN(FasterRCNN): method __init__ (line 97) | def __init__( class MaskRCNNHeads (line 201) | class MaskRCNNHeads(nn.Sequential): method __init__ (line 202) | def __init__(self, in_channels, layers, dilation): class MaskRCNNPredictor (line 229) | class MaskRCNNPredictor(nn.Sequential): method __init__ (line 230) | def __init__(self, in_channels, dim_reduced, num_classes): FILE: pytorch_object_detection/mask_rcnn/network_files/roi_head.py function fastrcnn_loss (line 12) | def fastrcnn_loss(class_logits, box_regression, labels, regression_targe... function maskrcnn_inference (line 60) | def maskrcnn_inference(x, labels): function project_masks_on_boxes (line 95) | def project_masks_on_boxes(gt_masks, boxes, matched_idxs, M): function maskrcnn_loss (line 110) | def maskrcnn_loss(mask_logits, proposals, gt_masks, gt_labels, mask_matc... class RoIHeads (line 150) | class RoIHeads(torch.nn.Module): method __init__ (line 157) | def __init__(self, method has_mask (line 203) | def has_mask(self): method assign_targets_to_proposals (line 212) | def assign_targets_to_proposals(self, proposals, gt_boxes, gt_labels): method subsample (line 267) | def subsample(self, labels): method add_gt_proposals (line 280) | def add_gt_proposals(self, proposals, gt_boxes): method check_targets (line 297) | def check_targets(self, targets): method select_training_samples (line 303) | def select_training_samples(self, method postprocess_detections (line 365) | def postprocess_detections(self, method forward (line 458) | def forward(self, FILE: pytorch_object_detection/mask_rcnn/network_files/rpn_function.py function _onnx_get_num_anchors_and_pre_nms_top_n (line 14) | def _onnx_get_num_anchors_and_pre_nms_top_n(ob, orig_pre_nms_top_n): class AnchorsGenerator (line 25) | class AnchorsGenerator(nn.Module): method __init__ (line 51) | def __init__(self, sizes=(128, 256, 512), aspect_ratios=(0.5, 1.0, 2.0)): method generate_anchors (line 67) | def generate_anchors(self, scales, aspect_ratios, dtype=torch.float32,... method set_cell_anchors (line 93) | def set_cell_anchors(self, dtype, device): method num_anchors_per_location (line 111) | def num_anchors_per_location(self): method grid_anchors (line 117) | def grid_anchors(self, grid_sizes, strides): method cached_grid_anchors (line 161) | def cached_grid_anchors(self, grid_sizes, strides): method forward (line 172) | def forward(self, image_list, feature_maps): class RPNHead (line 211) | class RPNHead(nn.Module): method __init__ (line 221) | def __init__(self, in_channels, num_anchors): method forward (line 235) | def forward(self, x): function permute_and_flatten (line 246) | def permute_and_flatten(layer, N, A, C, H, W): function concat_box_prediction_layers (line 272) | def concat_box_prediction_layers(box_cls, box_regression): class RegionProposalNetwork (line 312) | class RegionProposalNetwork(torch.nn.Module): method __init__ (line 345) | def __init__(self, anchor_generator, head, method pre_nms_top_n (line 375) | def pre_nms_top_n(self): method post_nms_top_n (line 380) | def post_nms_top_n(self): method assign_targets_to_anchors (line 385) | def assign_targets_to_anchors(self, anchors, targets): method _get_top_n_idx (line 433) | def _get_top_n_idx(self, objectness, num_anchors_per_level): method filter_proposals (line 459) | def filter_proposals(self, proposals, objectness, image_shapes, num_an... method compute_loss (line 530) | def compute_loss(self, objectness, pred_bbox_deltas, labels, regressio... method forward (line 574) | def forward(self, FILE: pytorch_object_detection/mask_rcnn/network_files/transform.py function _onnx_paste_mask_in_image (line 12) | def _onnx_paste_mask_in_image(mask, box, im_h, im_w): function _onnx_paste_mask_in_image_loop (line 49) | def _onnx_paste_mask_in_image_loop(masks, boxes, im_h, im_w): function _get_shape_onnx (line 60) | def _get_shape_onnx(image: Tensor) -> Tensor: function _fake_cast_onnx (line 67) | def _fake_cast_onnx(v: Tensor) -> float: function _resize_image_and_masks (line 72) | def _resize_image_and_masks(image: Tensor, function _onnx_expand_boxes (line 124) | def _onnx_expand_boxes(boxes, scale): function expand_boxes (line 145) | def expand_boxes(boxes, scale): function expand_masks_tracing_scale (line 166) | def expand_masks_tracing_scale(M, padding): function expand_masks (line 171) | def expand_masks(mask, padding): function paste_mask_in_image (line 182) | def paste_mask_in_image(mask, box, im_h, im_w): function paste_masks_in_image (line 212) | def paste_masks_in_image(masks, boxes, img_shape, padding=1): class GeneralizedRCNNTransform (line 233) | class GeneralizedRCNNTransform(nn.Module): method __init__ (line 245) | def __init__(self, method normalize (line 262) | def normalize(self, image): method torch_choice (line 270) | def torch_choice(self, k): method resize (line 280) | def resize(self, image, target): method _onnx_batch_images (line 316) | def _onnx_batch_images(self, images, size_divisible=32): method max_by_axis (line 338) | def max_by_axis(self, the_list): method batch_images (line 346) | def batch_images(self, images, size_divisible=32): method postprocess (line 386) | def postprocess(self, method __repr__ (line 418) | def __repr__(self): method forward (line 428) | def forward(self, function resize_boxes (line 460) | def resize_boxes(boxes, original_size, new_size): FILE: pytorch_object_detection/mask_rcnn/plot_curve.py function plot_loss_and_lr (line 5) | def plot_loss_and_lr(train_loss, learning_rate): function plot_map (line 33) | def plot_map(mAP): FILE: pytorch_object_detection/mask_rcnn/predict.py function create_model (line 16) | def create_model(num_classes, box_thresh=0.5): function time_synchronized (line 26) | def time_synchronized(): function main (line 31) | def main(): FILE: pytorch_object_detection/mask_rcnn/train.py function create_model (line 16) | def create_model(num_classes, load_pretrain_weights=True): function main (line 39) | def main(args): FILE: pytorch_object_detection/mask_rcnn/train_multi_GPU.py function create_model (line 17) | def create_model(num_classes, load_pretrain_weights=True): function main (line 39) | def main(args): FILE: pytorch_object_detection/mask_rcnn/train_utils/coco_eval.py function merge (line 11) | def merge(img_ids, eval_results): class EvalCOCOMetric (line 34) | class EvalCOCOMetric: method __init__ (line 35) | def __init__(self, method prepare_for_coco_detection (line 50) | def prepare_for_coco_detection(self, targets, outputs): method prepare_for_coco_segmentation (line 88) | def prepare_for_coco_segmentation(self, targets, outputs): method update (line 124) | def update(self, targets, outputs): method synchronize_results (line 132) | def synchronize_results(self): method evaluate (line 146) | def evaluate(self): FILE: pytorch_object_detection/mask_rcnn/train_utils/coco_utils.py function coco_remove_images_without_annotations (line 7) | def coco_remove_images_without_annotations(dataset, ids): function convert_coco_poly_mask (line 40) | def convert_coco_poly_mask(segmentations, height, width): function convert_to_coco_api (line 58) | def convert_to_coco_api(self): FILE: pytorch_object_detection/mask_rcnn/train_utils/distributed_utils.py class SmoothedValue (line 12) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): # @property 是装饰器,这里可简单理解为增加median属性(只读) method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): function all_gather (line 73) | def all_gather(data): function reduce_dict (line 92) | def reduce_dict(input_dict, average=True): class MetricLogger (line 120) | class MetricLogger(object): method __init__ (line 121) | def __init__(self, delimiter="\t"): method update (line 125) | def update(self, **kwargs): method __getattr__ (line 132) | def __getattr__(self, attr): method __str__ (line 140) | def __str__(self): method synchronize_between_processes (line 148) | def synchronize_between_processes(self): method add_meter (line 152) | def add_meter(self, name, meter): method log_every (line 155) | def log_every(self, iterable, print_freq, header=None): function warmup_lr_scheduler (line 210) | def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor): function mkdir (line 223) | def mkdir(path): function setup_for_distributed (line 231) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 246) | def is_dist_avail_and_initialized(): function get_world_size (line 255) | def get_world_size(): function get_rank (line 261) | def get_rank(): function is_main_process (line 267) | def is_main_process(): function save_on_master (line 271) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 276) | def init_distributed_mode(args): FILE: pytorch_object_detection/mask_rcnn/train_utils/group_by_aspect_ratio.py function _repeat_to_at_least (line 17) | def _repeat_to_at_least(iterable, n): class GroupedBatchSampler (line 23) | class GroupedBatchSampler(BatchSampler): method __init__ (line 37) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 47) | def __iter__(self): method __len__ (line 83) | def __len__(self): function _compute_aspect_ratios_slow (line 87) | def _compute_aspect_ratios_slow(dataset, indices=None): function _compute_aspect_ratios_custom_dataset (line 120) | def _compute_aspect_ratios_custom_dataset(dataset, indices=None): function _compute_aspect_ratios_coco_dataset (line 131) | def _compute_aspect_ratios_coco_dataset(dataset, indices=None): function _compute_aspect_ratios_voc_dataset (line 142) | def _compute_aspect_ratios_voc_dataset(dataset, indices=None): function _compute_aspect_ratios_subset_dataset (line 154) | def _compute_aspect_ratios_subset_dataset(dataset, indices=None): function compute_aspect_ratios (line 162) | def compute_aspect_ratios(dataset, indices=None): function _quantize (line 179) | def _quantize(x, bins): function create_aspect_ratio_groups (line 187) | def create_aspect_ratio_groups(dataset, k=0): FILE: pytorch_object_detection/mask_rcnn/train_utils/train_eval_utils.py function train_one_epoch (line 11) | def train_one_epoch(model, optimizer, data_loader, device, epoch, function evaluate (line 69) | def evaluate(model, data_loader, device): FILE: pytorch_object_detection/mask_rcnn/transforms.py class Compose (line 5) | class Compose(object): method __init__ (line 7) | def __init__(self, transforms): method __call__ (line 10) | def __call__(self, image, target): class ToTensor (line 16) | class ToTensor(object): method __call__ (line 18) | def __call__(self, image, target): class RandomHorizontalFlip (line 23) | class RandomHorizontalFlip(object): method __init__ (line 25) | def __init__(self, prob=0.5): method __call__ (line 28) | def __call__(self, image, target): FILE: pytorch_object_detection/mask_rcnn/validation.py function summarize (line 21) | def summarize(self, catId=None): function save_info (line 93) | def save_info(coco_evaluator, function main (line 121) | def main(parser_data): FILE: pytorch_object_detection/retinaNet/backbone/feature_pyramid_network.py class IntermediateLayerGetter (line 11) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 32) | def __init__(self, model, return_layers): method forward (line 52) | def forward(self, x): class BackboneWithFPN (line 64) | class BackboneWithFPN(nn.Module): method __init__ (line 84) | def __init__(self, method forward (line 110) | def forward(self, x): class ExtraFPNBlock (line 116) | class ExtraFPNBlock(nn.Module): method forward (line 131) | def forward(self, class LastLevelMaxPool (line 138) | class LastLevelMaxPool(torch.nn.Module): method forward (line 143) | def forward(self, x: List[Tensor], y: List[Tensor], names: List[str]) ... class LastLevelP6P7 (line 149) | class LastLevelP6P7(ExtraFPNBlock): method __init__ (line 153) | def __init__(self, in_channels: int, out_channels: int): method forward (line 162) | def forward(self, class FeaturePyramidNetwork (line 175) | class FeaturePyramidNetwork(nn.Module): method __init__ (line 193) | def __init__(self, in_channels_list, out_channels, extra_blocks=None): method get_result_from_inner_blocks (line 215) | def get_result_from_inner_blocks(self, x: Tensor, idx: int) -> Tensor: method get_result_from_layer_blocks (line 231) | def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor: method forward (line 247) | def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]: FILE: pytorch_object_detection/retinaNet/backbone/resnet50_fpn_model.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, in_channel, out_channel, stride=1, downsample=None,... method forward (line 32) | def forward(self, x): class ResNet (line 54) | class ResNet(nn.Module): method __init__ (line 56) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 82) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 100) | def forward(self, x): function overwrite_eps (line 119) | def overwrite_eps(model, eps): function resnet50_fpn_backbone (line 137) | def resnet50_fpn_backbone(pretrain_path="", FILE: pytorch_object_detection/retinaNet/draw_box_utils.py function draw_text (line 34) | def draw_text(draw, function draw_masks (line 78) | def draw_masks(image, masks, colors, thresh: float = 0.7, alpha: float =... function draw_objs (line 92) | def draw_objs(image: Image, FILE: pytorch_object_detection/retinaNet/my_dataset.py class VOCDataSet (line 9) | class VOCDataSet(Dataset): method __init__ (line 12) | def __init__(self, voc_root, year="2012", transforms=None, txt_name: s... method __len__ (line 43) | def __len__(self): method __getitem__ (line 46) | def __getitem__(self, idx): method get_height_and_width (line 93) | def get_height_and_width(self, idx): method parse_xml_to_dict (line 104) | def parse_xml_to_dict(self, xml): method coco_index (line 128) | def coco_index(self, idx): method collate_fn (line 183) | def collate_fn(batch): FILE: pytorch_object_detection/retinaNet/network_files/anchor_utils.py class AnchorsGenerator (line 9) | class AnchorsGenerator(nn.Module): method __init__ (line 35) | def __init__(self, sizes=(128, 256, 512), aspect_ratios=(0.5, 1.0, 2.0)): method generate_anchors (line 51) | def generate_anchors(self, scales, aspect_ratios, dtype=torch.float32,... method set_cell_anchors (line 77) | def set_cell_anchors(self, dtype, device): method num_anchors_per_location (line 95) | def num_anchors_per_location(self): method grid_anchors (line 101) | def grid_anchors(self, grid_sizes, strides): method cached_grid_anchors (line 145) | def cached_grid_anchors(self, grid_sizes, strides): method forward (line 156) | def forward(self, image_list, feature_maps): FILE: pytorch_object_detection/retinaNet/network_files/boxes.py function nms (line 7) | def nms(boxes, scores, iou_threshold): function batched_nms (line 38) | def batched_nms(boxes, scores, idxs, iou_threshold): function remove_small_boxes (line 86) | def remove_small_boxes(boxes, min_size): function clip_boxes_to_image (line 108) | def clip_boxes_to_image(boxes, size): function box_area (line 139) | def box_area(boxes): function box_iou (line 154) | def box_iou(boxes1, boxes2): FILE: pytorch_object_detection/retinaNet/network_files/det_utils.py class BalancedPositiveNegativeSampler (line 7) | class BalancedPositiveNegativeSampler(object): method __init__ (line 12) | def __init__(self, batch_size_per_image, positive_fraction): method __call__ (line 22) | def __call__(self, matched_idxs): function encode_boxes (line 88) | def encode_boxes(reference_boxes, proposals, weights): class BoxCoder (line 140) | class BoxCoder(object): method __init__ (line 146) | def __init__(self, weights, bbox_xform_clip=math.log(1000. / 16)): method encode (line 156) | def encode(self, reference_boxes, proposals): method encode_single (line 177) | def encode_single(self, reference_boxes, proposals): method decode (line 193) | def decode(self, rel_codes, boxes): method decode_single (line 223) | def decode_single(self, rel_codes, boxes): class Matcher (line 269) | class Matcher(object): method __init__ (line 278) | def __init__(self, high_threshold, low_threshold, allow_low_quality_ma... method __call__ (line 300) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 354) | def set_low_quality_matches_(self, matches, all_matches, match_quality... function smooth_l1_loss (line 396) | def smooth_l1_loss(input, target, beta: float = 1. / 9, size_average: bo... FILE: pytorch_object_detection/retinaNet/network_files/image_list.py class ImageList (line 5) | class ImageList(object): method __init__ (line 13) | def __init__(self, tensors, image_sizes): method to (line 23) | def to(self, device): FILE: pytorch_object_detection/retinaNet/network_files/losses.py function sigmoid_focal_loss (line 5) | def sigmoid_focal_loss( FILE: pytorch_object_detection/retinaNet/network_files/retinanet.py function _sum (line 16) | def _sum(x: List[Tensor]) -> Tensor: class RetinaNetClassificationHead (line 23) | class RetinaNetClassificationHead(nn.Module): method __init__ (line 33) | def __init__(self, in_channels, num_anchors, num_classes, prior_probab... method compute_loss (line 59) | def compute_loss(self, method forward (line 92) | def forward(self, x: Tensor) -> Tensor: class RetinaNetRegressionHead (line 113) | class RetinaNetRegressionHead(nn.Module): method __init__ (line 126) | def __init__(self, in_channels, num_anchors): method compute_loss (line 146) | def compute_loss(self, method forward (line 177) | def forward(self, x: List[Tensor]) -> Tensor: class RetinaNetHead (line 199) | class RetinaNetHead(nn.Module): method __init__ (line 209) | def __init__(self, in_channels, num_anchors, num_classes): method compute_loss (line 214) | def compute_loss(self, method forward (line 224) | def forward(self, x: List[Tensor]) -> Dict[str, Tensor]: class RetinaNet (line 231) | class RetinaNet(nn.Module): method __init__ (line 289) | def __init__(self, backbone, num_classes, method eager_outputs (line 358) | def eager_outputs(self, losses, detections): method compute_loss (line 365) | def compute_loss(self, targets, head_outputs, anchors): method postprocess_detections (line 378) | def postprocess_detections(self, head_output, anchors, image_shapes): method forward (line 440) | def forward(self, images, targets=None): FILE: pytorch_object_detection/retinaNet/network_files/transform.py function _resize_image_onnx (line 12) | def _resize_image_onnx(image, self_min_size, self_max_size): function _resize_image (line 27) | def _resize_image(image, self_min_size, self_max_size): class GeneralizedRCNNTransform (line 48) | class GeneralizedRCNNTransform(nn.Module): method __init__ (line 60) | def __init__(self, min_size, max_size, image_mean, image_std): method normalize (line 69) | def normalize(self, image): method torch_choice (line 77) | def torch_choice(self, k): method resize (line 87) | def resize(self, image, target): method _onnx_batch_images (line 126) | def _onnx_batch_images(self, images, size_divisible=32): method max_by_axis (line 148) | def max_by_axis(self, the_list): method batch_images (line 156) | def batch_images(self, images, size_divisible=32): method postprocess (line 196) | def postprocess(self, method __repr__ (line 222) | def __repr__(self): method forward (line 232) | def forward(self, function resize_boxes (line 264) | def resize_boxes(boxes, original_size, new_size): FILE: pytorch_object_detection/retinaNet/plot_curve.py function plot_loss_and_lr (line 5) | def plot_loss_and_lr(train_loss, learning_rate): function plot_map (line 33) | def plot_map(mAP): FILE: pytorch_object_detection/retinaNet/predict.py function create_model (line 15) | def create_model(num_classes): function time_synchronized (line 26) | def time_synchronized(): function main (line 31) | def main(): FILE: pytorch_object_detection/retinaNet/train.py function create_model (line 14) | def create_model(num_classes): function main (line 38) | def main(args): FILE: pytorch_object_detection/retinaNet/train_multi_GPU.py function create_model (line 15) | def create_model(num_classes): function main (line 39) | def main(args): FILE: pytorch_object_detection/retinaNet/train_utils/coco_eval.py class CocoEvaluator (line 15) | class CocoEvaluator(object): method __init__ (line 16) | def __init__(self, coco_gt, iou_types): method update (line 29) | def update(self, predictions): method synchronize_between_processes (line 44) | def synchronize_between_processes(self): method accumulate (line 49) | def accumulate(self): method summarize (line 53) | def summarize(self): method prepare (line 58) | def prepare(self, predictions, iou_type): method prepare_for_coco_detection (line 68) | def prepare_for_coco_detection(self, predictions): method prepare_for_coco_segmentation (line 92) | def prepare_for_coco_segmentation(self, predictions): method prepare_for_coco_keypoint (line 127) | def prepare_for_coco_keypoint(self, predictions): function convert_to_xywh (line 154) | def convert_to_xywh(boxes): function merge (line 159) | def merge(img_ids, eval_imgs): function create_common_coco_eval (line 181) | def create_common_coco_eval(coco_eval, img_ids, eval_imgs): function createIndex (line 199) | def createIndex(self): function loadRes (line 234) | def loadRes(self, resFile): function evaluate (line 296) | def evaluate(self): FILE: pytorch_object_detection/retinaNet/train_utils/coco_utils.py function convert_to_coco_api (line 7) | def convert_to_coco_api(ds): function get_coco_api_from_dataset (line 46) | def get_coco_api_from_dataset(dataset): FILE: pytorch_object_detection/retinaNet/train_utils/distributed_utils.py class SmoothedValue (line 12) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): # @property 是装饰器,这里可简单理解为增加median属性(只读) method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): function all_gather (line 73) | def all_gather(data): function reduce_dict (line 116) | def reduce_dict(input_dict, average=True): class MetricLogger (line 144) | class MetricLogger(object): method __init__ (line 145) | def __init__(self, delimiter="\t"): method update (line 149) | def update(self, **kwargs): method __getattr__ (line 156) | def __getattr__(self, attr): method __str__ (line 164) | def __str__(self): method synchronize_between_processes (line 172) | def synchronize_between_processes(self): method add_meter (line 176) | def add_meter(self, name, meter): method log_every (line 179) | def log_every(self, iterable, print_freq, header=None): function warmup_lr_scheduler (line 234) | def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor): function mkdir (line 247) | def mkdir(path): function setup_for_distributed (line 255) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 270) | def is_dist_avail_and_initialized(): function get_world_size (line 279) | def get_world_size(): function get_rank (line 285) | def get_rank(): function is_main_process (line 291) | def is_main_process(): function save_on_master (line 295) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 300) | def init_distributed_mode(args): FILE: pytorch_object_detection/retinaNet/train_utils/group_by_aspect_ratio.py function _repeat_to_at_least (line 17) | def _repeat_to_at_least(iterable, n): class GroupedBatchSampler (line 23) | class GroupedBatchSampler(BatchSampler): method __init__ (line 37) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 47) | def __iter__(self): method __len__ (line 83) | def __len__(self): function _compute_aspect_ratios_slow (line 87) | def _compute_aspect_ratios_slow(dataset, indices=None): function _compute_aspect_ratios_custom_dataset (line 120) | def _compute_aspect_ratios_custom_dataset(dataset, indices=None): function _compute_aspect_ratios_coco_dataset (line 131) | def _compute_aspect_ratios_coco_dataset(dataset, indices=None): function _compute_aspect_ratios_voc_dataset (line 142) | def _compute_aspect_ratios_voc_dataset(dataset, indices=None): function _compute_aspect_ratios_subset_dataset (line 154) | def _compute_aspect_ratios_subset_dataset(dataset, indices=None): function compute_aspect_ratios (line 162) | def compute_aspect_ratios(dataset, indices=None): function _quantize (line 179) | def _quantize(x, bins): function create_aspect_ratio_groups (line 187) | def create_aspect_ratio_groups(dataset, k=0): FILE: pytorch_object_detection/retinaNet/train_utils/train_eval_utils.py function train_one_epoch (line 12) | def train_one_epoch(model, optimizer, data_loader, device, epoch, function evaluate (line 70) | def evaluate(model, data_loader, device): function _get_iou_types (line 115) | def _get_iou_types(model): FILE: pytorch_object_detection/retinaNet/transforms.py class Compose (line 5) | class Compose(object): method __init__ (line 7) | def __init__(self, transforms): method __call__ (line 10) | def __call__(self, image, target): class ToTensor (line 16) | class ToTensor(object): method __call__ (line 18) | def __call__(self, image, target): class RandomHorizontalFlip (line 23) | class RandomHorizontalFlip(object): method __init__ (line 25) | def __init__(self, prob=0.5): method __call__ (line 28) | def __call__(self, image, target): FILE: pytorch_object_detection/retinaNet/validation.py function summarize (line 20) | def summarize(self, catId=None): function main (line 92) | def main(parser_data): FILE: pytorch_object_detection/ssd/draw_box_utils.py function draw_text (line 34) | def draw_text(draw, function draw_masks (line 78) | def draw_masks(image, masks, colors, thresh: float = 0.7, alpha: float =... function draw_objs (line 92) | def draw_objs(image: Image, FILE: pytorch_object_detection/ssd/my_dataset.py class VOCDataSet (line 9) | class VOCDataSet(Dataset): method __init__ (line 12) | def __init__(self, voc_root, year="2012", transforms=None, train_set='... method __len__ (line 36) | def __len__(self): method __getitem__ (line 39) | def __getitem__(self, idx): method get_height_and_width (line 98) | def get_height_and_width(self, idx): method parse_xml_to_dict (line 109) | def parse_xml_to_dict(self, xml): method coco_index (line 133) | def coco_index(self, idx): method collate_fn (line 186) | def collate_fn(batch): FILE: pytorch_object_detection/ssd/plot_curve.py function plot_loss_and_lr (line 5) | def plot_loss_and_lr(train_loss, learning_rate): function plot_map (line 33) | def plot_map(mAP): FILE: pytorch_object_detection/ssd/predict_test.py function create_model (line 14) | def create_model(num_classes): function time_synchronized (line 21) | def time_synchronized(): function main (line 26) | def main(): FILE: pytorch_object_detection/ssd/src/res50_backbone.py class Bottleneck (line 5) | class Bottleneck(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None): method forward (line 24) | def forward(self, x): class ResNet (line 46) | class ResNet(nn.Module): method __init__ (line 48) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 70) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 86) | def forward(self, x): function resnet50 (line 105) | def resnet50(num_classes=1000, include_top=True): FILE: pytorch_object_detection/ssd/src/ssd_model.py class Backbone (line 9) | class Backbone(nn.Module): method __init__ (line 10) | def __init__(self, pretrain_path=None): method forward (line 27) | def forward(self, x): class SSD300 (line 32) | class SSD300(nn.Module): method __init__ (line 33) | def __init__(self, backbone=None, num_classes=21): method _build_additional_features (line 63) | def _build_additional_features(self, input_size): method _init_weights (line 85) | def _init_weights(self): method bbox_view (line 93) | def bbox_view(self, features, loc_extractor, conf_extractor): method forward (line 105) | def forward(self, image, targets=None): class Loss (line 141) | class Loss(nn.Module): method __init__ (line 148) | def __init__(self, dboxes): method _location_vec (line 162) | def _location_vec(self, loc): method forward (line 174) | def forward(self, ploc, plabel, gloc, glabel): FILE: pytorch_object_detection/ssd/src/utils.py function box_area (line 50) | def box_area(boxes): function calc_iou_tensor (line 65) | def calc_iou_tensor(boxes1, boxes2): class Encoder (line 95) | class Encoder(object): method __init__ (line 115) | def __init__(self, dboxes): method encode (line 122) | def encode(self, bboxes_in, labels_in, criteria=0.5): method scale_back_batch (line 164) | def scale_back_batch(self, bboxes_in, scores_in): method decode_batch (line 205) | def decode_batch(self, bboxes_in, scores_in, criteria=0.45, max_output... method decode_single_new (line 217) | def decode_single_new(self, bboxes_in, scores_in, criteria, num_output... method decode_single (line 272) | def decode_single(self, bboxes_in, scores_in, criteria, max_output, ma... class DefaultBoxes (line 341) | class DefaultBoxes(object): method __init__ (line 342) | def __init__(self, fig_size, feat_size, steps, scales, aspect_ratios, ... method scale_xy (line 399) | def scale_xy(self): method scale_wh (line 403) | def scale_wh(self): method __call__ (line 406) | def __call__(self, order='ltrb'): function dboxes300_coco (line 415) | def dboxes300_coco(): function nms (line 426) | def nms(boxes, scores, iou_threshold): function batched_nms (line 457) | def batched_nms(boxes, scores, idxs, iou_threshold): class PostProcess (line 505) | class PostProcess(nn.Module): method __init__ (line 506) | def __init__(self, dboxes): method scale_back_batch (line 517) | def scale_back_batch(self, bboxes_in, scores_in): method decode_single_new (line 558) | def decode_single_new(self, bboxes_in, scores_in, criteria, num_output): method forward (line 616) | def forward(self, bboxes_in, scores_in): FILE: pytorch_object_detection/ssd/train_multi_GPU.py function create_model (line 14) | def create_model(num_classes): function main (line 40) | def main(args): FILE: pytorch_object_detection/ssd/train_ssd300.py function create_model (line 13) | def create_model(num_classes=21): function main (line 42) | def main(parser_data): FILE: pytorch_object_detection/ssd/train_utils/coco_eval.py class CocoEvaluator (line 16) | class CocoEvaluator(object): method __init__ (line 17) | def __init__(self, coco_gt, iou_types): method update (line 30) | def update(self, predictions): method synchronize_between_processes (line 45) | def synchronize_between_processes(self): method accumulate (line 50) | def accumulate(self): method summarize (line 54) | def summarize(self): method prepare (line 59) | def prepare(self, predictions, iou_type): method prepare_for_coco_detection (line 69) | def prepare_for_coco_detection(self, predictions): method prepare_for_coco_segmentation (line 95) | def prepare_for_coco_segmentation(self, predictions): method prepare_for_coco_keypoint (line 130) | def prepare_for_coco_keypoint(self, predictions): function convert_to_xywh (line 157) | def convert_to_xywh(boxes): function merge (line 162) | def merge(img_ids, eval_imgs): function create_common_coco_eval (line 184) | def create_common_coco_eval(coco_eval, img_ids, eval_imgs): function createIndex (line 202) | def createIndex(self): function loadRes (line 237) | def loadRes(self, resFile): function evaluate (line 299) | def evaluate(self): FILE: pytorch_object_detection/ssd/train_utils/coco_utils.py function convert_to_coco_api (line 9) | def convert_to_coco_api(ds): function get_coco_api_from_dataset (line 58) | def get_coco_api_from_dataset(dataset): FILE: pytorch_object_detection/ssd/train_utils/distributed_utils.py class SmoothedValue (line 12) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): # @property 是装饰器,这里可简单理解为增加median属性(只读) method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): function all_gather (line 73) | def all_gather(data): function reduce_dict (line 116) | def reduce_dict(input_dict, average=True): class MetricLogger (line 144) | class MetricLogger(object): method __init__ (line 145) | def __init__(self, delimiter="\t"): method update (line 149) | def update(self, **kwargs): method __getattr__ (line 156) | def __getattr__(self, attr): method __str__ (line 164) | def __str__(self): method synchronize_between_processes (line 172) | def synchronize_between_processes(self): method add_meter (line 176) | def add_meter(self, name, meter): method log_every (line 179) | def log_every(self, iterable, print_freq, header=None): function warmup_lr_scheduler (line 234) | def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor): function mkdir (line 247) | def mkdir(path): function setup_for_distributed (line 255) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 270) | def is_dist_avail_and_initialized(): function get_world_size (line 279) | def get_world_size(): function get_rank (line 285) | def get_rank(): function is_main_process (line 291) | def is_main_process(): function save_on_master (line 295) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 300) | def init_distributed_mode(args): FILE: pytorch_object_detection/ssd/train_utils/group_by_aspect_ratio.py function _repeat_to_at_least (line 17) | def _repeat_to_at_least(iterable, n): class GroupedBatchSampler (line 23) | class GroupedBatchSampler(BatchSampler): method __init__ (line 37) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 47) | def __iter__(self): method __len__ (line 83) | def __len__(self): function _compute_aspect_ratios_slow (line 87) | def _compute_aspect_ratios_slow(dataset, indices=None): function _compute_aspect_ratios_custom_dataset (line 120) | def _compute_aspect_ratios_custom_dataset(dataset, indices=None): function _compute_aspect_ratios_coco_dataset (line 131) | def _compute_aspect_ratios_coco_dataset(dataset, indices=None): function _compute_aspect_ratios_voc_dataset (line 142) | def _compute_aspect_ratios_voc_dataset(dataset, indices=None): function _compute_aspect_ratios_subset_dataset (line 154) | def _compute_aspect_ratios_subset_dataset(dataset, indices=None): function compute_aspect_ratios (line 162) | def compute_aspect_ratios(dataset, indices=None): function _quantize (line 179) | def _quantize(x, bins): function create_aspect_ratio_groups (line 187) | def create_aspect_ratio_groups(dataset, k=0): FILE: pytorch_object_detection/ssd/train_utils/train_eval_utils.py function train_one_epoch (line 11) | def train_one_epoch(model, optimizer, data_loader, device, epoch, function evaluate (line 76) | def evaluate(model, data_loader, device, data_set=None): function _get_iou_types (line 133) | def _get_iou_types(model): FILE: pytorch_object_detection/ssd/transforms.py class Compose (line 10) | class Compose(object): method __init__ (line 12) | def __init__(self, transforms): method __call__ (line 15) | def __call__(self, image, target=None): class ToTensor (line 21) | class ToTensor(object): method __call__ (line 23) | def __call__(self, image, target): class RandomHorizontalFlip (line 28) | class RandomHorizontalFlip(object): method __init__ (line 30) | def __init__(self, prob=0.5): method __call__ (line 33) | def __call__(self, image, target): class SSDCropping (line 46) | class SSDCropping(object): method __init__ (line 56) | def __init__(self): method __call__ (line 71) | def __call__(self, image, target): class Resize (line 153) | class Resize(object): method __init__ (line 155) | def __init__(self, size=(300, 300)): method __call__ (line 158) | def __call__(self, image, target): class ColorJitter (line 163) | class ColorJitter(object): method __init__ (line 165) | def __init__(self, brightness=0.125, contrast=0.5, saturation=0.5, hue... method __call__ (line 168) | def __call__(self, image, target): class Normalization (line 173) | class Normalization(object): method __init__ (line 175) | def __init__(self, mean=None, std=None): method __call__ (line 182) | def __call__(self, image, target): class AssignGTtoDefaultBox (line 187) | class AssignGTtoDefaultBox(object): method __init__ (line 189) | def __init__(self): method __call__ (line 193) | def __call__(self, image, target): FILE: pytorch_object_detection/ssd/validation.py function summarize (line 19) | def summarize(self, catId=None): function main (line 91) | def main(parser_data): FILE: pytorch_object_detection/train_coco_dataset/backbone/feature_pyramid_network.py class IntermediateLayerGetter (line 11) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 32) | def __init__(self, model, return_layers): method forward (line 52) | def forward(self, x): class BackboneWithFPN (line 64) | class BackboneWithFPN(nn.Module): method __init__ (line 84) | def __init__(self, method forward (line 110) | def forward(self, x): class FeaturePyramidNetwork (line 116) | class FeaturePyramidNetwork(nn.Module): method __init__ (line 134) | def __init__(self, in_channels_list, out_channels, extra_blocks=None): method get_result_from_inner_blocks (line 156) | def get_result_from_inner_blocks(self, x: Tensor, idx: int) -> Tensor: method get_result_from_layer_blocks (line 172) | def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor: method forward (line 188) | def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]: class LastLevelMaxPool (line 227) | class LastLevelMaxPool(torch.nn.Module): method forward (line 232) | def forward(self, x: List[Tensor], y: List[Tensor], names: List[str]) ... FILE: pytorch_object_detection/train_coco_dataset/backbone/mobilenetv2_model.py function _make_divisible (line 5) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNReLU (line 21) | class ConvBNReLU(nn.Sequential): method __init__ (line 22) | def __init__(self, in_channel, out_channel, kernel_size=3, stride=1, g... class InvertedResidual (line 33) | class InvertedResidual(nn.Module): method __init__ (line 34) | def __init__(self, in_channel, out_channel, stride, expand_ratio, norm... method forward (line 55) | def forward(self, x): class MobileNetV2 (line 62) | class MobileNetV2(nn.Module): method __init__ (line 63) | def __init__(self, num_classes=1000, alpha=1.0, round_nearest=8, weigh... method forward (line 121) | def forward(self, x): FILE: pytorch_object_detection/train_coco_dataset/backbone/resnet.py class BasicBlock (line 5) | class BasicBlock(nn.Module): method __init__ (line 8) | def __init__(self, in_channel, out_channel, stride=1, downsample=None,... method forward (line 19) | def forward(self, x): class Bottleneck (line 37) | class Bottleneck(nn.Module): method __init__ (line 46) | def __init__(self, in_channel, out_channel, stride=1, downsample=None, method forward (line 66) | def forward(self, x): class ResNet (line 88) | class ResNet(nn.Module): method __init__ (line 90) | def __init__(self, method _make_layer (line 121) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 145) | def forward(self, x): function resnet34 (line 164) | def resnet34(num_classes=1000, include_top=True): function resnet50 (line 169) | def resnet50(num_classes=1000, include_top=True): function resnet101 (line 174) | def resnet101(num_classes=1000, include_top=True): function resnext50_32x4d (line 179) | def resnext50_32x4d(num_classes=1000, include_top=True): function resnext101_32x8d (line 190) | def resnext101_32x8d(num_classes=1000, include_top=True): FILE: pytorch_object_detection/train_coco_dataset/backbone/resnet50_fpn_model.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, in_channel, out_channel, stride=1, downsample=None,... method forward (line 32) | def forward(self, x): class ResNet (line 54) | class ResNet(nn.Module): method __init__ (line 56) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method _make_layer (line 82) | def _make_layer(self, block, channel, block_num, stride=1): method forward (line 100) | def forward(self, x): function overwrite_eps (line 119) | def overwrite_eps(model, eps): function resnet50_fpn_backbone (line 137) | def resnet50_fpn_backbone(pretrain_path="", FILE: pytorch_object_detection/train_coco_dataset/backbone/vgg_model.py class VGG (line 5) | class VGG(nn.Module): method __init__ (line 6) | def __init__(self, features, class_num=1000, init_weights=False, weigh... method forward (line 24) | def forward(self, x): method _initialize_weights (line 33) | def _initialize_weights(self): function make_features (line 46) | def make_features(cfg: list): function vgg (line 67) | def vgg(model_name="vgg16", weights_path=None): FILE: pytorch_object_detection/train_coco_dataset/change_backbone_with_fpn.py function create_model (line 14) | def create_model(num_classes): function main (line 68) | def main(args): FILE: pytorch_object_detection/train_coco_dataset/draw_box_utils.py function draw_text (line 34) | def draw_text(draw, function draw_masks (line 78) | def draw_masks(image, masks, colors, thresh: float = 0.7, alpha: float =... function draw_objs (line 92) | def draw_objs(image: Image, FILE: pytorch_object_detection/train_coco_dataset/my_dataset.py function _coco_remove_images_without_annotations (line 10) | def _coco_remove_images_without_annotations(dataset, ids): class CocoDetection (line 43) | class CocoDetection(data.Dataset): method __init__ (line 53) | def __init__(self, root, dataset="train", transforms=None): method parse_targets (line 94) | def parse_targets(self, method __getitem__ (line 138) | def __getitem__(self, index): method __len__ (line 161) | def __len__(self): method get_height_and_width (line 164) | def get_height_and_width(self, index): method collate_fn (line 174) | def collate_fn(batch): FILE: pytorch_object_detection/train_coco_dataset/network_files/boxes.py function nms (line 7) | def nms(boxes, scores, iou_threshold): function batched_nms (line 38) | def batched_nms(boxes, scores, idxs, iou_threshold): function remove_small_boxes (line 86) | def remove_small_boxes(boxes, min_size): function clip_boxes_to_image (line 108) | def clip_boxes_to_image(boxes, size): function box_area (line 139) | def box_area(boxes): function box_iou (line 154) | def box_iou(boxes1, boxes2): FILE: pytorch_object_detection/train_coco_dataset/network_files/det_utils.py class BalancedPositiveNegativeSampler (line 7) | class BalancedPositiveNegativeSampler(object): method __init__ (line 12) | def __init__(self, batch_size_per_image, positive_fraction): method __call__ (line 22) | def __call__(self, matched_idxs): function encode_boxes (line 88) | def encode_boxes(reference_boxes, proposals, weights): class BoxCoder (line 140) | class BoxCoder(object): method __init__ (line 146) | def __init__(self, weights, bbox_xform_clip=math.log(1000. / 16)): method encode (line 156) | def encode(self, reference_boxes, proposals): method encode_single (line 177) | def encode_single(self, reference_boxes, proposals): method decode (line 193) | def decode(self, rel_codes, boxes): method decode_single (line 224) | def decode_single(self, rel_codes, boxes): class Matcher (line 270) | class Matcher(object): method __init__ (line 279) | def __init__(self, high_threshold, low_threshold, allow_low_quality_ma... method __call__ (line 301) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 355) | def set_low_quality_matches_(self, matches, all_matches, match_quality... function smooth_l1_loss (line 397) | def smooth_l1_loss(input, target, beta: float = 1. / 9, size_average: bo... FILE: pytorch_object_detection/train_coco_dataset/network_files/faster_rcnn_framework.py class FasterRCNNBase (line 15) | class FasterRCNNBase(nn.Module): method __init__ (line 28) | def __init__(self, backbone, rpn, roi_heads, transform): method eager_outputs (line 38) | def eager_outputs(self, losses, detections): method forward (line 45) | def forward(self, images, targets=None): class TwoMLPHead (line 117) | class TwoMLPHead(nn.Module): method __init__ (line 126) | def __init__(self, in_channels, representation_size): method forward (line 132) | def forward(self, x): class FastRCNNPredictor (line 141) | class FastRCNNPredictor(nn.Module): method __init__ (line 151) | def __init__(self, in_channels, num_classes): method forward (line 156) | def forward(self, x): class FasterRCNN (line 166) | class FasterRCNN(FasterRCNNBase): method __init__ (line 246) | def __init__(self, backbone, num_classes=None, FILE: pytorch_object_detection/train_coco_dataset/network_files/image_list.py class ImageList (line 5) | class ImageList(object): method __init__ (line 13) | def __init__(self, tensors, image_sizes): method to (line 23) | def to(self, device): FILE: pytorch_object_detection/train_coco_dataset/network_files/roi_head.py function fastrcnn_loss (line 11) | def fastrcnn_loss(class_logits, box_regression, labels, regression_targe... class RoIHeads (line 59) | class RoIHeads(torch.nn.Module): method __init__ (line 66) | def __init__(self, method assign_targets_to_proposals (line 103) | def assign_targets_to_proposals(self, proposals, gt_boxes, gt_labels): method subsample (line 158) | def subsample(self, labels): method add_gt_proposals (line 171) | def add_gt_proposals(self, proposals, gt_boxes): method check_targets (line 188) | def check_targets(self, targets): method select_training_samples (line 194) | def select_training_samples(self, method postprocess_detections (line 256) | def postprocess_detections(self, method forward (line 349) | def forward(self, FILE: pytorch_object_detection/train_coco_dataset/network_files/rpn_function.py function _onnx_get_num_anchors_and_pre_nms_top_n (line 14) | def _onnx_get_num_anchors_and_pre_nms_top_n(ob, orig_pre_nms_top_n): class AnchorsGenerator (line 25) | class AnchorsGenerator(nn.Module): method __init__ (line 51) | def __init__(self, sizes=(128, 256, 512), aspect_ratios=(0.5, 1.0, 2.0)): method generate_anchors (line 67) | def generate_anchors(self, scales, aspect_ratios, dtype=torch.float32,... method set_cell_anchors (line 93) | def set_cell_anchors(self, dtype, device): method num_anchors_per_location (line 111) | def num_anchors_per_location(self): method grid_anchors (line 117) | def grid_anchors(self, grid_sizes, strides): method cached_grid_anchors (line 161) | def cached_grid_anchors(self, grid_sizes, strides): method forward (line 172) | def forward(self, image_list, feature_maps): class RPNHead (line 211) | class RPNHead(nn.Module): method __init__ (line 221) | def __init__(self, in_channels, num_anchors): method forward (line 235) | def forward(self, x): function permute_and_flatten (line 246) | def permute_and_flatten(layer, N, A, C, H, W): function concat_box_prediction_layers (line 272) | def concat_box_prediction_layers(box_cls, box_regression): class RegionProposalNetwork (line 312) | class RegionProposalNetwork(torch.nn.Module): method __init__ (line 345) | def __init__(self, anchor_generator, head, method pre_nms_top_n (line 375) | def pre_nms_top_n(self): method post_nms_top_n (line 380) | def post_nms_top_n(self): method assign_targets_to_anchors (line 385) | def assign_targets_to_anchors(self, anchors, targets): method _get_top_n_idx (line 433) | def _get_top_n_idx(self, objectness, num_anchors_per_level): method filter_proposals (line 459) | def filter_proposals(self, proposals, objectness, image_shapes, num_an... method compute_loss (line 530) | def compute_loss(self, objectness, pred_bbox_deltas, labels, regressio... method forward (line 574) | def forward(self, FILE: pytorch_object_detection/train_coco_dataset/network_files/transform.py function _resize_image_onnx (line 12) | def _resize_image_onnx(image, self_min_size, self_max_size): function _resize_image (line 27) | def _resize_image(image, self_min_size, self_max_size): class GeneralizedRCNNTransform (line 48) | class GeneralizedRCNNTransform(nn.Module): method __init__ (line 60) | def __init__(self, min_size, max_size, image_mean, image_std): method normalize (line 69) | def normalize(self, image): method torch_choice (line 77) | def torch_choice(self, k): method resize (line 87) | def resize(self, image, target): method _onnx_batch_images (line 126) | def _onnx_batch_images(self, images, size_divisible=32): method max_by_axis (line 148) | def max_by_axis(self, the_list): method batch_images (line 156) | def batch_images(self, images, size_divisible=32): method postprocess (line 196) | def postprocess(self, method __repr__ (line 222) | def __repr__(self): method forward (line 232) | def forward(self, function resize_boxes (line 264) | def resize_boxes(boxes, original_size, new_size): FILE: pytorch_object_detection/train_coco_dataset/plot_curve.py function plot_loss_and_lr (line 5) | def plot_loss_and_lr(train_loss, learning_rate): function plot_map (line 33) | def plot_map(mAP): FILE: pytorch_object_detection/train_coco_dataset/predict.py function create_model (line 17) | def create_model(num_classes): function time_synchronized (line 37) | def time_synchronized(): function main (line 42) | def main(): FILE: pytorch_object_detection/train_coco_dataset/train.py function create_model (line 16) | def create_model(num_classes): function main (line 50) | def main(args): FILE: pytorch_object_detection/train_coco_dataset/train_multi_GPU.py function create_model (line 17) | def create_model(num_classes): function main (line 40) | def main(args): FILE: pytorch_object_detection/train_coco_dataset/train_utils/coco_eval.py function merge (line 11) | def merge(img_ids, eval_results): class EvalCOCOMetric (line 34) | class EvalCOCOMetric: method __init__ (line 35) | def __init__(self, method prepare_for_coco_detection (line 50) | def prepare_for_coco_detection(self, targets, outputs): method prepare_for_coco_segmentation (line 88) | def prepare_for_coco_segmentation(self, targets, outputs): method update (line 124) | def update(self, targets, outputs): method synchronize_results (line 132) | def synchronize_results(self): method evaluate (line 146) | def evaluate(self): FILE: pytorch_object_detection/train_coco_dataset/train_utils/distributed_utils.py class SmoothedValue (line 12) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): # @property 是装饰器,这里可简单理解为增加median属性(只读) method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): function all_gather (line 73) | def all_gather(data): function reduce_dict (line 92) | def reduce_dict(input_dict, average=True): class MetricLogger (line 120) | class MetricLogger(object): method __init__ (line 121) | def __init__(self, delimiter="\t"): method update (line 125) | def update(self, **kwargs): method __getattr__ (line 132) | def __getattr__(self, attr): method __str__ (line 140) | def __str__(self): method synchronize_between_processes (line 148) | def synchronize_between_processes(self): method add_meter (line 152) | def add_meter(self, name, meter): method log_every (line 155) | def log_every(self, iterable, print_freq, header=None): function warmup_lr_scheduler (line 210) | def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor): function mkdir (line 223) | def mkdir(path): function setup_for_distributed (line 231) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 246) | def is_dist_avail_and_initialized(): function get_world_size (line 255) | def get_world_size(): function get_rank (line 261) | def get_rank(): function is_main_process (line 267) | def is_main_process(): function save_on_master (line 271) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 276) | def init_distributed_mode(args): FILE: pytorch_object_detection/train_coco_dataset/train_utils/group_by_aspect_ratio.py function _repeat_to_at_least (line 17) | def _repeat_to_at_least(iterable, n): class GroupedBatchSampler (line 23) | class GroupedBatchSampler(BatchSampler): method __init__ (line 37) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 47) | def __iter__(self): method __len__ (line 83) | def __len__(self): function _compute_aspect_ratios_slow (line 87) | def _compute_aspect_ratios_slow(dataset, indices=None): function _compute_aspect_ratios_custom_dataset (line 120) | def _compute_aspect_ratios_custom_dataset(dataset, indices=None): function _compute_aspect_ratios_coco_dataset (line 131) | def _compute_aspect_ratios_coco_dataset(dataset, indices=None): function _compute_aspect_ratios_voc_dataset (line 142) | def _compute_aspect_ratios_voc_dataset(dataset, indices=None): function _compute_aspect_ratios_subset_dataset (line 154) | def _compute_aspect_ratios_subset_dataset(dataset, indices=None): function compute_aspect_ratios (line 162) | def compute_aspect_ratios(dataset, indices=None): function _quantize (line 179) | def _quantize(x, bins): function create_aspect_ratio_groups (line 187) | def create_aspect_ratio_groups(dataset, k=0): FILE: pytorch_object_detection/train_coco_dataset/train_utils/train_eval_utils.py function train_one_epoch (line 11) | def train_one_epoch(model, optimizer, data_loader, device, epoch, function evaluate (line 69) | def evaluate(model, data_loader, device): FILE: pytorch_object_detection/train_coco_dataset/transforms.py class Compose (line 5) | class Compose(object): method __init__ (line 7) | def __init__(self, transforms): method __call__ (line 10) | def __call__(self, image, target): class ToTensor (line 16) | class ToTensor(object): method __call__ (line 18) | def __call__(self, image, target): class RandomHorizontalFlip (line 23) | class RandomHorizontalFlip(object): method __init__ (line 25) | def __init__(self, prob=0.5): method __call__ (line 28) | def __call__(self, image, target): FILE: pytorch_object_detection/train_coco_dataset/validation.py function summarize (line 22) | def summarize(self, catId=None): function main (line 94) | def main(parser_data): FILE: pytorch_object_detection/yolov3_spp/build_utils/datasets.py function exif_size (line 27) | def exif_size(img): class LoadImagesAndLabels (line 49) | class LoadImagesAndLabels(Dataset): # for training/testing method __init__ (line 50) | def __init__(self, method __len__ (line 285) | def __len__(self): method __getitem__ (line 288) | def __getitem__(self, index): method coco_index (line 360) | def coco_index(self, index): method collate_fn (line 370) | def collate_fn(batch): function load_image (line 377) | def load_image(self, index): function load_mosaic (line 395) | def load_mosaic(self, index): function random_affine (line 475) | def random_affine(img, targets=(), degrees=10, translate=.1, scale=.1, s... function augment_hsv (line 548) | def augment_hsv(img, h_gain=0.5, s_gain=0.5, v_gain=0.5): function letterbox (line 563) | def letterbox(img: np.ndarray, function create_folder (line 614) | def create_folder(path="./new_folder"): FILE: pytorch_object_detection/yolov3_spp/build_utils/img_utils.py function letterbox (line 5) | def letterbox(img: np.ndarray, FILE: pytorch_object_detection/yolov3_spp/build_utils/layers.py function make_divisible (line 5) | def make_divisible(v, divisor): class Flatten (line 11) | class Flatten(nn.Module): method forward (line 13) | def forward(self, x): class Concat (line 17) | class Concat(nn.Module): method __init__ (line 19) | def __init__(self, dimension=1): method forward (line 23) | def forward(self, x): class FeatureConcat (line 27) | class FeatureConcat(nn.Module): method __init__ (line 31) | def __init__(self, layers): method forward (line 36) | def forward(self, x, outputs): class WeightedFeatureFusion (line 40) | class WeightedFeatureFusion(nn.Module): # weighted sum of 2 or more lay... method __init__ (line 44) | def __init__(self, layers, weight=False): method forward (line 52) | def forward(self, x, outputs): class MixConv2d (line 76) | class MixConv2d(nn.Module): # MixConv: Mixed Depthwise Convolutional Ke... method __init__ (line 77) | def __init__(self, in_ch, out_ch, k=(3, 5, 7), stride=1, dilation=1, b... method forward (line 100) | def forward(self, x): class SwishImplementation (line 105) | class SwishImplementation(torch.autograd.Function): method forward (line 107) | def forward(ctx, x): method backward (line 112) | def backward(ctx, grad_output): class MishImplementation (line 118) | class MishImplementation(torch.autograd.Function): method forward (line 120) | def forward(ctx, x): method backward (line 125) | def backward(ctx, grad_output): class MemoryEfficientSwish (line 132) | class MemoryEfficientSwish(nn.Module): method forward (line 133) | def forward(self, x): class MemoryEfficientMish (line 137) | class MemoryEfficientMish(nn.Module): method forward (line 138) | def forward(self, x): class Swish (line 142) | class Swish(nn.Module): method forward (line 143) | def forward(self, x): class HardSwish (line 147) | class HardSwish(nn.Module): # https://arxiv.org/pdf/1905.02244.pdf method forward (line 148) | def forward(self, x): class Mish (line 152) | class Mish(nn.Module): # https://github.com/digantamisra98/Mish method forward (line 153) | def forward(self, x): FILE: pytorch_object_detection/yolov3_spp/build_utils/parse_config.py function parse_model_cfg (line 5) | def parse_model_cfg(path: str): function parse_data_cfg (line 61) | def parse_data_cfg(path): FILE: pytorch_object_detection/yolov3_spp/build_utils/torch_utils.py function init_seeds (line 10) | def init_seeds(seed=0): function time_synchronized (line 19) | def time_synchronized(): function initialize_weights (line 24) | def initialize_weights(model): function model_info (line 36) | def model_info(model, verbose=False): class ModelEMA (line 57) | class ModelEMA: method __init__ (line 75) | def __init__(self, model, decay=0.9999, device=''): method update (line 87) | def update(self, model): method update_attr (line 101) | def update_attr(self, model): FILE: pytorch_object_detection/yolov3_spp/build_utils/utils.py function init_seeds (line 26) | def init_seeds(seed=0): function check_file (line 32) | def check_file(file): function xyxy2xywh (line 42) | def xyxy2xywh(x): function xywh2xyxy (line 52) | def xywh2xyxy(x): function scale_coords (line 62) | def scale_coords(img1_shape, coords, img0_shape, ratio_pad=None): function clip_coords (line 86) | def clip_coords(boxes, img_shape): function bbox_iou (line 94) | def bbox_iou(box1, box2, x1y1x2y2=True, GIoU=False, DIoU=False, CIoU=Fal... function box_iou (line 140) | def box_iou(box1, box2): function wh_iou (line 165) | def wh_iou(wh1, wh2): class FocalLoss (line 173) | class FocalLoss(nn.Module): method __init__ (line 175) | def __init__(self, loss_fcn, gamma=1.5, alpha=0.25): method forward (line 183) | def forward(self, pred, true): function smooth_BCE (line 203) | def smooth_BCE(eps=0.1): # https://github.com/ultralytics/yolov3/issues... function compute_loss (line 208) | def compute_loss(p, targets, model): # predictions, targets, model function build_targets (line 272) | def build_targets(p, targets, model): function non_max_suppression (line 323) | def non_max_suppression(prediction, conf_thres=0.1, iou_thres=0.6, function get_yolo_layers (line 403) | def get_yolo_layers(model): function kmean_anchors (line 408) | def kmean_anchors(path='./data/coco64.txt', n=9, img_size=(640, 640), th... FILE: pytorch_object_detection/yolov3_spp/calculate_dataset.py function calculate_data_txt (line 20) | def calculate_data_txt(txt_path, dataset_dir): function create_data_data (line 34) | def create_data_data(create_data_path, label_path, train_path, val_path,... function change_and_create_cfg_file (line 44) | def change_and_create_cfg_file(classes_info, save_cfg_path="./cfg/my_yol... function main (line 64) | def main(): FILE: pytorch_object_detection/yolov3_spp/draw_box_utils.py function draw_text (line 34) | def draw_text(draw, function draw_masks (line 78) | def draw_masks(image, masks, colors, thresh: float = 0.7, alpha: float =... function draw_objs (line 92) | def draw_objs(image: Image, FILE: pytorch_object_detection/yolov3_spp/export_onnx.py function to_numpy (line 15) | def to_numpy(tensor): function main (line 19) | def main(): FILE: pytorch_object_detection/yolov3_spp/load_onnx_test.py function to_numpy (line 10) | def to_numpy(tensor): function scale_img (line 14) | def scale_img(img: np.ndarray, function clip_coords (line 65) | def clip_coords(boxes: np.ndarray, img_shape: tuple): function turn_back_coords (line 73) | def turn_back_coords(img1_shape, coords, img0_shape, ratio_pad=None): function xywh2xyxy (line 97) | def xywh2xyxy(x: np.ndarray): function bboxes_iou (line 107) | def bboxes_iou(boxes1: np.ndarray, boxes2: np.ndarray) -> np.ndarray: function nms (line 122) | def nms(bboxes: np.ndarray, iou_threshold=0.5, soft_threshold=0.3, sigma... function post_process (line 156) | def post_process(pred: np.ndarray, multi_label=False, conf_thres=0.3): function main (line 201) | def main(): FILE: pytorch_object_detection/yolov3_spp/models.py function create_modules (line 7) | def create_modules(modules_defs: list, img_size): class YOLOLayer (line 115) | class YOLOLayer(nn.Module): method __init__ (line 119) | def __init__(self, anchors, nc, img_size, stride): method create_grids (line 138) | def create_grids(self, ng=(13, 13), device="cpu"): method forward (line 159) | def forward(self, p): class Darknet (line 201) | class Darknet(nn.Module): method __init__ (line 205) | def __init__(self, cfg, img_size=(416, 416), verbose=False): method forward (line 219) | def forward(self, x, verbose=False): method forward_once (line 222) | def forward_once(self, x, verbose=False): method info (line 277) | def info(self, verbose=False): function get_yolo_layers (line 286) | def get_yolo_layers(self): FILE: pytorch_object_detection/yolov3_spp/predict_test.py function main (line 16) | def main(): FILE: pytorch_object_detection/yolov3_spp/train.py function train (line 16) | def train(hyp): FILE: pytorch_object_detection/yolov3_spp/train_multi_GPU.py function main (line 18) | def main(opt, hyp): FILE: pytorch_object_detection/yolov3_spp/train_utils/coco_eval.py class CocoEvaluator (line 15) | class CocoEvaluator(object): method __init__ (line 16) | def __init__(self, coco_gt, iou_types): method update (line 29) | def update(self, predictions): method synchronize_between_processes (line 44) | def synchronize_between_processes(self): method accumulate (line 49) | def accumulate(self): method summarize (line 53) | def summarize(self): method prepare (line 58) | def prepare(self, predictions, iou_type): method prepare_for_coco_detection (line 68) | def prepare_for_coco_detection(self, predictions): method prepare_for_coco_segmentation (line 92) | def prepare_for_coco_segmentation(self, predictions): method prepare_for_coco_keypoint (line 127) | def prepare_for_coco_keypoint(self, predictions): function convert_to_xywh (line 154) | def convert_to_xywh(boxes): function merge (line 159) | def merge(img_ids, eval_imgs): function create_common_coco_eval (line 181) | def create_common_coco_eval(coco_eval, img_ids, eval_imgs): function createIndex (line 199) | def createIndex(self): function loadRes (line 234) | def loadRes(self, resFile): function evaluate (line 296) | def evaluate(self): FILE: pytorch_object_detection/yolov3_spp/train_utils/coco_utils.py function convert_to_coco_api (line 9) | def convert_to_coco_api(ds): function get_coco_api_from_dataset (line 53) | def get_coco_api_from_dataset(dataset): FILE: pytorch_object_detection/yolov3_spp/train_utils/distributed_utils.py class SmoothedValue (line 13) | class SmoothedValue(object): method __init__ (line 17) | def __init__(self, window_size=20, fmt=None): method update (line 25) | def update(self, value, n=1): method synchronize_between_processes (line 30) | def synchronize_between_processes(self): method median (line 44) | def median(self): # @property 是装饰器,这里可简单理解为增加median属性(只读) method avg (line 49) | def avg(self): method global_avg (line 54) | def global_avg(self): method max (line 58) | def max(self): method value (line 62) | def value(self): method __str__ (line 65) | def __str__(self): function all_gather (line 74) | def all_gather(data): function reduce_dict (line 117) | def reduce_dict(input_dict, average=True): class MetricLogger (line 145) | class MetricLogger(object): method __init__ (line 146) | def __init__(self, delimiter="\t"): method update (line 150) | def update(self, **kwargs): method __getattr__ (line 157) | def __getattr__(self, attr): method __str__ (line 165) | def __str__(self): method synchronize_between_processes (line 173) | def synchronize_between_processes(self): method add_meter (line 177) | def add_meter(self, name, meter): method log_every (line 180) | def log_every(self, iterable, print_freq, header=None): function warmup_lr_scheduler (line 235) | def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor): function mkdir (line 248) | def mkdir(path): function setup_for_distributed (line 256) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 271) | def is_dist_avail_and_initialized(): function get_world_size (line 280) | def get_world_size(): function get_rank (line 286) | def get_rank(): function is_main_process (line 292) | def is_main_process(): function save_on_master (line 296) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 301) | def init_distributed_mode(args): function torch_distributed_zero_first (line 327) | def torch_distributed_zero_first(local_rank: int): FILE: pytorch_object_detection/yolov3_spp/train_utils/group_by_aspect_ratio.py function _repeat_to_at_least (line 17) | def _repeat_to_at_least(iterable, n): class GroupedBatchSampler (line 23) | class GroupedBatchSampler(BatchSampler): method __init__ (line 37) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 47) | def __iter__(self): method __len__ (line 83) | def __len__(self): function _compute_aspect_ratios_slow (line 87) | def _compute_aspect_ratios_slow(dataset, indices=None): function _compute_aspect_ratios_custom_dataset (line 120) | def _compute_aspect_ratios_custom_dataset(dataset, indices=None): function _compute_aspect_ratios_coco_dataset (line 131) | def _compute_aspect_ratios_coco_dataset(dataset, indices=None): function _compute_aspect_ratios_voc_dataset (line 142) | def _compute_aspect_ratios_voc_dataset(dataset, indices=None): function _compute_aspect_ratios_subset_dataset (line 154) | def _compute_aspect_ratios_subset_dataset(dataset, indices=None): function compute_aspect_ratios (line 162) | def compute_aspect_ratios(dataset, indices=None): function _quantize (line 179) | def _quantize(x, bins): function create_aspect_ratio_groups (line 187) | def create_aspect_ratio_groups(dataset, k=0): FILE: pytorch_object_detection/yolov3_spp/train_utils/train_eval_utils.py function train_one_epoch (line 12) | def train_one_epoch(model, optimizer, data_loader, device, epoch, function evaluate (line 107) | def evaluate(model, data_loader, coco=None, device=None): function _get_iou_types (line 170) | def _get_iou_types(model): FILE: pytorch_object_detection/yolov3_spp/trans_voc2yolo.py function parse_xml_to_dict (line 43) | def parse_xml_to_dict(xml): function translate_info (line 68) | def translate_info(file_names: list, save_root: str, class_dict: dict, t... function create_class_names (line 148) | def create_class_names(class_dict: dict): function main (line 158) | def main(): FILE: pytorch_object_detection/yolov3_spp/validation.py function summarize (line 13) | def summarize(self, catId=None): function main (line 85) | def main(parser_data): FILE: pytorch_segmentation/deeplab_v3/my_dataset.py class VOCSegmentation (line 7) | class VOCSegmentation(data.Dataset): method __init__ (line 8) | def __init__(self, voc_root, year="2012", transforms=None, txt_name: s... method __getitem__ (line 26) | def __getitem__(self, index): method __len__ (line 42) | def __len__(self): method collate_fn (line 46) | def collate_fn(batch): function cat_list (line 53) | def cat_list(images, fill_value=0): FILE: pytorch_segmentation/deeplab_v3/predict.py function time_synchronized (line 13) | def time_synchronized(): function main (line 18) | def main(): FILE: pytorch_segmentation/deeplab_v3/src/deeplabv3_model.py class IntermediateLayerGetter (line 12) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 37) | def __init__(self, model: nn.Module, return_layers: Dict[str, str]) ->... method forward (line 55) | def forward(self, x: Tensor) -> Dict[str, Tensor]: class DeepLabV3 (line 65) | class DeepLabV3(nn.Module): method __init__ (line 82) | def __init__(self, backbone, classifier, aux_classifier=None): method forward (line 88) | def forward(self, x: Tensor) -> Dict[str, Tensor]: class FCNHead (line 110) | class FCNHead(nn.Sequential): method __init__ (line 111) | def __init__(self, in_channels, channels): class ASPPConv (line 122) | class ASPPConv(nn.Sequential): method __init__ (line 123) | def __init__(self, in_channels: int, out_channels: int, dilation: int)... class ASPPPooling (line 131) | class ASPPPooling(nn.Sequential): method __init__ (line 132) | def __init__(self, in_channels: int, out_channels: int) -> None: method forward (line 140) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ASPP (line 147) | class ASPP(nn.Module): method __init__ (line 148) | def __init__(self, in_channels: int, atrous_rates: List[int], out_chan... method forward (line 171) | def forward(self, x: torch.Tensor) -> torch.Tensor: class DeepLabHead (line 179) | class DeepLabHead(nn.Sequential): method __init__ (line 180) | def __init__(self, in_channels: int, num_classes: int) -> None: function deeplabv3_resnet50 (line 190) | def deeplabv3_resnet50(aux, num_classes=21, pretrain_backbone=False): function deeplabv3_resnet101 (line 219) | def deeplabv3_resnet101(aux, num_classes=21, pretrain_backbone=False): function deeplabv3_mobilenetv3_large (line 248) | def deeplabv3_mobilenetv3_large(aux, num_classes=21, pretrain_backbone=F... FILE: pytorch_segmentation/deeplab_v3/src/mobilenet_backbone.py function _make_divisible (line 9) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNActivation (line 25) | class ConvBNActivation(nn.Sequential): method __init__ (line 26) | def __init__(self, class SqueezeExcitation (line 53) | class SqueezeExcitation(nn.Module): method __init__ (line 54) | def __init__(self, input_c: int, squeeze_factor: int = 4): method forward (line 60) | def forward(self, x: Tensor) -> Tensor: class InvertedResidualConfig (line 69) | class InvertedResidualConfig: method __init__ (line 70) | def __init__(self, method adjust_channels (line 90) | def adjust_channels(channels: int, width_multi: float): class InvertedResidual (line 94) | class InvertedResidual(nn.Module): method __init__ (line 95) | def __init__(self, method forward (line 141) | def forward(self, x: Tensor) -> Tensor: class MobileNetV3 (line 149) | class MobileNetV3(nn.Module): method __init__ (line 150) | def __init__(self, method _forward_impl (line 212) | def _forward_impl(self, x: Tensor) -> Tensor: method forward (line 220) | def forward(self, x: Tensor) -> Tensor: function mobilenet_v3_large (line 224) | def mobilenet_v3_large(num_classes: int = 1000, function mobilenet_v3_small (line 273) | def mobilenet_v3_small(num_classes: int = 1000, FILE: pytorch_segmentation/deeplab_v3/src/resnet_backbone.py function conv3x3 (line 5) | def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): function conv1x1 (line 11) | def conv1x1(in_planes, out_planes, stride=1): class Bottleneck (line 16) | class Bottleneck(nn.Module): method __init__ (line 25) | def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1, method forward (line 42) | def forward(self, x): class ResNet (line 65) | class ResNet(nn.Module): method __init__ (line 67) | def __init__(self, block, layers, num_classes=1000, zero_init_residual... method _make_layer (line 116) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method _forward_impl (line 140) | def _forward_impl(self, x): method forward (line 158) | def forward(self, x): function _resnet (line 162) | def _resnet(block, layers, **kwargs): function resnet50 (line 167) | def resnet50(**kwargs): function resnet101 (line 178) | def resnet101(**kwargs): FILE: pytorch_segmentation/deeplab_v3/train.py class SegmentationPresetTrain (line 13) | class SegmentationPresetTrain: method __init__ (line 14) | def __init__(self, base_size, crop_size, hflip_prob=0.5, mean=(0.485, ... method __call__ (line 28) | def __call__(self, img, target): class SegmentationPresetEval (line 32) | class SegmentationPresetEval: method __init__ (line 33) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 40) | def __call__(self, img, target): function get_transform (line 44) | def get_transform(train): function create_model (line 51) | def create_model(aux, num_classes, pretrain=True): function main (line 72) | def main(args): function parse_args (line 178) | def parse_args(): FILE: pytorch_segmentation/deeplab_v3/train_multi_GPU.py class SegmentationPresetTrain (line 13) | class SegmentationPresetTrain: method __init__ (line 14) | def __init__(self, base_size, crop_size, hflip_prob=0.5, mean=(0.485, ... method __call__ (line 28) | def __call__(self, img, target): class SegmentationPresetEval (line 32) | class SegmentationPresetEval: method __init__ (line 33) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 40) | def __call__(self, img, target): function get_transform (line 44) | def get_transform(train): function create_model (line 51) | def create_model(aux, num_classes): function main (line 70) | def main(args): FILE: pytorch_segmentation/deeplab_v3/train_utils/distributed_utils.py class SmoothedValue (line 11) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): class ConfusionMatrix (line 73) | class ConfusionMatrix(object): method __init__ (line 74) | def __init__(self, num_classes): method update (line 78) | def update(self, a, b): method reset (line 90) | def reset(self): method compute (line 94) | def compute(self): method reduce_from_all_processes (line 104) | def reduce_from_all_processes(self): method __str__ (line 112) | def __str__(self): class MetricLogger (line 125) | class MetricLogger(object): method __init__ (line 126) | def __init__(self, delimiter="\t"): method update (line 130) | def update(self, **kwargs): method __getattr__ (line 137) | def __getattr__(self, attr): method __str__ (line 145) | def __str__(self): method synchronize_between_processes (line 153) | def synchronize_between_processes(self): method add_meter (line 157) | def add_meter(self, name, meter): method log_every (line 160) | def log_every(self, iterable, print_freq, header=None): function mkdir (line 214) | def mkdir(path): function setup_for_distributed (line 222) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 237) | def is_dist_avail_and_initialized(): function get_world_size (line 245) | def get_world_size(): function get_rank (line 251) | def get_rank(): function is_main_process (line 257) | def is_main_process(): function save_on_master (line 261) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 266) | def init_distributed_mode(args): FILE: pytorch_segmentation/deeplab_v3/train_utils/train_and_eval.py function criterion (line 6) | def criterion(inputs, target): function evaluate (line 18) | def evaluate(model, data_loader, device, num_classes): function train_one_epoch (line 36) | def train_one_epoch(model, optimizer, data_loader, device, epoch, lr_sch... function create_lr_scheduler (line 65) | def create_lr_scheduler(optimizer, FILE: pytorch_segmentation/deeplab_v3/transforms.py function pad_if_smaller (line 9) | def pad_if_smaller(img, size, fill=0): class Compose (line 20) | class Compose(object): method __init__ (line 21) | def __init__(self, transforms): method __call__ (line 24) | def __call__(self, image, target): class RandomResize (line 30) | class RandomResize(object): method __init__ (line 31) | def __init__(self, min_size, max_size=None): method __call__ (line 37) | def __call__(self, image, target): class RandomHorizontalFlip (line 47) | class RandomHorizontalFlip(object): method __init__ (line 48) | def __init__(self, flip_prob): method __call__ (line 51) | def __call__(self, image, target): class RandomCrop (line 58) | class RandomCrop(object): method __init__ (line 59) | def __init__(self, size): method __call__ (line 62) | def __call__(self, image, target): class CenterCrop (line 71) | class CenterCrop(object): method __init__ (line 72) | def __init__(self, size): method __call__ (line 75) | def __call__(self, image, target): class ToTensor (line 81) | class ToTensor(object): method __call__ (line 82) | def __call__(self, image, target): class Normalize (line 88) | class Normalize(object): method __init__ (line 89) | def __init__(self, mean, std): method __call__ (line 93) | def __call__(self, image, target): FILE: pytorch_segmentation/deeplab_v3/validation.py class SegmentationPresetEval (line 10) | class SegmentationPresetEval: method __init__ (line 11) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 18) | def __call__(self, img, target): function main (line 22) | def main(args): function parse_args (line 50) | def parse_args(): FILE: pytorch_segmentation/fcn/my_dataset.py class VOCSegmentation (line 7) | class VOCSegmentation(data.Dataset): method __init__ (line 8) | def __init__(self, voc_root, year="2012", transforms=None, txt_name: s... method __getitem__ (line 26) | def __getitem__(self, index): method __len__ (line 42) | def __len__(self): method collate_fn (line 46) | def collate_fn(batch): function cat_list (line 53) | def cat_list(images, fill_value=0): FILE: pytorch_segmentation/fcn/predict.py function time_synchronized (line 13) | def time_synchronized(): function main (line 18) | def main(): FILE: pytorch_segmentation/fcn/src/backbone.py function conv3x3 (line 5) | def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): function conv1x1 (line 11) | def conv1x1(in_planes, out_planes, stride=1): class Bottleneck (line 16) | class Bottleneck(nn.Module): method __init__ (line 25) | def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1, method forward (line 42) | def forward(self, x): class ResNet (line 65) | class ResNet(nn.Module): method __init__ (line 67) | def __init__(self, block, layers, num_classes=1000, zero_init_residual... method _make_layer (line 116) | def _make_layer(self, block, planes, blocks, stride=1, dilate=False): method _forward_impl (line 140) | def _forward_impl(self, x): method forward (line 158) | def forward(self, x): function _resnet (line 162) | def _resnet(block, layers, **kwargs): function resnet50 (line 167) | def resnet50(**kwargs): function resnet101 (line 178) | def resnet101(**kwargs): FILE: pytorch_segmentation/fcn/src/fcn_model.py class IntermediateLayerGetter (line 11) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 36) | def __init__(self, model: nn.Module, return_layers: Dict[str, str]) ->... method forward (line 54) | def forward(self, x: Tensor) -> Dict[str, Tensor]: class FCN (line 64) | class FCN(nn.Module): method __init__ (line 79) | def __init__(self, backbone, classifier, aux_classifier=None): method forward (line 85) | def forward(self, x: Tensor) -> Dict[str, Tensor]: class FCNHead (line 107) | class FCNHead(nn.Sequential): method __init__ (line 108) | def __init__(self, in_channels, channels): function fcn_resnet50 (line 121) | def fcn_resnet50(aux, num_classes=21, pretrain_backbone=False): function fcn_resnet101 (line 150) | def fcn_resnet101(aux, num_classes=21, pretrain_backbone=False): FILE: pytorch_segmentation/fcn/train.py class SegmentationPresetTrain (line 13) | class SegmentationPresetTrain: method __init__ (line 14) | def __init__(self, base_size, crop_size, hflip_prob=0.5, mean=(0.485, ... method __call__ (line 28) | def __call__(self, img, target): class SegmentationPresetEval (line 32) | class SegmentationPresetEval: method __init__ (line 33) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 40) | def __call__(self, img, target): function get_transform (line 44) | def get_transform(train): function create_model (line 51) | def create_model(aux, num_classes, pretrain=True): function main (line 72) | def main(args): function parse_args (line 168) | def parse_args(): FILE: pytorch_segmentation/fcn/train_multi_GPU.py class SegmentationPresetTrain (line 13) | class SegmentationPresetTrain: method __init__ (line 14) | def __init__(self, base_size, crop_size, hflip_prob=0.5, mean=(0.485, ... method __call__ (line 28) | def __call__(self, img, target): class SegmentationPresetEval (line 32) | class SegmentationPresetEval: method __init__ (line 33) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 40) | def __call__(self, img, target): function get_transform (line 44) | def get_transform(train): function create_model (line 51) | def create_model(aux, num_classes): function main (line 70) | def main(args): FILE: pytorch_segmentation/fcn/train_utils/distributed_utils.py class SmoothedValue (line 11) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): class ConfusionMatrix (line 73) | class ConfusionMatrix(object): method __init__ (line 74) | def __init__(self, num_classes): method update (line 78) | def update(self, a, b): method reset (line 90) | def reset(self): method compute (line 94) | def compute(self): method reduce_from_all_processes (line 104) | def reduce_from_all_processes(self): method __str__ (line 112) | def __str__(self): class MetricLogger (line 125) | class MetricLogger(object): method __init__ (line 126) | def __init__(self, delimiter="\t"): method update (line 130) | def update(self, **kwargs): method __getattr__ (line 137) | def __getattr__(self, attr): method __str__ (line 145) | def __str__(self): method synchronize_between_processes (line 153) | def synchronize_between_processes(self): method add_meter (line 157) | def add_meter(self, name, meter): method log_every (line 160) | def log_every(self, iterable, print_freq, header=None): function mkdir (line 214) | def mkdir(path): function setup_for_distributed (line 222) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 237) | def is_dist_avail_and_initialized(): function get_world_size (line 245) | def get_world_size(): function get_rank (line 251) | def get_rank(): function is_main_process (line 257) | def is_main_process(): function save_on_master (line 261) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 266) | def init_distributed_mode(args): FILE: pytorch_segmentation/fcn/train_utils/train_and_eval.py function criterion (line 6) | def criterion(inputs, target): function evaluate (line 18) | def evaluate(model, data_loader, device, num_classes): function train_one_epoch (line 36) | def train_one_epoch(model, optimizer, data_loader, device, epoch, lr_sch... function create_lr_scheduler (line 65) | def create_lr_scheduler(optimizer, FILE: pytorch_segmentation/fcn/transforms.py function pad_if_smaller (line 9) | def pad_if_smaller(img, size, fill=0): class Compose (line 20) | class Compose(object): method __init__ (line 21) | def __init__(self, transforms): method __call__ (line 24) | def __call__(self, image, target): class RandomResize (line 30) | class RandomResize(object): method __init__ (line 31) | def __init__(self, min_size, max_size=None): method __call__ (line 37) | def __call__(self, image, target): class RandomHorizontalFlip (line 47) | class RandomHorizontalFlip(object): method __init__ (line 48) | def __init__(self, flip_prob): method __call__ (line 51) | def __call__(self, image, target): class RandomCrop (line 58) | class RandomCrop(object): method __init__ (line 59) | def __init__(self, size): method __call__ (line 62) | def __call__(self, image, target): class CenterCrop (line 71) | class CenterCrop(object): method __init__ (line 72) | def __init__(self, size): method __call__ (line 75) | def __call__(self, image, target): class ToTensor (line 81) | class ToTensor(object): method __call__ (line 82) | def __call__(self, image, target): class Normalize (line 88) | class Normalize(object): method __init__ (line 89) | def __init__(self, mean, std): method __call__ (line 93) | def __call__(self, image, target): FILE: pytorch_segmentation/fcn/validation.py class SegmentationPresetEval (line 10) | class SegmentationPresetEval: method __init__ (line 11) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 18) | def __call__(self, img, target): function main (line 22) | def main(args): function parse_args (line 50) | def parse_args(): FILE: pytorch_segmentation/lraspp/my_dataset.py class VOCSegmentation (line 7) | class VOCSegmentation(data.Dataset): method __init__ (line 8) | def __init__(self, voc_root, year="2012", transforms=None, txt_name: s... method __getitem__ (line 26) | def __getitem__(self, index): method __len__ (line 42) | def __len__(self): method collate_fn (line 46) | def collate_fn(batch): function cat_list (line 53) | def cat_list(images, fill_value=0): FILE: pytorch_segmentation/lraspp/predict.py function time_synchronized (line 13) | def time_synchronized(): function main (line 18) | def main(): FILE: pytorch_segmentation/lraspp/src/lraspp_model.py class IntermediateLayerGetter (line 11) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 36) | def __init__(self, model: nn.Module, return_layers: Dict[str, str]) ->... method forward (line 54) | def forward(self, x: Tensor) -> Dict[str, Tensor]: class LRASPP (line 64) | class LRASPP(nn.Module): method __init__ (line 81) | def __init__(self, method forward (line 91) | def forward(self, x: Tensor) -> Dict[str, Tensor]: class LRASPPHead (line 103) | class LRASPPHead(nn.Module): method __init__ (line 104) | def __init__(self, method forward (line 123) | def forward(self, inputs: Dict[str, Tensor]) -> Tensor: function lraspp_mobilenetv3_large (line 135) | def lraspp_mobilenetv3_large(num_classes=21, pretrain_backbone=False): FILE: pytorch_segmentation/lraspp/src/mobilenet_backbone.py function _make_divisible (line 9) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNActivation (line 25) | class ConvBNActivation(nn.Sequential): method __init__ (line 26) | def __init__(self, class SqueezeExcitation (line 53) | class SqueezeExcitation(nn.Module): method __init__ (line 54) | def __init__(self, input_c: int, squeeze_factor: int = 4): method forward (line 60) | def forward(self, x: Tensor) -> Tensor: class InvertedResidualConfig (line 69) | class InvertedResidualConfig: method __init__ (line 70) | def __init__(self, method adjust_channels (line 90) | def adjust_channels(channels: int, width_multi: float): class InvertedResidual (line 94) | class InvertedResidual(nn.Module): method __init__ (line 95) | def __init__(self, method forward (line 141) | def forward(self, x: Tensor) -> Tensor: class MobileNetV3 (line 149) | class MobileNetV3(nn.Module): method __init__ (line 150) | def __init__(self, method _forward_impl (line 212) | def _forward_impl(self, x: Tensor) -> Tensor: method forward (line 220) | def forward(self, x: Tensor) -> Tensor: function mobilenet_v3_large (line 224) | def mobilenet_v3_large(num_classes: int = 1000, function mobilenet_v3_small (line 273) | def mobilenet_v3_small(num_classes: int = 1000, FILE: pytorch_segmentation/lraspp/train.py class SegmentationPresetTrain (line 13) | class SegmentationPresetTrain: method __init__ (line 14) | def __init__(self, base_size, crop_size, hflip_prob=0.5, mean=(0.485, ... method __call__ (line 28) | def __call__(self, img, target): class SegmentationPresetEval (line 32) | class SegmentationPresetEval: method __init__ (line 33) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 40) | def __call__(self, img, target): function get_transform (line 44) | def get_transform(train): function create_model (line 51) | def create_model(num_classes, pretrain=True): function main (line 72) | def main(args): function parse_args (line 164) | def parse_args(): FILE: pytorch_segmentation/lraspp/train_multi_GPU.py class SegmentationPresetTrain (line 13) | class SegmentationPresetTrain: method __init__ (line 14) | def __init__(self, base_size, crop_size, hflip_prob=0.5, mean=(0.485, ... method __call__ (line 28) | def __call__(self, img, target): class SegmentationPresetEval (line 32) | class SegmentationPresetEval: method __init__ (line 33) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 40) | def __call__(self, img, target): function get_transform (line 44) | def get_transform(train): function create_model (line 51) | def create_model(num_classes): function main (line 70) | def main(args): FILE: pytorch_segmentation/lraspp/train_utils/distributed_utils.py class SmoothedValue (line 11) | class SmoothedValue(object): method __init__ (line 16) | def __init__(self, window_size=20, fmt=None): method update (line 24) | def update(self, value, n=1): method synchronize_between_processes (line 29) | def synchronize_between_processes(self): method median (line 43) | def median(self): method avg (line 48) | def avg(self): method global_avg (line 53) | def global_avg(self): method max (line 57) | def max(self): method value (line 61) | def value(self): method __str__ (line 64) | def __str__(self): class ConfusionMatrix (line 73) | class ConfusionMatrix(object): method __init__ (line 74) | def __init__(self, num_classes): method update (line 78) | def update(self, a, b): method reset (line 90) | def reset(self): method compute (line 94) | def compute(self): method reduce_from_all_processes (line 104) | def reduce_from_all_processes(self): method __str__ (line 112) | def __str__(self): class MetricLogger (line 125) | class MetricLogger(object): method __init__ (line 126) | def __init__(self, delimiter="\t"): method update (line 130) | def update(self, **kwargs): method __getattr__ (line 137) | def __getattr__(self, attr): method __str__ (line 145) | def __str__(self): method synchronize_between_processes (line 153) | def synchronize_between_processes(self): method add_meter (line 157) | def add_meter(self, name, meter): method log_every (line 160) | def log_every(self, iterable, print_freq, header=None): function mkdir (line 214) | def mkdir(path): function setup_for_distributed (line 222) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 237) | def is_dist_avail_and_initialized(): function get_world_size (line 245) | def get_world_size(): function get_rank (line 251) | def get_rank(): function is_main_process (line 257) | def is_main_process(): function save_on_master (line 261) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 266) | def init_distributed_mode(args): FILE: pytorch_segmentation/lraspp/train_utils/train_and_eval.py function criterion (line 6) | def criterion(inputs, target): function evaluate (line 18) | def evaluate(model, data_loader, device, num_classes): function train_one_epoch (line 36) | def train_one_epoch(model, optimizer, data_loader, device, epoch, lr_sch... function create_lr_scheduler (line 65) | def create_lr_scheduler(optimizer, FILE: pytorch_segmentation/lraspp/transforms.py function pad_if_smaller (line 9) | def pad_if_smaller(img, size, fill=0): class Compose (line 20) | class Compose(object): method __init__ (line 21) | def __init__(self, transforms): method __call__ (line 24) | def __call__(self, image, target): class RandomResize (line 30) | class RandomResize(object): method __init__ (line 31) | def __init__(self, min_size, max_size=None): method __call__ (line 37) | def __call__(self, image, target): class RandomHorizontalFlip (line 47) | class RandomHorizontalFlip(object): method __init__ (line 48) | def __init__(self, flip_prob): method __call__ (line 51) | def __call__(self, image, target): class RandomCrop (line 58) | class RandomCrop(object): method __init__ (line 59) | def __init__(self, size): method __call__ (line 62) | def __call__(self, image, target): class CenterCrop (line 71) | class CenterCrop(object): method __init__ (line 72) | def __init__(self, size): method __call__ (line 75) | def __call__(self, image, target): class ToTensor (line 81) | class ToTensor(object): method __call__ (line 82) | def __call__(self, image, target): class Normalize (line 88) | class Normalize(object): method __init__ (line 89) | def __init__(self, mean, std): method __call__ (line 93) | def __call__(self, image, target): FILE: pytorch_segmentation/lraspp/validation.py class SegmentationPresetEval (line 10) | class SegmentationPresetEval: method __init__ (line 11) | def __init__(self, base_size, mean=(0.485, 0.456, 0.406), std=(0.229, ... method __call__ (line 18) | def __call__(self, img, target): function main (line 22) | def main(args): function parse_args (line 50) | def parse_args(): FILE: pytorch_segmentation/u2net/convert_weight.py function convert_conv_bn (line 9) | def convert_conv_bn(new_weight, prefix, ks, v): function convert (line 35) | def convert(old_weight: dict): function main_1 (line 100) | def main_1(): function main (line 127) | def main(): FILE: pytorch_segmentation/u2net/my_dataset.py class DUTSDataset (line 7) | class DUTSDataset(data.Dataset): method __init__ (line 8) | def __init__(self, root: str, train: bool = True, transforms=None): method __getitem__ (line 36) | def __getitem__(self, idx): method __len__ (line 52) | def __len__(self): method collate_fn (line 56) | def collate_fn(batch): function cat_list (line 64) | def cat_list(images, fill_value=0): FILE: pytorch_segmentation/u2net/predict.py function time_synchronized (line 13) | def time_synchronized(): function main (line 18) | def main(): FILE: pytorch_segmentation/u2net/src/model.py class ConvBNReLU (line 7) | class ConvBNReLU(nn.Module): method __init__ (line 8) | def __init__(self, in_ch: int, out_ch: int, kernel_size: int = 3, dila... method forward (line 16) | def forward(self, x: torch.Tensor) -> torch.Tensor: class DownConvBNReLU (line 20) | class DownConvBNReLU(ConvBNReLU): method __init__ (line 21) | def __init__(self, in_ch: int, out_ch: int, kernel_size: int = 3, dila... method forward (line 25) | def forward(self, x: torch.Tensor) -> torch.Tensor: class UpConvBNReLU (line 32) | class UpConvBNReLU(ConvBNReLU): method __init__ (line 33) | def __init__(self, in_ch: int, out_ch: int, kernel_size: int = 3, dila... method forward (line 37) | def forward(self, x1: torch.Tensor, x2: torch.Tensor) -> torch.Tensor: class RSU (line 43) | class RSU(nn.Module): method __init__ (line 44) | def __init__(self, height: int, in_ch: int, mid_ch: int, out_ch: int): method forward (line 60) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RSU4F (line 77) | class RSU4F(nn.Module): method __init__ (line 78) | def __init__(self, in_ch: int, mid_ch: int, out_ch: int): method forward (line 90) | def forward(self, x: torch.Tensor) -> torch.Tensor: class U2Net (line 107) | class U2Net(nn.Module): method __init__ (line 108) | def __init__(self, cfg: dict, out_ch: int = 1): method forward (line 137) | def forward(self, x: torch.Tensor) -> Union[torch.Tensor, List[torch.T... function u2net_full (line 173) | def u2net_full(out_ch: int = 1): function u2net_lite (line 193) | def u2net_lite(out_ch: int = 1): function convert_onnx (line 213) | def convert_onnx(m, save_path): FILE: pytorch_segmentation/u2net/train.py class SODPresetTrain (line 15) | class SODPresetTrain: method __init__ (line 16) | def __init__(self, base_size: Union[int, List[int]], crop_size: int, method __call__ (line 26) | def __call__(self, img, target): class SODPresetEval (line 30) | class SODPresetEval: method __init__ (line 31) | def __init__(self, base_size: Union[int, List[int]], mean=(0.485, 0.45... method __call__ (line 38) | def __call__(self, img, target): function main (line 42) | def main(args): function parse_args (line 126) | def parse_args(): FILE: pytorch_segmentation/u2net/train_multi_GPU.py class SODPresetTrain (line 16) | class SODPresetTrain: method __init__ (line 17) | def __init__(self, base_size: Union[int, List[int]], crop_size: int, method __call__ (line 27) | def __call__(self, img, target): class SODPresetEval (line 31) | class SODPresetEval: method __init__ (line 32) | def __init__(self, base_size: Union[int, List[int]], mean=(0.485, 0.45... method __call__ (line 39) | def __call__(self, img, target): function main (line 43) | def main(args): FILE: pytorch_segmentation/u2net/train_utils/distributed_utils.py class SmoothedValue (line 12) | class SmoothedValue(object): method __init__ (line 17) | def __init__(self, window_size=20, fmt=None): method update (line 25) | def update(self, value, n=1): method synchronize_between_processes (line 30) | def synchronize_between_processes(self): method median (line 44) | def median(self): method avg (line 49) | def avg(self): method global_avg (line 54) | def global_avg(self): method max (line 58) | def max(self): method value (line 62) | def value(self): method __str__ (line 65) | def __str__(self): function all_gather (line 74) | def all_gather(data): class MeanAbsoluteError (line 93) | class MeanAbsoluteError(object): method __init__ (line 94) | def __init__(self): method update (line 97) | def update(self, pred: torch.Tensor, gt: torch.Tensor): method compute (line 104) | def compute(self): method gather_from_all_processes (line 108) | def gather_from_all_processes(self): method __str__ (line 119) | def __str__(self): class F1Score (line 124) | class F1Score(object): method __init__ (line 129) | def __init__(self, threshold: float = 0.5): method update (line 135) | def update(self, pred: torch.Tensor, gt: torch.Tensor): method compute (line 170) | def compute(self): method reduce_from_all_processes (line 177) | def reduce_from_all_processes(self): method __str__ (line 187) | def __str__(self): class MetricLogger (line 192) | class MetricLogger(object): method __init__ (line 193) | def __init__(self, delimiter="\t"): method update (line 197) | def update(self, **kwargs): method __getattr__ (line 204) | def __getattr__(self, attr): method __str__ (line 212) | def __str__(self): method synchronize_between_processes (line 220) | def synchronize_between_processes(self): method add_meter (line 224) | def add_meter(self, name, meter): method log_every (line 227) | def log_every(self, iterable, print_freq, header=None): function mkdir (line 281) | def mkdir(path): function setup_for_distributed (line 289) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 304) | def is_dist_avail_and_initialized(): function get_world_size (line 312) | def get_world_size(): function get_rank (line 318) | def get_rank(): function is_main_process (line 324) | def is_main_process(): function save_on_master (line 328) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 333) | def init_distributed_mode(args): FILE: pytorch_segmentation/u2net/train_utils/train_and_eval.py function criterion (line 7) | def criterion(inputs, target): function evaluate (line 14) | def evaluate(model, data_loader, device): function train_one_epoch (line 39) | def train_one_epoch(model, optimizer, data_loader, device, epoch, lr_sch... function create_lr_scheduler (line 68) | def create_lr_scheduler(optimizer, function get_params_groups (line 97) | def get_params_groups(model: torch.nn.Module, weight_decay: float = 1e-4): FILE: pytorch_segmentation/u2net/transforms.py class Compose (line 7) | class Compose(object): method __init__ (line 8) | def __init__(self, transforms): method __call__ (line 11) | def __call__(self, image, target=None): class ToTensor (line 18) | class ToTensor(object): method __call__ (line 19) | def __call__(self, image, target): class RandomHorizontalFlip (line 25) | class RandomHorizontalFlip(object): method __init__ (line 26) | def __init__(self, prob): method __call__ (line 29) | def __call__(self, image, target): class Normalize (line 36) | class Normalize(object): method __init__ (line 37) | def __init__(self, mean, std): method __call__ (line 41) | def __call__(self, image, target): class Resize (line 46) | class Resize(object): method __init__ (line 47) | def __init__(self, size: Union[int, List[int]], resize_mask: bool = Tr... method __call__ (line 51) | def __call__(self, image, target=None): class RandomCrop (line 59) | class RandomCrop(object): method __init__ (line 60) | def __init__(self, size: int): method pad_if_smaller (line 63) | def pad_if_smaller(self, img, fill=0): method __call__ (line 73) | def __call__(self, image, target): FILE: pytorch_segmentation/u2net/validation.py class SODPresetEval (line 13) | class SODPresetEval: method __init__ (line 14) | def __init__(self, base_size: Union[int, List[int]], mean=(0.485, 0.45... method __call__ (line 21) | def __call__(self, img, target): function main (line 25) | def main(args): function parse_args (line 51) | def parse_args(): FILE: pytorch_segmentation/unet/compute_mean_std.py function main (line 6) | def main(): FILE: pytorch_segmentation/unet/my_dataset.py class DriveDataset (line 7) | class DriveDataset(Dataset): method __init__ (line 8) | def __init__(self, root: str, train: bool, transforms=None): method __getitem__ (line 30) | def __getitem__(self, idx): method __len__ (line 46) | def __len__(self): method collate_fn (line 50) | def collate_fn(batch): function cat_list (line 57) | def cat_list(images, fill_value=0): FILE: pytorch_segmentation/unet/predict.py function time_synchronized (line 12) | def time_synchronized(): function main (line 17) | def main(): FILE: pytorch_segmentation/unet/src/mobilenet_unet.py class IntermediateLayerGetter (line 11) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 36) | def __init__(self, model: nn.Module, return_layers: Dict[str, str]) ->... method forward (line 54) | def forward(self, x: Tensor) -> Dict[str, Tensor]: class MobileV3Unet (line 64) | class MobileV3Unet(nn.Module): method __init__ (line 65) | def __init__(self, num_classes, pretrain_backbone: bool = False): method forward (line 91) | def forward(self, x: torch.Tensor) -> Dict[str, torch.Tensor]: FILE: pytorch_segmentation/unet/src/unet.py class DoubleConv (line 7) | class DoubleConv(nn.Sequential): method __init__ (line 8) | def __init__(self, in_channels, out_channels, mid_channels=None): class Down (line 21) | class Down(nn.Sequential): method __init__ (line 22) | def __init__(self, in_channels, out_channels): class Up (line 29) | class Up(nn.Module): method __init__ (line 30) | def __init__(self, in_channels, out_channels, bilinear=True): method forward (line 39) | def forward(self, x1: torch.Tensor, x2: torch.Tensor) -> torch.Tensor: class OutConv (line 54) | class OutConv(nn.Sequential): method __init__ (line 55) | def __init__(self, in_channels, num_classes): class UNet (line 61) | class UNet(nn.Module): method __init__ (line 62) | def __init__(self, method forward (line 84) | def forward(self, x: torch.Tensor) -> Dict[str, torch.Tensor]: FILE: pytorch_segmentation/unet/src/vgg_unet.py class IntermediateLayerGetter (line 11) | class IntermediateLayerGetter(nn.ModuleDict): method __init__ (line 36) | def __init__(self, model: nn.Module, return_layers: Dict[str, str]) ->... method forward (line 54) | def forward(self, x: Tensor) -> Dict[str, Tensor]: class VGG16UNet (line 64) | class VGG16UNet(nn.Module): method __init__ (line 65) | def __init__(self, num_classes, pretrain_backbone: bool = False): method forward (line 91) | def forward(self, x: torch.Tensor) -> Dict[str, torch.Tensor]: FILE: pytorch_segmentation/unet/train.py class SegmentationPresetTrain (line 13) | class SegmentationPresetTrain: method __init__ (line 14) | def __init__(self, base_size, crop_size, hflip_prob=0.5, vflip_prob=0.5, method __call__ (line 31) | def __call__(self, img, target): class SegmentationPresetEval (line 35) | class SegmentationPresetEval: method __init__ (line 36) | def __init__(self, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.22... method __call__ (line 42) | def __call__(self, img, target): function get_transform (line 46) | def get_transform(train, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, ... function create_model (line 56) | def create_model(num_classes): function main (line 61) | def main(args): function parse_args (line 163) | def parse_args(): FILE: pytorch_segmentation/unet/train_multi_GPU.py class SegmentationPresetTrain (line 13) | class SegmentationPresetTrain: method __init__ (line 14) | def __init__(self, base_size, crop_size, hflip_prob=0.5, vflip_prob=0.5, method __call__ (line 31) | def __call__(self, img, target): class SegmentationPresetEval (line 35) | class SegmentationPresetEval: method __init__ (line 36) | def __init__(self, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.22... method __call__ (line 42) | def __call__(self, img, target): function get_transform (line 46) | def get_transform(train, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, ... function create_model (line 56) | def create_model(num_classes): function main (line 61) | def main(args): FILE: pytorch_segmentation/unet/train_utils/dice_coefficient_loss.py function build_target (line 5) | def build_target(target: torch.Tensor, num_classes: int = 2, ignore_inde... function dice_coeff (line 20) | def dice_coeff(x: torch.Tensor, target: torch.Tensor, ignore_index: int ... function multiclass_dice_coeff (line 43) | def multiclass_dice_coeff(x: torch.Tensor, target: torch.Tensor, ignore_... function dice_loss (line 52) | def dice_loss(x: torch.Tensor, target: torch.Tensor, multiclass: bool = ... FILE: pytorch_segmentation/unet/train_utils/distributed_utils.py class SmoothedValue (line 14) | class SmoothedValue(object): method __init__ (line 19) | def __init__(self, window_size=20, fmt=None): method update (line 27) | def update(self, value, n=1): method synchronize_between_processes (line 32) | def synchronize_between_processes(self): method median (line 46) | def median(self): method avg (line 51) | def avg(self): method global_avg (line 56) | def global_avg(self): method max (line 60) | def max(self): method value (line 64) | def value(self): method __str__ (line 67) | def __str__(self): class ConfusionMatrix (line 76) | class ConfusionMatrix(object): method __init__ (line 77) | def __init__(self, num_classes): method update (line 81) | def update(self, a, b): method reset (line 93) | def reset(self): method compute (line 97) | def compute(self): method reduce_from_all_processes (line 107) | def reduce_from_all_processes(self): method __str__ (line 115) | def __str__(self): class DiceCoefficient (line 128) | class DiceCoefficient(object): method __init__ (line 129) | def __init__(self, num_classes: int = 2, ignore_index: int = -100): method update (line 135) | def update(self, pred, target): method value (line 147) | def value(self): method reset (line 153) | def reset(self): method reduce_from_all_processes (line 160) | def reduce_from_all_processes(self): class MetricLogger (line 170) | class MetricLogger(object): method __init__ (line 171) | def __init__(self, delimiter="\t"): method update (line 175) | def update(self, **kwargs): method __getattr__ (line 182) | def __getattr__(self, attr): method __str__ (line 190) | def __str__(self): method synchronize_between_processes (line 198) | def synchronize_between_processes(self): method add_meter (line 202) | def add_meter(self, name, meter): method log_every (line 205) | def log_every(self, iterable, print_freq, header=None): function mkdir (line 259) | def mkdir(path): function setup_for_distributed (line 267) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 282) | def is_dist_avail_and_initialized(): function get_world_size (line 290) | def get_world_size(): function get_rank (line 296) | def get_rank(): function is_main_process (line 302) | def is_main_process(): function save_on_master (line 306) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 311) | def init_distributed_mode(args): FILE: pytorch_segmentation/unet/train_utils/train_and_eval.py function criterion (line 7) | def criterion(inputs, target, loss_weight=None, num_classes: int = 2, di... function evaluate (line 23) | def evaluate(model, data_loader, device, num_classes): function train_one_epoch (line 44) | def train_one_epoch(model, optimizer, data_loader, device, epoch, num_cl... function create_lr_scheduler (line 80) | def create_lr_scheduler(optimizer, FILE: pytorch_segmentation/unet/transforms.py function pad_if_smaller (line 9) | def pad_if_smaller(img, size, fill=0): class Compose (line 20) | class Compose(object): method __init__ (line 21) | def __init__(self, transforms): method __call__ (line 24) | def __call__(self, image, target): class RandomResize (line 30) | class RandomResize(object): method __init__ (line 31) | def __init__(self, min_size, max_size=None): method __call__ (line 37) | def __call__(self, image, target): class RandomHorizontalFlip (line 47) | class RandomHorizontalFlip(object): method __init__ (line 48) | def __init__(self, flip_prob): method __call__ (line 51) | def __call__(self, image, target): class RandomVerticalFlip (line 58) | class RandomVerticalFlip(object): method __init__ (line 59) | def __init__(self, flip_prob): method __call__ (line 62) | def __call__(self, image, target): class RandomCrop (line 69) | class RandomCrop(object): method __init__ (line 70) | def __init__(self, size): method __call__ (line 73) | def __call__(self, image, target): class CenterCrop (line 82) | class CenterCrop(object): method __init__ (line 83) | def __init__(self, size): method __call__ (line 86) | def __call__(self, image, target): class ToTensor (line 92) | class ToTensor(object): method __call__ (line 93) | def __call__(self, image, target): class Normalize (line 99) | class Normalize(object): method __init__ (line 100) | def __init__(self, mean, std): method __call__ (line 104) | def __call__(self, image, target): FILE: tensorflow_classification/ConfusionMatrix/main.py class ConfusionMatrix (line 16) | class ConfusionMatrix(object): method __init__ (line 22) | def __init__(self, num_classes: int, labels: list): method update (line 27) | def update(self, preds, labels): method summary (line 31) | def summary(self): method plot (line 53) | def plot(self): function pre_function (line 93) | def pre_function(img): FILE: tensorflow_classification/ConfusionMatrix/model.py function _make_divisible (line 4) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNReLU (line 20) | class ConvBNReLU(layers.Layer): method __init__ (line 21) | def __init__(self, out_channel, kernel_size=3, stride=1, **kwargs): method call (line 28) | def call(self, inputs, training=False, **kwargs): class InvertedResidual (line 35) | class InvertedResidual(layers.Layer): method __init__ (line 36) | def __init__(self, in_channel, out_channel, stride, expand_ratio, **kw... method call (line 58) | def call(self, inputs, **kwargs): function MobileNetV2 (line 65) | def MobileNetV2(im_height=224, im_width=224, num_classes=1000, alpha=1.0... FILE: tensorflow_classification/ConvNeXt/model.py class Block (line 15) | class Block(layers.Layer): method __init__ (line 22) | def __init__(self, dim, drop_rate=0., layer_scale_init_value=1e-6, nam... method build (line 42) | def build(self, input_shape): method call (line 52) | def call(self, x, training=False): class Stem (line 69) | class Stem(layers.Layer): method __init__ (line 70) | def __init__(self, dim, name: str = None): method call (line 81) | def call(self, x, training=False): class DownSample (line 87) | class DownSample(layers.Layer): method __init__ (line 88) | def __init__(self, dim, name: str = None): method call (line 99) | def call(self, x, training=False): class ConvNeXt (line 105) | class ConvNeXt(Model): method __init__ (line 116) | def __init__(self, num_classes: int, depths: list, dims: list, drop_pa... method call (line 159) | def call(self, x, training=False): function convnext_tiny (line 182) | def convnext_tiny(num_classes: int): function convnext_small (line 189) | def convnext_small(num_classes: int): function convnext_base (line 196) | def convnext_base(num_classes: int): function convnext_large (line 203) | def convnext_large(num_classes: int): function convnext_xlarge (line 210) | def convnext_xlarge(num_classes: int): FILE: tensorflow_classification/ConvNeXt/predict.py function main (line 13) | def main(): FILE: tensorflow_classification/ConvNeXt/train.py function main (line 15) | def main(): FILE: tensorflow_classification/ConvNeXt/trans_weights.py function transpose_weights (line 5) | def transpose_weights(m_type, w_dict, k, v): function main (line 26) | def main(weights_path: str, FILE: tensorflow_classification/ConvNeXt/utils.py function read_split_data (line 11) | def read_split_data(root: str, val_rate: float = 0.2): function generate_ds (line 77) | def generate_ds(data_root: str, function cosine_rate (line 155) | def cosine_rate(now_step, total_step, end_lr_rate): function cosine_scheduler (line 160) | def cosine_scheduler(initial_lr, epochs, steps, warmup_epochs=1, end_lr_... FILE: tensorflow_classification/Test11_efficientnetV2/model.py class SE (line 31) | class SE(layers.Layer): method __init__ (line 32) | def __init__(self, method call (line 56) | def call(self, inputs, **kwargs): class MBConv (line 64) | class MBConv(layers.Layer): method __init__ (line 65) | def __init__(self, method call (line 147) | def call(self, inputs, training=None): class FusedMBConv (line 172) | class FusedMBConv(layers.Layer): method __init__ (line 173) | def __init__(self, method call (line 239) | def call(self, inputs, training=None): class Stem (line 260) | class Stem(layers.Layer): method __init__ (line 261) | def __init__(self, filters: int, name: str = None): method call (line 278) | def call(self, inputs, training=None): class Head (line 286) | class Head(layers.Layer): method __init__ (line 287) | def __init__(self, method call (line 314) | def call(self, inputs, training=None): class EfficientNetV2 (line 327) | class EfficientNetV2(Model): method __init__ (line 328) | def __init__(self, method call (line 368) | def call(self, inputs, training=None): function efficientnetv2_s (line 380) | def efficientnetv2_s(num_classes: int = 1000): function efficientnetv2_m (line 402) | def efficientnetv2_m(num_classes: int = 1000): function efficientnetv2_l (line 425) | def efficientnetv2_l(num_classes: int = 1000): FILE: tensorflow_classification/Test11_efficientnetV2/predict.py function main (line 13) | def main(): FILE: tensorflow_classification/Test11_efficientnetV2/train.py function main (line 15) | def main(): FILE: tensorflow_classification/Test11_efficientnetV2/trans_weights.py function main (line 4) | def main(ckpt_path: str, FILE: tensorflow_classification/Test11_efficientnetV2/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function generate_ds (line 75) | def generate_ds(data_root: str, FILE: tensorflow_classification/Test1_official_demo/model.py class MyModel (line 5) | class MyModel(Model): method __init__ (line 6) | def __init__(self): method call (line 13) | def call(self, x, **kwargs): FILE: tensorflow_classification/Test1_official_demo/train.py function main (line 7) | def main(): FILE: tensorflow_classification/Test2_alexnet/fine_train_alexnet.py function AlexNet_pytorch (line 11) | def AlexNet_pytorch(im_height=224, im_width=224, num_classes=1000): function main (line 36) | def main(): FILE: tensorflow_classification/Test2_alexnet/model.py function AlexNet_v1 (line 4) | def AlexNet_v1(im_height=224, im_width=224, num_classes=1000): class AlexNet_v2 (line 29) | class AlexNet_v2(Model): method __init__ (line 30) | def __init__(self, num_classes=1000): method call (line 53) | def call(self, inputs, **kwargs): FILE: tensorflow_classification/Test2_alexnet/predict.py function main (line 11) | def main(): FILE: tensorflow_classification/Test2_alexnet/read_pth.py function rename_var (line 6) | def rename_var(pth_path, new_ckpt_path, num_classes): FILE: tensorflow_classification/Test2_alexnet/train.py function main (line 9) | def main(): FILE: tensorflow_classification/Test2_alexnet/trainGPU.py function main (line 13) | def main(): FILE: tensorflow_classification/Test3_vgg/fine_train_vgg16.py function main (line 10) | def main(): FILE: tensorflow_classification/Test3_vgg/model.py function VGG (line 22) | def VGG(feature, im_height=224, im_width=224, num_classes=1000): function make_feature (line 40) | def make_feature(cfg): function vgg (line 60) | def vgg(model_name="vgg16", im_height=224, im_width=224, num_classes=1000): FILE: tensorflow_classification/Test3_vgg/predict.py function main (line 11) | def main(): FILE: tensorflow_classification/Test3_vgg/read_ckpt.py function rename_var (line 4) | def rename_var(ckpt_path, new_ckpt_path, num_classes=5): FILE: tensorflow_classification/Test3_vgg/train.py function main (line 9) | def main(): FILE: tensorflow_classification/Test3_vgg/trainGPU.py function main (line 13) | def main(): FILE: tensorflow_classification/Test4_goolenet/model.py function GoogLeNet (line 4) | def GoogLeNet(im_height=224, im_width=224, class_num=1000, aux_logits=Fa... class Inception (line 66) | class Inception(layers.Layer): method __init__ (line 67) | def __init__(self, ch1x1, ch3x3red, ch3x3, ch5x5red, ch5x5, pool_proj,... method call (line 83) | def call(self, inputs, **kwargs): class InceptionAux (line 92) | class InceptionAux(layers.Layer): method __init__ (line 93) | def __init__(self, num_classes, **kwargs): method call (line 102) | def call(self, inputs, **kwargs): FILE: tensorflow_classification/Test4_goolenet/model_add_bn.py function InceptionV1 (line 4) | def InceptionV1(im_height=224, im_width=224, class_num=1000, aux_logits=... class Inception (line 72) | class Inception(layers.Layer): method __init__ (line 73) | def __init__(self, ch1x1, ch3x3red, ch3x3, ch5x5red, ch5x5, pool_proj,... method call (line 102) | def call(self, inputs, **kwargs): class InceptionAux (line 111) | class InceptionAux(layers.Layer): method __init__ (line 112) | def __init__(self, num_classes, **kwargs): method call (line 123) | def call(self, inputs, **kwargs): FILE: tensorflow_classification/Test4_goolenet/predict.py function main (line 12) | def main(): FILE: tensorflow_classification/Test4_goolenet/read_pth.py function rename_var (line 6) | def rename_var(pth_path, new_ckpt_path, num_classes): FILE: tensorflow_classification/Test4_goolenet/train.py function main (line 12) | def main(): FILE: tensorflow_classification/Test4_goolenet/trainGPU.py function main (line 13) | def main(): FILE: tensorflow_classification/Test4_goolenet/train_add_bn.py function main (line 14) | def main(): FILE: tensorflow_classification/Test5_resnet/batch_predict.py function main (line 12) | def main(): FILE: tensorflow_classification/Test5_resnet/model.py class BasicBlock (line 4) | class BasicBlock(layers.Layer): method __init__ (line 7) | def __init__(self, out_channel, strides=1, downsample=None, **kwargs): method call (line 21) | def call(self, inputs, training=False): class Bottleneck (line 39) | class Bottleneck(layers.Layer): method __init__ (line 48) | def __init__(self, out_channel, strides=1, downsample=None, **kwargs): method call (line 64) | def call(self, inputs, training=False): function _make_layer (line 86) | def _make_layer(block, in_channel, channel, block_num, name, strides=1): function _resnet (line 104) | def _resnet(block, blocks_num, im_width=224, im_height=224, num_classes=... function resnet34 (line 131) | def resnet34(im_width=224, im_height=224, num_classes=1000, include_top=... function resnet50 (line 135) | def resnet50(im_width=224, im_height=224, num_classes=1000, include_top=... function resnet101 (line 139) | def resnet101(im_width=224, im_height=224, num_classes=1000, include_top... FILE: tensorflow_classification/Test5_resnet/predict.py function main (line 13) | def main(): FILE: tensorflow_classification/Test5_resnet/read_ckpt.py function rename_var (line 8) | def rename_var(ckpt_path, new_ckpt_path, num_classes, except_list): function main (line 35) | def main(): FILE: tensorflow_classification/Test5_resnet/subclassed_model.py class BasicBlock (line 4) | class BasicBlock(layers.Layer): method __init__ (line 7) | def __init__(self, out_channel, strides=1, downsample=None, **kwargs): method call (line 21) | def call(self, inputs, training=False, **kwargs): class Bottleneck (line 39) | class Bottleneck(layers.Layer): method __init__ (line 48) | def __init__(self, out_channel, strides=1, downsample=None, **kwargs): method call (line 64) | def call(self, inputs, training=False, **kwargs): class ResNet (line 86) | class ResNet(Model): method __init__ (line 87) | def __init__(self, block, blocks_num, num_classes=1000, include_top=Tr... method call (line 106) | def call(self, inputs, training=False, **kwargs): method _make_layer (line 124) | def _make_layer(self, block, first_block, channel, block_num, name=Non... function resnet34 (line 142) | def resnet34(num_classes=1000, include_top=True): function resnet101 (line 148) | def resnet101(num_classes=1000, include_top=True): FILE: tensorflow_classification/Test5_resnet/train.py function main (line 13) | def main(): FILE: tensorflow_classification/Test5_resnet/trainGPU.py function main (line 13) | def main(): FILE: tensorflow_classification/Test6_mobilenet/model_v2.py function _make_divisible (line 4) | def _make_divisible(ch, divisor=8, min_ch=None): class ConvBNReLU (line 20) | class ConvBNReLU(layers.Layer): method __init__ (line 21) | def __init__(self, out_channel, kernel_size=3, stride=1, **kwargs): method call (line 28) | def call(self, inputs, training=False): class InvertedResidual (line 35) | class InvertedResidual(layers.Layer): method __init__ (line 36) | def __init__(self, in_channel, out_channel, stride, expand_ratio, **kw... method call (line 59) | def call(self, inputs, training=False, **kwargs): function MobileNetV2 (line 66) | def MobileNetV2(im_height=224, FILE: tensorflow_classification/Test6_mobilenet/model_v3.py function _make_divisible (line 6) | def _make_divisible(ch, divisor=8, min_ch=None): function correct_pad (line 22) | def correct_pad(input_size: Union[int, tuple], kernel_size: int): class HardSigmoid (line 44) | class HardSigmoid(layers.Layer): method __init__ (line 45) | def __init__(self, **kwargs): method call (line 49) | def call(self, inputs, **kwargs): class HardSwish (line 54) | class HardSwish(layers.Layer): method __init__ (line 55) | def __init__(self, **kwargs): method call (line 59) | def call(self, inputs, **kwargs): function _se_block (line 64) | def _se_block(inputs, filters, prefix, se_ratio=1 / 4.): function _inverted_res_block (line 90) | def _inverted_res_block(x, function mobilenet_v3_large (line 151) | def mobilenet_v3_large(input_shape=(224, 224, 3), function mobilenet_v3_small (line 224) | def mobilenet_v3_small(input_shape=(224, 224, 3), FILE: tensorflow_classification/Test6_mobilenet/predict.py function main (line 13) | def main(): FILE: tensorflow_classification/Test6_mobilenet/read_ckpt.py function rename_var (line 8) | def rename_var(ckpt_path, new_ckpt_path, num_classes, except_list): function main (line 50) | def main(): FILE: tensorflow_classification/Test6_mobilenet/trainGPU_mobilenet_v2.py function main (line 12) | def main(): FILE: tensorflow_classification/Test6_mobilenet/train_mobilenet_v2.py function main (line 13) | def main(): FILE: tensorflow_classification/Test6_mobilenet/train_mobilenet_v3.py function main (line 13) | def main(): FILE: tensorflow_classification/Test6_mobilenet/trans_v3_weights.py function change_word (line 6) | def change_word(word: str): function rename_var (line 17) | def rename_var(ckpt_path, m_info): function main (line 38) | def main(): FILE: tensorflow_classification/Test6_mobilenet/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function generate_ds (line 75) | def generate_ds(data_root: str, FILE: tensorflow_classification/Test7_shuffleNet/model.py class ConvBNReLU (line 5) | class ConvBNReLU(layers.Layer): method __init__ (line 6) | def __init__(self, method call (line 24) | def call(self, inputs, training=None, **kwargs): class DWConvBN (line 31) | class DWConvBN(layers.Layer): method __init__ (line 32) | def __init__(self, method call (line 46) | def call(self, inputs, training=None, **kwargs): class ChannelShuffle (line 52) | class ChannelShuffle(layers.Layer): method __init__ (line 53) | def __init__(self, shape, groups: int = 2, **kwargs): method call (line 63) | def call(self, inputs, **kwargs): class ChannelSplit (line 70) | class ChannelSplit(layers.Layer): method __init__ (line 71) | def __init__(self, num_splits: int = 2, **kwargs): method call (line 75) | def call(self, inputs, **kwargs): function shuffle_block_s1 (line 82) | def shuffle_block_s1(inputs, output_c: int, stride: int, prefix: str): function shuffle_block_s2 (line 102) | def shuffle_block_s2(inputs, output_c: int, stride: int, prefix: str): function shufflenet_v2 (line 124) | def shufflenet_v2(num_classes: int, function shufflenet_v2_x1_0 (line 166) | def shufflenet_v2_x1_0(num_classes=1000, input_shape=(224, 224, 3)): function shufflenet_v2_x0_5 (line 175) | def shufflenet_v2_x0_5(num_classes=1000, input_shape=(224, 224, 3)): function shufflenet_v2_x2_0 (line 183) | def shufflenet_v2_x2_0(num_classes=1000, input_shape=(224, 224, 3)): FILE: tensorflow_classification/Test7_shuffleNet/predict.py function main (line 12) | def main(): FILE: tensorflow_classification/Test7_shuffleNet/train.py function main (line 15) | def main(): FILE: tensorflow_classification/Test7_shuffleNet/trans_weights.py function main (line 7) | def main(): FILE: tensorflow_classification/Test7_shuffleNet/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function generate_ds (line 75) | def generate_ds(data_root: str, FILE: tensorflow_classification/Test9_efficientNet/model.py function correct_pad (line 26) | def correct_pad(input_size: Union[int, tuple], kernel_size: int): function block (line 48) | def block(inputs, function efficient_net (line 141) | def efficient_net(width_coefficient, function efficientnet_b0 (line 264) | def efficientnet_b0(num_classes=1000, function efficientnet_b1 (line 277) | def efficientnet_b1(num_classes=1000, function efficientnet_b2 (line 290) | def efficientnet_b2(num_classes=1000, function efficientnet_b3 (line 303) | def efficientnet_b3(num_classes=1000, function efficientnet_b4 (line 316) | def efficientnet_b4(num_classes=1000, function efficientnet_b5 (line 329) | def efficientnet_b5(num_classes=1000, function efficientnet_b6 (line 342) | def efficientnet_b6(num_classes=1000, function efficientnet_b7 (line 355) | def efficientnet_b7(num_classes=1000, FILE: tensorflow_classification/Test9_efficientNet/predict.py function main (line 12) | def main(): FILE: tensorflow_classification/Test9_efficientNet/train.py function main (line 15) | def main(): FILE: tensorflow_classification/Test9_efficientNet/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function generate_ds (line 75) | def generate_ds(data_root: str, FILE: tensorflow_classification/analyze_weights_featuremap/alexnet_model.py function AlexNet_v1 (line 4) | def AlexNet_v1(im_height=224, im_width=224, class_num=1000): class AlexNet_v2 (line 29) | class AlexNet_v2(Model): method __init__ (line 30) | def __init__(self, class_num=1000): method call (line 53) | def call(self, inputs, **kwargs): method receive_feature_map (line 59) | def receive_feature_map(self, x, layers_name): FILE: tensorflow_classification/custom_dataset/train_fit.py function main (line 10) | def main(): FILE: tensorflow_classification/custom_dataset/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function generate_ds (line 75) | def generate_ds(data_root: str, FILE: tensorflow_classification/swin_transformer/model.py class PatchEmbed (line 6) | class PatchEmbed(layers.Layer): method __init__ (line 10) | def __init__(self, patch_size=4, embed_dim=96, norm_layer=None): method call (line 22) | def call(self, x, **kwargs): function window_partition (line 43) | def window_partition(x, window_size: int): function window_reverse (line 62) | def window_reverse(windows, window_size: int, H: int, W: int): class PatchMerging (line 84) | class PatchMerging(layers.Layer): method __init__ (line 85) | def __init__(self, dim: int, norm_layer=layers.LayerNormalization, nam... method call (line 94) | def call(self, x, H, W): class MLP (line 125) | class MLP(layers.Layer): method __init__ (line 133) | def __init__(self, in_features, mlp_ratio=4.0, drop=0., name=None): method call (line 142) | def call(self, x, training=None): class WindowAttention (line 151) | class WindowAttention(layers.Layer): method __init__ (line 167) | def __init__(self, method build (line 189) | def build(self, input_shape): method call (line 217) | def call(self, x, mask=None, training=None): class SwinTransformerBlock (line 273) | class SwinTransformerBlock(layers.Layer): method __init__ (line 288) | def __init__(self, dim, num_heads, window_size=7, shift_size=0, method call (line 311) | def call(self, x, attn_mask, training=None): class BasicLayer (line 371) | class BasicLayer(layers.Layer): method __init__ (line 388) | def __init__(self, dim, depth, num_heads, window_size, method create_mask (line 418) | def create_mask(self, H, W): method call (line 448) | def call(self, x, H, W, training=None): class SwinTransformer (line 461) | class SwinTransformer(Model): method __init__ (line 483) | def __init__(self, patch_size=4, num_classes=1000, method call (line 528) | def call(self, x, training=None): function swin_tiny_patch4_window7_224 (line 542) | def swin_tiny_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_small_patch4_window7_224 (line 554) | def swin_small_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_base_patch4_window7_224 (line 567) | def swin_base_patch4_window7_224(num_classes: int = 1000, **kwargs): function swin_base_patch4_window12_384 (line 580) | def swin_base_patch4_window12_384(num_classes: int = 1000, **kwargs): function swin_base_patch4_window7_224_in22k (line 593) | def swin_base_patch4_window7_224_in22k(num_classes: int = 21841, **kwargs): function swin_base_patch4_window12_384_in22k (line 606) | def swin_base_patch4_window12_384_in22k(num_classes: int = 21841, **kwar... function swin_large_patch4_window7_224_in22k (line 619) | def swin_large_patch4_window7_224_in22k(num_classes: int = 21841, **kwar... function swin_large_patch4_window12_384_in22k (line 632) | def swin_large_patch4_window12_384_in22k(num_classes: int = 21841, **kwa... FILE: tensorflow_classification/swin_transformer/predict.py function main (line 13) | def main(): FILE: tensorflow_classification/swin_transformer/train.py function main (line 15) | def main(): FILE: tensorflow_classification/swin_transformer/trans_weights.py function main (line 5) | def main(weights_path: str, FILE: tensorflow_classification/swin_transformer/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function generate_ds (line 75) | def generate_ds(data_root: str, FILE: tensorflow_classification/tensorboard_test/train_fit.py function main (line 11) | def main(): FILE: tensorflow_classification/tensorboard_test/train_not_fit.py function main (line 12) | def main(): FILE: tensorflow_classification/vision_transformer/predict.py function main (line 13) | def main(): FILE: tensorflow_classification/vision_transformer/train.py function main (line 16) | def main(): FILE: tensorflow_classification/vision_transformer/trans_weights.py function main (line 4) | def main(weights_path: str, FILE: tensorflow_classification/vision_transformer/utils.py function read_split_data (line 9) | def read_split_data(root: str, val_rate: float = 0.2): function generate_ds (line 75) | def generate_ds(data_root: str, FILE: tensorflow_classification/vision_transformer/vit_model.py class PatchEmbed (line 10) | class PatchEmbed(layers.Layer): method __init__ (line 14) | def __init__(self, img_size=224, patch_size=16, embed_dim=768): method call (line 26) | def call(self, inputs, **kwargs): class ConcatClassTokenAddPosEmbed (line 36) | class ConcatClassTokenAddPosEmbed(layers.Layer): method __init__ (line 37) | def __init__(self, embed_dim=768, num_patches=196, name=None): method build (line 42) | def build(self, input_shape): method call (line 54) | def call(self, inputs, **kwargs): class Attention (line 65) | class Attention(layers.Layer): method __init__ (line 69) | def __init__(self, method call (line 88) | def call(self, inputs, training=None): class MLP (line 119) | class MLP(layers.Layer): method __init__ (line 127) | def __init__(self, in_features, mlp_ratio=4.0, drop=0., name=None): method call (line 136) | def call(self, inputs, training=None): class Block (line 145) | class Block(layers.Layer): method __init__ (line 146) | def __init__(self, method call (line 167) | def call(self, inputs, training=None): class VisionTransformer (line 173) | class VisionTransformer(Model): method __init__ (line 174) | def __init__(self, img_size=224, patch_size=16, embed_dim=768, method call (line 209) | def call(self, inputs, training=None): function vit_base_patch16_224_in21k (line 225) | def vit_base_patch16_224_in21k(num_classes: int = 21843, has_logits: boo... function vit_base_patch32_224_in21k (line 241) | def vit_base_patch32_224_in21k(num_classes: int = 21843, has_logits: boo... function vit_large_patch16_224_in21k (line 257) | def vit_large_patch16_224_in21k(num_classes: int = 21843, has_logits: bo... function vit_large_patch32_224_in21k (line 273) | def vit_large_patch32_224_in21k(num_classes: int = 21843, has_logits: bo... function vit_huge_patch14_224_in21k (line 289) | def vit_huge_patch14_224_in21k(num_classes: int = 21843, has_logits: boo...