SYMBOL INDEX (648 symbols across 75 files) FILE: cfglib/config.py function update_config (line 69) | def update_config(config, extra_config): function print_config (line 76) | def print_config(config): FILE: cfglib/option.py function str2bool (line 9) | def str2bool(v): function arg2str (line 13) | def arg2str(args): class BaseOptions (line 23) | class BaseOptions(object): method __init__ (line 25) | def __init__(self): method parse (line 86) | def parse(self, fixed=None): method initialize (line 95) | def initialize(self, fixed=None): method update (line 120) | def update(self, args, extra_options): FILE: dataset/CTW1500_Text_New.py class Ctw1500Text_New (line 13) | class Ctw1500Text_New(TextDataset): method __init__ (line 14) | def __init__(self, data_root, is_training=True, load_memory=False, tra... method parse_carve_txt (line 31) | def parse_carve_txt(gt_path): method parse_carve_xml (line 49) | def parse_carve_xml(gt_path): method load_img_gt (line 67) | def load_img_gt(self, item): method __getitem__ (line 100) | def __getitem__(self, item): method __len__ (line 113) | def __len__(self): FILE: dataset/Icdar15_Text.py class Icdar15Text (line 14) | class Icdar15Text(TextDataset): method __init__ (line 16) | def __init__(self, data_root, is_training=True, load_memory=False, tra... method parse_txt (line 37) | def parse_txt(gt_path): method load_img_gt (line 65) | def load_img_gt(self, item): method __getitem__ (line 88) | def __getitem__(self, item): method __len__ (line 102) | def __len__(self): FILE: dataset/Icdar17_Text.py class Mlt2017Text (line 13) | class Mlt2017Text(TextDataset): method __init__ (line 15) | def __init__(self, data_root, is_training=True, load_memory=False, tra... method parse_txt (line 50) | def parse_txt(gt_path): method load_img_gt (line 73) | def load_img_gt(self, item): method __getitem__ (line 104) | def __getitem__(self, item): method __len__ (line 118) | def __len__(self): FILE: dataset/Icdar19ArT_Json.py class ArtTextJson (line 11) | class ArtTextJson(TextDataset): method __init__ (line 12) | def __init__(self, data_root, is_training=True, ignore_list=None, load... method preprocess (line 41) | def preprocess(image_list: list, annotation_data: dict): method parse_curve_txt (line 53) | def parse_curve_txt(self, gt_data): method load_img_gt (line 65) | def load_img_gt(self, item): method __getitem__ (line 92) | def __getitem__(self, item): method __len__ (line 106) | def __len__(self): FILE: dataset/Icdar19ArT_Text.py class ArtText (line 16) | class ArtText(TextDataset): method __init__ (line 18) | def __init__(self, data_root, ignore_list=None, is_training=True, load... method parse_carve_txt (line 43) | def parse_carve_txt(gt_path): method load_img_gt (line 63) | def load_img_gt(self, item): method __getitem__ (line 91) | def __getitem__(self, item): method __len__ (line 105) | def __len__(self): FILE: dataset/Icdar19LSVT_Json.py class LsvtTextJson (line 11) | class LsvtTextJson(TextDataset): method __init__ (line 12) | def __init__(self, data_root, is_training=True, ignore_list=None, method preprocess (line 43) | def preprocess(image_list: list, annotation_data: dict): method parse_curve_txt (line 55) | def parse_curve_txt(self, gt_data): method load_img_gt (line 67) | def load_img_gt(self, item): method __getitem__ (line 94) | def __getitem__(self, item): method __len__ (line 108) | def __len__(self): FILE: dataset/Icdar19_Text.py class Mlt2019Text (line 13) | class Mlt2019Text(TextDataset): method __init__ (line 15) | def __init__(self, data_root, is_training=True, transform=None, load_m... method parse_txt (line 44) | def parse_txt(gt_path): method load_img_gt (line 68) | def load_img_gt(self, item): method __getitem__ (line 99) | def __getitem__(self, item): method __len__ (line 113) | def __len__(self): FILE: dataset/TD500/Evaluation_Protocol/rrc_evaluation_funcs.py function print_help (line 13) | def print_help(): function load_zip_file_keys (line 18) | def load_zip_file_keys(file,fileNameRegExp=''): function load_zip_file (line 47) | def load_zip_file(file,fileNameRegExp='',allEntries=False): function decode_utf8 (line 78) | def decode_utf8(raw): function validate_lines_in_file (line 92) | def validate_lines_in_file(fileName,file_contents,CRLF=True,LTRB=True,wi... function validate_tl_line (line 111) | def validate_tl_line(line,LTRB=True,withTranscription=True,withConfidenc... function get_tl_line_values (line 122) | def get_tl_line_values(line,LTRB=True,withTranscription=False,withConfid... function validate_point_inside_bounds (line 242) | def validate_point_inside_bounds(x,y,imWidth,imHeight): function validate_clockwise_points (line 248) | def validate_clockwise_points(points): function get_tl_line_values_from_file_contents (line 273) | def get_tl_line_values_from_file_contents(content,CRLF=True,LTRB=True,wi... function main_evaluation (line 303) | def main_evaluation(p,default_evaluation_params_fn,validate_data_fn,eval... function main_validation (line 369) | def main_validation(default_evaluation_params_fn,validate_data_fn): FILE: dataset/TD500/Evaluation_Protocol/script.py function evaluation_imports (line 13) | def evaluation_imports(): function default_evaluation_params (line 22) | def default_evaluation_params(): function validate_data (line 37) | def validate_data(gtFilePath, submFilePath,evaluationParams): function evaluate_method (line 59) | def evaluate_method(gtFilePath, submFilePath, evaluationParams): FILE: dataset/TD500/Evaluation_Protocol/script075.py function evaluation_imports (line 7) | def evaluation_imports(): function default_evaluation_params (line 16) | def default_evaluation_params(): function validate_data (line 31) | def validate_data(gtFilePath, submFilePath,evaluationParams): function evaluate_method (line 53) | def evaluate_method(gtFilePath, submFilePath, evaluationParams): FILE: dataset/TD500_Text.py class TD500Text (line 14) | class TD500Text(TextDataset): method __init__ (line 16) | def __init__(self, data_root, is_training=True, ignore_list=None, load... method parse_txt (line 37) | def parse_txt(gt_path): method load_img_gt (line 64) | def load_img_gt(self, item): method __getitem__ (line 85) | def __getitem__(self, item): method __len__ (line 112) | def __len__(self): FILE: dataset/Total_Text.py class TotalText (line 16) | class TotalText(TextDataset): method __init__ (line 18) | def __init__(self, data_root, ignore_list=None, is_training=True, load... method parse_mat (line 43) | def parse_mat(mat_path): method parse_carve_txt (line 65) | def parse_carve_txt(gt_path): method load_img_gt (line 96) | def load_img_gt(self, item): method __getitem__ (line 116) | def __getitem__(self, item): method __len__ (line 141) | def __len__(self): FILE: dataset/Total_Text_New.py class TotalText_New (line 13) | class TotalText_New(TextDataset): method __init__ (line 15) | def __init__(self, data_root, ignore_list=None, is_training=True, method parse_mat (line 48) | def parse_mat(mat_path): method load_img_gt (line 66) | def load_img_gt(self, item): method __getitem__ (line 86) | def __getitem__(self, item): method __len__ (line 111) | def __len__(self): FILE: dataset/ctw1500/Evaluation_Protocol/voc_eval_polygon.py function parse_rec_txt (line 17) | def parse_rec_txt(filename): function curve_parse_rec_txt (line 34) | def curve_parse_rec_txt(filename): function voc_ap (line 52) | def voc_ap(rec, prec, use_07_metric=False): function voc_eval_polygon (line 86) | def voc_eval_polygon(detpath, FILE: dataset/ctw1500_text.py class Ctw1500Text (line 12) | class Ctw1500Text(TextDataset): method __init__ (line 13) | def __init__(self, data_root, is_training=True, load_memory=False, tra... method parse_carve_txt (line 30) | def parse_carve_txt(gt_path): method load_img_gt (line 49) | def load_img_gt(self, item): method __getitem__ (line 76) | def __getitem__(self, item): method __len__ (line 90) | def __len__(self): FILE: dataset/data_util.py function pil_load_img (line 9) | def pil_load_img(path): FILE: dataset/dataload.py function pil_load_img (line 14) | def pil_load_img(path): class TextInstance (line 20) | class TextInstance(object): method __init__ (line 21) | def __init__(self, points, orient, text): method find_bottom_and_sideline (line 50) | def find_bottom_and_sideline(self): method get_sample_point (line 54) | def get_sample_point(self, size=None): method get_control_points (line 61) | def get_control_points(self, size=None): method __repr__ (line 82) | def __repr__(self): method __getitem__ (line 85) | def __getitem__(self, item): class TextDataset (line 89) | class TextDataset(object): method __init__ (line 91) | def __init__(self, transform, is_training=False): method sigmoid_alpha (line 100) | def sigmoid_alpha(x, k): method fill_polygon (line 107) | def fill_polygon(mask, pts, value): method generate_proposal_point (line 120) | def generate_proposal_point(text_mask, num_points, approx_factor, jitt... method compute_direction_field (line 140) | def compute_direction_field(inst_mask, h, w): method make_text_region (line 159) | def make_text_region(self, img, polygons): method get_training_data (line 217) | def get_training_data(self, image, polygons, image_id=None, image_path... method get_test_data (line 243) | def get_test_data(self, image, polygons=None, image_id=None, image_pat... method __len__ (line 277) | def __len__(self): FILE: dataset/deploy.py class DeployDataset (line 11) | class DeployDataset(TextDataset): method __init__ (line 13) | def __init__(self, image_root, transform=None): method __getitem__ (line 18) | def __getitem__(self, item): method __len__ (line 27) | def __len__(self): FILE: dataset/icdar15/Evaluation_Protocol/rrc_evaluation_funcs.py function print_help (line 12) | def print_help(): function load_zip_file_keys (line 17) | def load_zip_file_keys(file,fileNameRegExp=''): function load_zip_file (line 46) | def load_zip_file(file,fileNameRegExp='',allEntries=False): function decode_utf8 (line 77) | def decode_utf8(raw): function validate_lines_in_file (line 91) | def validate_lines_in_file(fileName,file_contents,CRLF=True,LTRB=True,wi... function validate_tl_line (line 110) | def validate_tl_line(line,LTRB=True,withTranscription=True,withConfidenc... function get_tl_line_values (line 121) | def get_tl_line_values(line,LTRB=True,withTranscription=False,withConfid... function validate_point_inside_bounds (line 221) | def validate_point_inside_bounds(x,y,imWidth,imHeight): function validate_clockwise_points (line 227) | def validate_clockwise_points(points): function get_tl_line_values_from_file_contents (line 252) | def get_tl_line_values_from_file_contents(content,CRLF=True,LTRB=True,wi... function main_evaluation (line 280) | def main_evaluation(p,default_evaluation_params_fn,validate_data_fn,eval... function main_validation (line 348) | def main_validation(default_evaluation_params_fn,validate_data_fn): FILE: dataset/icdar15/Evaluation_Protocol/script.py function evaluation_imports (line 13) | def evaluation_imports(): function default_evaluation_params (line 22) | def default_evaluation_params(): function validate_data (line 37) | def validate_data(gtFilePath, submFilePath,evaluationParams): function evaluate_method (line 59) | def evaluate_method(gtFilePath, submFilePath, evaluationParams): FILE: dataset/icdar15/Evaluation_Protocol/script075.py function evaluation_imports (line 8) | def evaluation_imports(): function default_evaluation_params (line 17) | def default_evaluation_params(): function validate_data (line 32) | def validate_data(gtFilePath, submFilePath,evaluationParams): function evaluate_method (line 54) | def evaluate_method(gtFilePath, submFilePath, evaluationParams): FILE: dataset/synth_text.py class SynthText (line 9) | class SynthText(TextDataset): method __init__ (line 11) | def __init__(self, data_root, is_training=True, load_memory=False, tra... method parse_txt (line 28) | def parse_txt(annotation_path): method load_img_gt (line 41) | def load_img_gt(self, item): method __getitem__ (line 59) | def __getitem__(self, item): method __len__ (line 73) | def __len__(self): FILE: dataset/total_text/Evaluation_Protocol/Python_scripts/Deteval.py function input_reading_mod (line 39) | def input_reading_mod(input_dir, input): function gt_reading_mod (line 47) | def gt_reading_mod(gt_dir, gt_id): function detection_filtering (line 55) | def detection_filtering(detections, groundtruths, threshold=0.5): function sigma_calculation (line 72) | def sigma_calculation(det_x, det_y, gt_x, gt_y): function tau_calculation (line 78) | def tau_calculation(det_x, det_y, gt_x, gt_y): function one_to_one (line 133) | def one_to_one(local_sigma_table, local_tau_table, local_accumulative_re... function one_to_many (line 154) | def one_to_many(local_sigma_table, local_tau_table, local_accumulative_r... function many_to_many (line 193) | def many_to_many(local_sigma_table, local_tau_table, local_accumulative_... FILE: dataset/total_text/Evaluation_Protocol/Python_scripts/Pascal_VOC.py function input_reading_mod (line 19) | def input_reading_mod(input_dir, input): function gt_reading_mod (line 27) | def gt_reading_mod(gt_dir, gt_id): function detection_filtering (line 33) | def detection_filtering(detections, groundtruths, threshold=0.5): FILE: dataset/total_text/Evaluation_Protocol/Python_scripts/polygon_fast.py function area (line 20) | def area(x, y): function approx_area_of_intersection (line 25) | def approx_area_of_intersection(det_x, det_y, gt_x, gt_y): function area_of_intersection (line 51) | def area_of_intersection(det_x, det_y, gt_x, gt_y): function area_of_union (line 56) | def area_of_union(det_x, det_y, gt_x, gt_y): function iou (line 62) | def iou(det_x, det_y, gt_x, gt_y): function iod (line 66) | def iod(det_x, det_y, gt_x, gt_y): FILE: dataset/total_text/Evaluation_Protocol/Python_scripts/polygon_wrapper.py function area (line 18) | def area(x, y): function approx_area_of_intersection (line 33) | def approx_area_of_intersection(det_x, det_y, gt_x, gt_y): function shapely_area_of_intersection (line 59) | def shapely_area_of_intersection(det_x, det_y, gt_x, gt_y): function shapely_area (line 64) | def shapely_area(x, y): function area_of_intersection (line 68) | def area_of_intersection(det_x, det_y, gt_x, gt_y): function iou (line 96) | def iou(det_x, det_y, gt_x, gt_y): function iod (line 128) | def iod(det_x, det_y, gt_x, gt_y): FILE: demo.py function osmkdir (line 21) | def osmkdir(out_dir): function write_to_file (line 28) | def write_to_file(contours, file_path): function inference (line 44) | def inference(model, test_loader, output_dir): function main (line 117) | def main(vis_dir_path): FILE: eval_textBPN.py function osmkdir (line 26) | def osmkdir(out_dir): function write_to_file (line 33) | def write_to_file(contours, file_path): function inference (line 49) | def inference(model, test_loader, output_dir): function main (line 164) | def main(vis_dir_path): FILE: eval_textBPN_speed.py function osmkdir (line 18) | def osmkdir(out_dir): function inference (line 25) | def inference(model, test_loader, output_dir): function main (line 54) | def main(vis_dir_path): FILE: network/Reg_loss.py class PolyMatchingLoss (line 10) | class PolyMatchingLoss(nn.Module): method __init__ (line 11) | def __init__(self, pnum, device, loss_type="L1"): method match_loss (line 31) | def match_loss(self, pred, gt): method forward (line 49) | def forward(self, pred_list, gt): class AttentionLoss (line 70) | class AttentionLoss(nn.Module): method __init__ (line 71) | def __init__(self, beta=4, gamma=0.5): method forward (line 77) | def forward(self, pred, gt): class GeoCrossEntropyLoss (line 90) | class GeoCrossEntropyLoss(nn.Module): method __init__ (line 91) | def __init__(self): method forward (line 94) | def forward(self, output, target, poly): class AELoss (line 106) | class AELoss(nn.Module): method __init__ (line 107) | def __init__(self): method forward (line 110) | def forward(self, ae, ind, ind_mask): function smooth_l1_loss (line 147) | def smooth_l1_loss(inputs, target, sigma=9.0): function _neg_loss (line 161) | def _neg_loss(pred, gt): class FocalLoss (line 189) | class FocalLoss(nn.Module): method __init__ (line 191) | def __init__(self): method forward (line 195) | def forward(self, out, target): FILE: network/Seg_loss.py class SegmentLoss (line 9) | class SegmentLoss(nn.Module): method __init__ (line 10) | def __init__(self, Lambda, ratio=3, reduction='mean'): method forward (line 19) | def forward(self, outputs, labels, training_masks, th=0.5): method dice_loss (line 54) | def dice_loss(self, input, target, mask): method ohem_single (line 70) | def ohem_single(self, score, gt_text, training_mask, th=0.5): method ohem_batch (line 96) | def ohem_batch(self, scores, gt_texts, training_masks): FILE: network/backbone/assets/dcn/functions/deform_conv.py class DeformConvFunction (line 8) | class DeformConvFunction(Function): method forward (line 11) | def forward(ctx, method backward (line 55) | def backward(ctx, grad_output): method _output_size (line 92) | def _output_size(input, weight, padding, dilation, stride): class ModulatedDeformConvFunction (line 108) | class ModulatedDeformConvFunction(Function): method forward (line 111) | def forward(ctx, method backward (line 146) | def backward(ctx, grad_output): method _infer_shape (line 168) | def _infer_shape(ctx, input, weight): FILE: network/backbone/assets/dcn/functions/deform_pool.py class DeformRoIPoolingFunction (line 7) | class DeformRoIPoolingFunction(Function): method forward (line 10) | def forward(ctx, method backward (line 50) | def backward(ctx, grad_output): FILE: network/backbone/assets/dcn/modules/deform_conv.py class DeformConv (line 10) | class DeformConv(nn.Module): method __init__ (line 12) | def __init__(self, method reset_parameters (line 47) | def reset_parameters(self): method forward (line 54) | def forward(self, x, offset): class DeformConvPack (line 59) | class DeformConvPack(DeformConv): method __init__ (line 61) | def __init__(self, *args, **kwargs): method init_offset (line 74) | def init_offset(self): method forward (line 78) | def forward(self, x): class ModulatedDeformConv (line 84) | class ModulatedDeformConv(nn.Module): method __init__ (line 86) | def __init__(self, method reset_parameters (line 116) | def reset_parameters(self): method forward (line 125) | def forward(self, x, offset, mask): class ModulatedDeformConvPack (line 131) | class ModulatedDeformConvPack(ModulatedDeformConv): method __init__ (line 133) | def __init__(self, *args, **kwargs): method init_offset (line 146) | def init_offset(self): method forward (line 150) | def forward(self, x): FILE: network/backbone/assets/dcn/modules/deform_pool.py class DeformRoIPooling (line 6) | class DeformRoIPooling(nn.Module): method __init__ (line 8) | def __init__(self, method forward (line 27) | def forward(self, data, rois, offset): class DeformRoIPoolingPack (line 36) | class DeformRoIPoolingPack(DeformRoIPooling): method __init__ (line 38) | def __init__(self, method forward (line 72) | def forward(self, data, rois): class ModulatedDeformRoIPoolingPack (line 95) | class ModulatedDeformRoIPoolingPack(DeformRoIPooling): method __init__ (line 97) | def __init__(self, method forward (line 150) | def forward(self, data, rois): FILE: network/backbone/assets/dcn/src/deform_conv_cuda.cpp function shape_check (line 61) | void shape_check(at::Tensor input, at::Tensor offset, at::Tensor *gradOu... function deform_conv_forward_cuda (line 150) | int deform_conv_forward_cuda(at::Tensor input, at::Tensor weight, function deform_conv_backward_input_cuda (line 259) | int deform_conv_backward_input_cuda(at::Tensor input, at::Tensor offset, function deform_conv_backward_parameters_cuda (line 372) | int deform_conv_backward_parameters_cuda( function modulated_deform_conv_cuda_forward (line 484) | void modulated_deform_conv_cuda_forward( function modulated_deform_conv_cuda_backward (line 564) | void modulated_deform_conv_cuda_backward( function PYBIND11_MODULE (line 679) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: network/backbone/assets/dcn/src/deform_pool_cuda.cpp function deform_psroi_pooling_cuda_forward (line 30) | void deform_psroi_pooling_cuda_forward( function deform_psroi_pooling_cuda_backward (line 54) | void deform_psroi_pooling_cuda_backward( function PYBIND11_MODULE (line 81) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: network/backbone/resnet.py function constant_init (line 19) | def constant_init(module, constant, bias=0): function conv3x3 (line 25) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 31) | class BasicBlock(nn.Module): method __init__ (line 34) | def __init__(self, inplanes, planes, stride=1, downsample=None, dcn=No... method forward (line 74) | def forward(self, x): class Bottleneck (line 103) | class Bottleneck(nn.Module): method __init__ (line 106) | def __init__(self, inplanes, planes, stride=1, downsample=None, dcn=No... method forward (line 145) | def forward(self, x): class ResNet (line 178) | class ResNet(nn.Module): method __init__ (line 179) | def __init__(self, block, layers, num_classes=1000, method _make_layer (line 215) | def _make_layer(self, block, planes, blocks, stride=1, dcn=None): method forward (line 233) | def forward(self, x): function resnet18 (line 247) | def resnet18(pretrained=True, **kwargs): function deformable_resnet18 (line 258) | def deformable_resnet18(pretrained=True, **kwargs): function resnet34 (line 274) | def resnet34(pretrained=True, **kwargs): function resnet50 (line 286) | def resnet50(pretrained=True, **kwargs): function deformable_resnet50 (line 298) | def deformable_resnet50(pretrained=True, **kwargs): function resnet101 (line 315) | def resnet101(pretrained=True, **kwargs): function resnet152 (line 327) | def resnet152(pretrained=True, **kwargs): FILE: network/backbone/vgg.py class VggNet (line 15) | class VggNet(nn.Module): method __init__ (line 16) | def __init__(self, name="vgg16", pretrain=True): method forward (line 41) | def forward(self, x): FILE: network/layers/Adaptive_Deformation.py class MeanAggregator (line 16) | class MeanAggregator(nn.Module): method __init__ (line 17) | def __init__(self): method forward (line 20) | def forward(self, features, A): class GraphConv (line 25) | class GraphConv(nn.Module): method __init__ (line 26) | def __init__(self, in_dim, out_dim, agg): method forward (line 36) | def forward(self, features, A): class AdaptiveDeformation (line 46) | class AdaptiveDeformation(nn.Module): method __init__ (line 47) | def __init__(self, input, state_dim): method forward (line 66) | def forward(self, x, A): FILE: network/layers/CircConv.py class CircConv (line 5) | class CircConv(nn.Module): method __init__ (line 6) | def __init__(self, state_dim, out_state_dim=None, n_adj=4): method forward (line 13) | def forward(self, input, adj): class DilatedCircConv (line 18) | class DilatedCircConv(nn.Module): method __init__ (line 19) | def __init__(self, state_dim, out_state_dim=None, n_adj=4, dilation=1): method forward (line 27) | def forward(self, input, adj): class BasicBlock (line 39) | class BasicBlock(nn.Module): method __init__ (line 40) | def __init__(self, state_dim, out_state_dim, conv_type, n_adj=4, dilat... method forward (line 47) | def forward(self, x, adj=None): class DeepSnake (line 54) | class DeepSnake(nn.Module): method __init__ (line 55) | def __init__(self, state_dim, feature_dim, conv_type='dgrid'): method forward (line 76) | def forward(self, x, adj): FILE: network/layers/GCN.py class MeanAggregator (line 16) | class MeanAggregator(nn.Module): method __init__ (line 17) | def __init__(self): method forward (line 20) | def forward(self, features, A): class GraphConv (line 25) | class GraphConv(nn.Module): method __init__ (line 26) | def __init__(self, in_dim, out_dim, agg): method forward (line 36) | def forward(self, features, A): class GCN (line 46) | class GCN(nn.Module): method __init__ (line 47) | def __init__(self, in_dim, out_dim): method forward (line 63) | def forward(self, x, A): FILE: network/layers/GraphConv.py class GraphConvolution (line 9) | class GraphConvolution(Module): method __init__ (line 14) | def __init__(self, in_features, out_features, bias=True): method reset_parameters (line 28) | def reset_parameters(self): method forward (line 34) | def forward(self, input, adj): method __repr__ (line 42) | def __repr__(self): FILE: network/layers/RNN.py class RNN (line 16) | class RNN(nn.Module): method __init__ (line 17) | def __init__(self, input, state_dim): method forward (line 28) | def forward(self, x, adj): FILE: network/layers/Transformer.py class Positional_encoding (line 11) | class Positional_encoding(nn.Module): method __init__ (line 12) | def __init__(self, PE_size, n_position=256): method get_encoding_table (line 18) | def get_encoding_table(self, n_position, PE_size): method forward (line 25) | def forward(self, inputs): class MultiHeadAttention (line 29) | class MultiHeadAttention(nn.Module): method __init__ (line 30) | def __init__(self, num_heads, embed_dim, dropout=0.1, if_resi=True): method forward (line 39) | def forward(self, inputs): class FeedForward (line 53) | class FeedForward(nn.Module): method __init__ (line 54) | def __init__(self, in_channel, FFN_channel, if_resi=True): method forward (line 65) | def forward(self, inputs): class TransformerLayer (line 76) | class TransformerLayer(nn.Module): method __init__ (line 77) | def __init__(self, out_dim, in_dim, num_heads, attention_size, method forward (line 88) | def forward(self, query): class Transformer (line 102) | class Transformer(nn.Module): method __init__ (line 104) | def __init__(self, in_dim, out_dim, num_heads=8, method forward (line 125) | def forward(self, x, adj): FILE: network/layers/Transformer_old.py class Positional_encoding (line 14) | class Positional_encoding(nn.Module): method __init__ (line 15) | def __init__(self, PE_size, n_position=200): method get_encoding_table (line 21) | def get_encoding_table(self, n_position, PE_size): method forward (line 28) | def forward(self, inputs): class MultiHeadAttention (line 32) | class MultiHeadAttention(nn.Module): method __init__ (line 33) | def __init__(self, num_heads, embedding_size, attention_size, method forward (line 50) | def forward(self, query, key, value): class FeedForward (line 91) | class FeedForward(nn.Module): method __init__ (line 92) | def __init__(self, in_channel, FFN_channel, if_resi=True): method forward (line 103) | def forward(self, inputs): class TransformerLayer (line 114) | class TransformerLayer(nn.Module): method __init__ (line 115) | def __init__(self, out_dim, num_heads, embedding_size, attention_size, method forward (line 125) | def forward(self, query): class Transformer (line 133) | class Transformer(nn.Module): method __init__ (line 135) | def __init__(self, in_dim, out_dim, num_heads=8, method forward (line 157) | def forward(self, x, adj): FILE: network/layers/gcn_utils.py function normalize_adj (line 10) | def normalize_adj(A, type="AD"): function np_to_variable (line 32) | def np_to_variable(x, is_cuda=True, dtype=torch.FloatTensor): function set_trainable (line 39) | def set_trainable(model, requires_grad): function weights_normal_init (line 44) | def weights_normal_init(model, dev=0.01): function clip_gradient (line 56) | def clip_gradient(model, clip_norm): function EuclideanDistances (line 71) | def EuclideanDistances(A, B): function get_center_feature (line 87) | def get_center_feature(cnn_feature, img_poly, ind, h, w): function get_node_feature (line 96) | def get_node_feature(cnn_feature, img_poly, ind, h, w): function get_adj_mat (line 109) | def get_adj_mat(n_adj, n_nodes): function get_adj_ind (line 120) | def get_adj_ind(n_adj, n_nodes, device): function coord_embedding (line 126) | def coord_embedding(b, w, h, device): function img_poly_to_can_poly (line 137) | def img_poly_to_can_poly(img_poly): FILE: network/layers/model_block.py class UpBlok (line 12) | class UpBlok(nn.Module): method __init__ (line 14) | def __init__(self, in_channels, out_channels): method forward (line 20) | def forward(self, upsampled, shortcut): class MergeBlok (line 41) | class MergeBlok(nn.Module): method __init__ (line 42) | def __init__(self, in_channels, out_channels): method forward (line 47) | def forward(self, upsampled, shortcut): class FPN (line 61) | class FPN(nn.Module): method __init__ (line 63) | def __init__(self, backbone='resnet50', is_training=True): method forward (line 144) | def forward(self, x): FILE: network/layers/position_encoding.py class PositionEmbeddingSine (line 12) | class PositionEmbeddingSine(nn.Module): method __init__ (line 17) | def __init__(self, num_pos_feats=64, temperature=10000, normalize=Fals... method forward (line 28) | def forward(self, tensor_list: NestedTensor): class PositionEmbeddingLearned (line 51) | class PositionEmbeddingLearned(nn.Module): method __init__ (line 55) | def __init__(self, num_pos_feats=256): method reset_parameters (line 61) | def reset_parameters(self): method forward (line 65) | def forward(self, tensor_list: NestedTensor): function build_position_encoding (line 79) | def build_position_encoding(args): FILE: network/layers/resnet.py class ResNet (line 17) | class ResNet(nn.Module): method __init__ (line 18) | def __init__(self, name="resnet50", pretrain=True): method forward (line 50) | def forward(self, x): FILE: network/layers/resnet_dcn.py class ResNet_DCN (line 17) | class ResNet_DCN(nn.Module): method __init__ (line 18) | def __init__(self, name="deformable_resnet18", pretrain=False): method forward (line 42) | def forward(self, x): FILE: network/layers/vgg.py class VggNet (line 16) | class VggNet(nn.Module): method __init__ (line 17) | def __init__(self, name="vgg16", pretrain=True): method forward (line 43) | def forward(self, x): FILE: network/loss.py class TextLoss (line 12) | class TextLoss(nn.Module): method __init__ (line 14) | def __init__(self): method single_image_loss (line 22) | def single_image_loss(pre_loss, loss_label): method cls_ohem (line 50) | def cls_ohem(self, predict, target, train_mask, negative_ratio=3.): method loss_calc_flux (line 68) | def loss_calc_flux(pred_flux, gt_flux, weight_matrix, mask, train_mask): method get_poly_energy (line 87) | def get_poly_energy(energy_field, img_poly, ind, h, w): method loss_energy_regularization (line 99) | def loss_energy_regularization(self, energy_field, img_poly, inds, h, w): method forward (line 113) | def forward(self, input_dict, output_dict, eps=None): FILE: network/loss_org.py class TextLoss (line 11) | class TextLoss(nn.Module): method __init__ (line 13) | def __init__(self): method single_image_loss (line 21) | def single_image_loss(pre_loss, loss_label): method cls_ohem (line 49) | def cls_ohem(self, predict, target, train_mask, negative_ratio=3.): method loss_calc_flux (line 68) | def loss_calc_flux(pred_flux, gt_flux, weight_matrix, mask, train_mask): method forward (line 85) | def forward(self, input_dict, output_dict, eps=None): FILE: network/textnet.py class Evolution (line 23) | class Evolution(nn.Module): method __init__ (line 24) | def __init__(self, node_num, adj_num, is_training=True, device=None, m... method get_boundary_proposal (line 76) | def get_boundary_proposal(input=None, seg_preds=None, switch="gt"): method get_boundary_proposal_eval (line 101) | def get_boundary_proposal_eval(self, input=None, seg_preds=None): method evolve_poly (line 139) | def evolve_poly(self, snake, cnn_feature, i_it_poly, ind): method forward (line 152) | def forward(self, embed_feature, input=None, seg_preds=None, switch="g... class TextNet (line 170) | class TextNet(nn.Module): method __init__ (line 172) | def __init__(self, backbone='vgg', is_training=True): method load_model (line 188) | def load_model(self, model_path): method forward (line 198) | def forward(self, input_dict, test_speed=False): FILE: train_textBPN.py function save_model (line 31) | def save_model(model, epoch, lr, optimzer): function load_model (line 48) | def load_model(model, model_path): function _parse_data (line 54) | def _parse_data(inputs): function train (line 70) | def train(model, train_loader, criterion, scheduler, optimizer, epoch): function main (line 135) | def main(): FILE: train_textBPN_DDP.py class WarmupScheduler (line 31) | class WarmupScheduler(lr_scheduler._LRScheduler): method __init__ (line 32) | def __init__(self, optimizer, warmup_epochs, base_lr, final_lr, after_... method get_last_lr (line 39) | def get_last_lr(self): method step (line 49) | def step(self, epoch=None): function save_model (line 63) | def save_model(model, epoch, lr, optimizer): function load_model (line 78) | def load_model(model, model_path): function _parse_data (line 84) | def _parse_data(inputs): function train (line 99) | def train(model, train_loader, criterion, scheduler, optimizer, epoch, s... function main (line 179) | def main(): FILE: util/augmentation.py function crop_first (line 17) | def crop_first(image, polygons, scale =10): class Compose (line 54) | class Compose(object): method __init__ (line 65) | def __init__(self, transforms): method __call__ (line 68) | def __call__(self, img, pts=None): class Normalize (line 74) | class Normalize(object): method __init__ (line 75) | def __init__(self, mean, std): method __call__ (line 79) | def __call__(self, image, polygons=None): class MinusMean (line 87) | class MinusMean(object): method __init__ (line 88) | def __init__(self, mean): method __call__ (line 91) | def __call__(self, image, polygons=None): class RandomMirror (line 97) | class RandomMirror(object): method __init__ (line 99) | def __init__(self): method __call__ (line 102) | def __call__(self, image, polygons=None): class AugmentColor (line 113) | class AugmentColor(object): method __init__ (line 115) | def __init__(self): method __call__ (line 123) | def __call__(self, img, polygons=None): class RandomContrast (line 136) | class RandomContrast(object): method __init__ (line 137) | def __init__(self, lower=0.5, upper=1.5): method __call__ (line 144) | def __call__(self, image, polygons=None): class RandomBrightness (line 151) | class RandomBrightness(object): method __init__ (line 152) | def __init__(self, delta=32): method __call__ (line 157) | def __call__(self, image, polygons=None): class RandomErasing (line 165) | class RandomErasing(object): method __init__ (line 166) | def __init__(self, sr=(0.0004, 0.01), scale=(0.5, 3), ratio=0.2, Type ... method __call__ (line 177) | def __call__(self, img, polygons=None): class RandomMixUp (line 201) | class RandomMixUp(object): method __init__ (line 202) | def __init__(self, mixup_alpha=2): method __call__ (line 205) | def __call__(self, img1, img2, label1=[], label2=[]): class Rotate (line 225) | class Rotate(object): method __init__ (line 226) | def __init__(self, up=30): method rotate (line 230) | def rotate(center, pt, theta): # 二维图形学的旋转 method __call__ (line 245) | def __call__(self, img, polygons=None): class RotatePadding (line 261) | class RotatePadding(object): method __init__ (line 262) | def __init__(self, up=60,colors=True): method rotate (line 268) | def rotate(center, pt, theta, movSize=[0, 0], scale=1): # 二维图形学的旋转 method shift (line 287) | def shift(size, degree): method __call__ (line 300) | def __call__(self, image, polygons=None, scale=1.0): class SquarePadding (line 334) | class SquarePadding(object): method __call__ (line 336) | def __call__(self, image, polygons=None): class RandomImgCropPatch (line 362) | class RandomImgCropPatch(object): method __init__ (line 363) | def __init__(self, up=30, beta=0.3): method get_contour_min_area_box (line 369) | def get_contour_min_area_box(contour): method CropWH (line 375) | def CropWH(self, image, cut_w, cut_h, polygons=None): method __call__ (line 405) | def __call__(self, images, polygons_list=None): class RandomCropFlip (line 435) | class RandomCropFlip(object): method __init__ (line 437) | def __init__(self, min_crop_side_ratio=0.01): method __call__ (line 443) | def __call__(self, image, polygons=None): class RandomResizedCrop (line 530) | class RandomResizedCrop(object): method __init__ (line 531) | def __init__(self, min_crop_side_ratio=0.1): method __call__ (line 536) | def __call__(self, image, polygons): class RandomResizeScale (line 603) | class RandomResizeScale(object): method __init__ (line 604) | def __init__(self, size=512, ratio=(3./4, 5./2)): method __call__ (line 608) | def __call__(self, image, polygons=None): class Resize (line 624) | class Resize(object): method __init__ (line 625) | def __init__(self, size=1024): method __call__ (line 629) | def __call__(self, image, polygons=None): class ResizeSquare (line 642) | class ResizeSquare(object): method __init__ (line 643) | def __init__(self, size=(480, 1280)): method __call__ (line 646) | def __call__(self, image, polygons=None): class ResizeLimitSquare (line 675) | class ResizeLimitSquare(object): method __init__ (line 676) | def __init__(self, size=512, ratio=0.6): method __call__ (line 681) | def __call__(self, image, polygons=None): class RandomResizePadding (line 695) | class RandomResizePadding(object): method __init__ (line 696) | def __init__(self, size=512, random_scale=np.array([0.75, 1.0, 1.25,1.... method __call__ (line 711) | def __call__(self, image, polygons=None): class RandomDistortion (line 731) | class RandomDistortion(object): method __init__ (line 732) | def __init__(self, transform_dict, prob=0.5): method __call__ (line 736) | def __call__(self, img, target): class Augmentation (line 749) | class Augmentation(object): method __init__ (line 750) | def __init__(self, size, mean, std): method __call__ (line 766) | def __call__(self, image, polygons=None): class BaseTransform (line 770) | class BaseTransform(object): method __init__ (line 771) | def __init__(self, size, mean, std): method __call__ (line 781) | def __call__(self, image, polygons=None): class BaseTransformNresize (line 785) | class BaseTransformNresize(object): method __init__ (line 786) | def __init__(self, mean, std): method __call__ (line 793) | def __call__(self, image, polygons=None): FILE: util/canvas.py function heatmap (line 10) | def heatmap(im_gray): function loss_ploy (line 20) | def loss_ploy(loss_list, steps, period, name=""): function plt_ploys (line 30) | def plt_ploys(ploys, period, name=""): FILE: util/detection.py class TextDetector (line 6) | class TextDetector(object): method __init__ (line 8) | def __init__(self, model): method detect (line 16) | def detect(self, image, img_show): FILE: util/eval.py function osmkdir (line 9) | def osmkdir(out_dir): function analysize_result (line 16) | def analysize_result(source_dir, fid_path, outpt_dir, name): function deal_eval_total_text (line 44) | def deal_eval_total_text(debug=False): function deal_eval_ctw1500 (line 81) | def deal_eval_ctw1500(debug=False): function deal_eval_icdar15 (line 105) | def deal_eval_icdar15(debug=False): function deal_eval_TD500 (line 134) | def deal_eval_TD500(debug=False): function data_transfer_ICDAR (line 161) | def data_transfer_ICDAR(contours): function data_transfer_TD500 (line 175) | def data_transfer_TD500(contours, res_file, img=None): function data_transfer_MLT2017 (line 210) | def data_transfer_MLT2017(contours, res_file): FILE: util/graph.py class Data (line 9) | class Data(object): method __init__ (line 10) | def __init__(self, name): method name (line 15) | def name(self): method links (line 19) | def links(self): method add_link (line 22) | def add_link(self, other, score): function connected_components (line 27) | def connected_components(nodes, score_dict, th): function connected_components_constraint (line 51) | def connected_components_constraint(nodes, max_sz, score_dict=None, th=N... function graph_propagation_naive (line 84) | def graph_propagation_naive(edges, score, th, bboxs=None, dis_thresh=50,... function graph_search (line 129) | def graph_search(edges, scores, edges_num, th=None): function graph_propagation (line 156) | def graph_propagation(edges, score, max_sz, step=0.1, beg_th=0.5, pool=N... function graph_propagation_soft (line 202) | def graph_propagation_soft(edges, score, max_sz, step=0.1, **kwargs): function diffusion (line 240) | def diffusion(vertex, label, score_dict, max_depth=5, weight_decay=0.6, ... function clusters2labels (line 290) | def clusters2labels(clusters, n_nodes): function single_remove (line 299) | def single_remove(bbox, pred): FILE: util/io.py function mkdir (line 17) | def mkdir(path): function make_parent_dir (line 26) | def make_parent_dir(path): function pwd (line 32) | def pwd(): function dump (line 35) | def dump(path, obj): function load (line 43) | def load(path): function join_path (line 49) | def join_path(a, *p): function is_dir (line 52) | def is_dir(path): function is_path (line 58) | def is_path(path): function get_dir (line 62) | def get_dir(path): function get_parent_dir (line 72) | def get_parent_dir(path): function get_filename (line 76) | def get_filename(path): function get_absolute_path (line 79) | def get_absolute_path(p): function cd (line 84) | def cd(p): function ls (line 88) | def ls(path = '.', suffix = None): function find_files (line 106) | def find_files(pattern): function read_lines (line 110) | def read_lines(p): function write_lines (line 116) | def write_lines(p, lines, append_break = False): function cat (line 126) | def cat(p): function exists (line 131) | def exists(path): function not_exists (line 135) | def not_exists(path): function load_mat (line 138) | def load_mat(path): function dump_mat (line 143) | def dump_mat(path, dict_obj, append = True): function dir_mat (line 149) | def dir_mat(path): function get_file_size (line 161) | def get_file_size(path, unit = SIZE_UNIT_K): function create_h5 (line 166) | def create_h5(path): function open_h5 (line 172) | def open_h5(path, mode = 'r'): function read_h5 (line 177) | def read_h5(h5, key): function read_h5_attrs (line 179) | def read_h5_attrs(h5, key, attrs): function copy (line 182) | def copy(src, dest): function remove (line 189) | def remove(p): function search (line 194) | def search(pattern, path, file_only = True): function dump_json (line 220) | def dump_json(path, data): function load_json (line 229) | def load_json(path): FILE: util/logging.py class Logger (line 21) | class Logger(object): method __init__ (line 22) | def __init__(self, fpath=None): method __del__ (line 37) | def __del__(self): method __enter__ (line 40) | def __enter__(self): method __exit__ (line 43) | def __exit__(self, *args): method write (line 46) | def write(self, msg): method flush (line 51) | def flush(self): method close (line 57) | def close(self): class TFLogger (line 63) | class TFLogger(object): method __init__ (line 64) | def __init__(self, log_dir=None): method scalar_summary (line 70) | def scalar_summary(self, tag, value, step): method image_summary (line 76) | def image_summary(self, tag, images, step): method histo_summary (line 100) | def histo_summary(self, tag, values, step, bins=1000): method close (line 128) | def close(self): FILE: util/meters.py class AverageMeter (line 4) | class AverageMeter(object): method __init__ (line 7) | def __init__(self): method reset (line 13) | def reset(self): method update (line 19) | def update(self, val, n=1): FILE: util/misc.py function to_device (line 10) | def to_device(*tensors): function mkdirs (line 16) | def mkdirs(newdir): function rescale_result (line 30) | def rescale_result(image, bbox_contours, H, W): function fill_hole (line 43) | def fill_hole(input_mask): function regularize_sin_cos (line 56) | def regularize_sin_cos(sin, cos): function gaussian2D (line 62) | def gaussian2D(shape, sigma=1): function draw_gaussian (line 71) | def draw_gaussian(heatmap, center, radius, k=1, delte=6): function gaussian_radius (line 87) | def gaussian_radius(det_size, min_overlap=0.7): function point_dist_to_line (line 110) | def point_dist_to_line(line, p3): class AverageMeter (line 130) | class AverageMeter(object): method __init__ (line 132) | def __init__(self): method reset (line 135) | def reset(self): method update (line 141) | def update(self, val, n=1): function norm2 (line 148) | def norm2(x, axis=None): function cos (line 154) | def cos(p1, p2): function vector_sin (line 158) | def vector_sin(v): function vector_cos (line 165) | def vector_cos(v): function find_bottom (line 172) | def find_bottom(pts): function split_long_edges (line 238) | def split_long_edges(points, bottoms): function find_long_edges (line 260) | def find_long_edges(points, bottoms): function split_edge_seqence (line 283) | def split_edge_seqence(points, n_parts): function split_edge_seqence_with_cell_division (line 317) | def split_edge_seqence_with_cell_division(points, n_parts): function split_edge_seqence_by_step (line 338) | def split_edge_seqence_by_step(points, long_edge1, long_edge2, step=16.0): function disjoint_find (line 355) | def disjoint_find(x, F): function disjoint_merge (line 362) | def disjoint_merge(x, y, F): function merge_polygons (line 371) | def merge_polygons(polygons, merge_map): function get_sample_point (line 394) | def get_sample_point(text_mask, num_points, approx_factor, scales=None): FILE: util/pbox.py function functools_reduce (line 9) | def functools_reduce(a): function minConnectPath (line 16) | def minConnectPath(list_all: List[list]): function bbox_transfor_inv (line 62) | def bbox_transfor_inv(radius_map, sin_map, cos_map, score_map, wclip=(2,... FILE: util/serialization.py function read_json (line 21) | def read_json(fpath): function write_json (line 27) | def write_json(obj, fpath): function save_checkpoint (line 33) | def save_checkpoint(state, is_best, fpath='checkpoint.pth.tar'): function load_checkpoint (line 52) | def load_checkpoint(fpath): function copy_state_dict (line 69) | def copy_state_dict(state_dict, model, strip=None): FILE: util/shedule.py class FixLR (line 3) | class FixLR(_LRScheduler): method __init__ (line 24) | def __init__(self, optimizer, last_epoch=-1): method get_lr (line 27) | def get_lr(self): FILE: util/strs.py function int_array_to_str (line 2) | def int_array_to_str(arr): function join (line 7) | def join(arr, splitter=','): function is_str (line 16) | def is_str(s): function to_lowercase (line 20) | def to_lowercase(s): function to_uppercase (line 24) | def to_uppercase(s): function ends_with (line 28) | def ends_with(s, suffix, ignore_case = False): function starts_with (line 43) | def starts_with(s, prefix, ignore_case = False): function contains (line 58) | def contains(s, target, ignore_case = False): function index_of (line 65) | def index_of(s, target): function replace_all (line 69) | def replace_all(s, old, new, reg = False): function remove_all (line 80) | def remove_all(s, sub): function split (line 84) | def split(s, splitter, reg = False): function remove_invisible (line 91) | def remove_invisible(s): function find_all (line 100) | def find_all(s, pattern): function is_none_or_empty (line 105) | def is_none_or_empty(s): function to_json (line 111) | def to_json(obj): function to_list (line 116) | def to_list(obj): function to_tuple (line 124) | def to_tuple(obj): FILE: util/summary.py class LogSummary (line 5) | class LogSummary(object): method __init__ (line 7) | def __init__(self, log_path): method write_scalars (line 12) | def write_scalars(self, scalar_dict, n_iter, tag=None): method write_hist_parameters (line 19) | def write_hist_parameters(self, net, n_iter): FILE: util/vis_flux.py function label2color (line 12) | def label2color(label): function vis_direction_field (line 36) | def vis_direction_field(gt_flux): function vis_flux (line 59) | def vis_flux(vis_image, pred_flux, gt_flux, gt_mask, image_name, save_dir): FILE: util/visualize.py function visualize_network_output (line 15) | def visualize_network_output(output_dict, input_dict, mode='train'): function visualize_gt (line 134) | def visualize_gt(image, contours, label_tag): function visualize_detection (line 149) | def visualize_detection(image, output_dict, meta=None):