MCPcopy Create free account

hub / github.com/ZhengPeng7/BiRefNet / functions

Functions221 in github.com/ZhengPeng7/BiRefNet

↓ 11 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
models/backbones/pvt_v2.py:15
↓ 11 callersMethodinfo
(self, txt)
utils.py:54
↓ 8 callersMethod__init__
(self)
loss.py:72
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
models/backbones/swin_v1.py:23
↓ 5 callersFunction_prepare_data
(pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:98
↓ 5 callersMethodget_patches_batch
(self, x, p)
models/birefnet.py:200
↓ 5 callersMethodstep
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:118
↓ 4 callersFunctionpath_to_image
(path, size=(1024, 1024), color_type=['rgb', 'gray'][0])
utils.py:11
↓ 4 callersMethodssim
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:269
↓ 3 callersMethod__init__
(self, in_channels=64, out_channels=None, output_stride=16)
models/modules/aspp.py:27
↓ 3 callersMethod__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., dr
models/modules/mlp.py:75
↓ 3 callersMethod__init__
(self, in_channels=3+1)
models/refinement/refiner.py:64
↓ 3 callersFunctionbuild_backbone
(bb_name, pretrained=True, params_settings='')
models/backbones/build_backbone.py:12
↓ 2 callersMethod__init__
(self, channels)
models/birefnet.py:150
↓ 2 callersMethod__init__
(self, in_channels, S=4, reduction=4)
models/modules/attentions.py:27
↓ 2 callersMethod__init__
(self, in_channels=64, out_channels=None, inter_channels=64)
models/modules/decoder_blocks.py:37
↓ 2 callersMethod_freeze_stages
(self)
models/backbones/swin_v1.py:564
↓ 2 callersFunction_get_adaptive_threshold
(matrix: np.ndarray, max_value: float = 1)
evaluation/metrics.py:106
↓ 2 callersMethodapproximate_RDP
(self, boundaries, epsilon=1.0)
evaluation/metrics.py:597
↓ 2 callersFunctionbuild_norm_layer
(dim, norm_layer, in_format='channels_last', ou
models/modules/utils.py:15
↓ 2 callersFunctioncheck_state_dict
(state_dict, unwanted_prefix='_orig_mod.')
utils.py:29
↓ 2 callersFunctioncreate_window
(window_size, channel)
loss.py:220
↓ 2 callersFunctionevaluate
(pred_dir, method, testset, only_S_MAE=False, epoch=0)
evaluation/evaluate.py:10
↓ 2 callersFunctionevaluator
(gt_paths, pred_paths, metrics=['S', 'MAE', 'E', 'F', 'WF', 'HCE'], verbose=False)
evaluation/metrics.py:15
↓ 2 callersMethodfilter_bdy_cond
(self, bdy_, mask, cond)
evaluation/metrics.py:546
↓ 2 callersMethodgenerate_parts_numel_combinations
(self, fg_fg_numel, fg_bg_numel, pred_fg_numel, pred_bg_numel)
evaluation/metrics.py:381
↓ 2 callersFunctioninference
(model, data_loader_test, pred_root, method, testset, device=0)
inference.py:18
↓ 2 callersFunctionprepare_dataloader
(dataset: torch.utils.data.Dataset, batch_size: int, to_be_distributed=False, is_train=True)
train.py:65
↓ 2 callersMethods_object
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:216
↓ 2 callersMethodtrain
Convert the model into training mode while keep layers freezed.
models/backbones/swin_v1.py:608
↓ 2 callersMethodupdate
(self, val, n=1)
utils.py:73
↓ 2 callersFunctionvalid
(model, data_loader_test, pred_dir, method='tmp_val', testset='DIS-VD', only_S_MAE=True, device=0)
evaluation/valid.py:5
↓ 2 callersMethodvalidate_model
(self, epoch)
train.py:251
↓ 2 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
models/backbones/swin_v1.py:41
↓ 1 callersFunctionSSIM
(x, y)
loss.py:250
↓ 1 callersMethod__init__
(self)
models/modules/utils.py:50
↓ 1 callersMethod_load_adv_components
(self)
train.py:153
↓ 1 callersFunction_ssim
(img1, img2, window, window_size, channel, size_average=True)
loss.py:227
↓ 1 callersMethod_train_batch
(self, batch)
train.py:176
↓ 1 callersFunctionbuild_act_layer
(act_layer)
models/modules/utils.py:4
↓ 1 callersMethodcal_adaptive_em
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:311
↓ 1 callersMethodcal_adaptive_fm
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:129
↓ 1 callersMethodcal_changeable_em
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:316
↓ 1 callersMethodcal_em_with_cumsumhistogram
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:349
↓ 1 callersMethodcal_em_with_threshold
(self, pred: np.ndarray, gt: np.ndarray, threshold: float)
evaluation/metrics.py:320
↓ 1 callersMethodcal_hce
(self, pred: np.ndarray, gt: np.ndarray, gt_ske: np.ndarray, relax=5, epsilon=2.0)
evaluation/metrics.py:491
↓ 1 callersMethodcal_mae
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:178
↓ 1 callersMethodcal_pr
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:141
↓ 1 callersMethodcal_sm
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:198
↓ 1 callersMethodcal_wfm
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:423
↓ 1 callersMethodcentroid
(self, matrix: np.ndarray)
evaluation/metrics.py:235
↓ 1 callersMethodclose
(self)
utils.py:57
↓ 1 callersFunctioncolor_enhance
(image)
preproc.py:50
↓ 1 callersFunctioncv_random_flip
(img, label)
preproc.py:21
↓ 1 callersMethoddivide_with_xy
(self, pred: np.ndarray, gt: np.ndarray, x, y)
evaluation/metrics.py:246
↓ 1 callersFunctiondo_eval
(opt)
eval_existingOnes.py:16
↓ 1 callersMethodforward_enc
(self, x)
models/birefnet.py:66
↓ 1 callersMethodforward_features
(self, x)
models/backbones/pvt_v2.py:314
↓ 1 callersMethodforward_ori
(self, x)
models/birefnet.py:100
↓ 1 callersFunctiongaussian
(window_size, sigma)
loss.py:215
↓ 1 callersFunctiongaussianNoisy
(im, mean=mean, sigma=sigma)
preproc.py:63
↓ 1 callersMethodget_results
(self)
evaluation/metrics.py:159
↓ 1 callersMethodget_results
(self)
evaluation/metrics.py:182
↓ 1 callersMethodget_results
(self)
evaluation/metrics.py:291
↓ 1 callersMethodget_results
(self)
evaluation/metrics.py:403
↓ 1 callersMethodget_results
(self)
evaluation/metrics.py:471
↓ 1 callersMethodget_results
(self)
evaluation/metrics.py:486
↓ 1 callersFunctioninit_data_loaders
(to_be_distributed)
train.py:78
↓ 1 callersFunctioninit_models_optimizers
(epochs, to_be_distributed)
train.py:96
↓ 1 callersFunctionload_weights
(model, model_name)
models/backbones/build_backbone.py:28
↓ 1 callersFunctionmain
()
train.py:290
↓ 1 callersFunctionmain
()
waiting4eval.py:75
↓ 1 callersFunctionmain
(args)
inference.py:44
↓ 1 callersFunctionmain
()
evaluation/evaluate.py:50
↓ 1 callersMethodmatlab_style_gauss2D
2D gaussian mask - should give the same result as MATLAB's fspecial('gaussian',[shape],[sigma])
evaluation/metrics.py:457
↓ 1 callersMethodobject
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:209
↓ 1 callersFunctionpreproc
(image, label, preproc_methods=['flip'])
preproc.py:7
↓ 1 callersMethodprint_task
(self)
config.py:144
↓ 1 callersFunctionrandom_crop
(image, label)
preproc.py:28
↓ 1 callersFunctionrandom_pepper
(img, N=0.0015)
preproc.py:75
↓ 1 callersFunctionrandom_rotate
(image, label, angle=15)
preproc.py:41
↓ 1 callersMethodregion
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:222
↓ 1 callersMethodreset
(self)
utils.py:67
↓ 1 callersFunctionsave_tensor_img
(tenor_im, path)
utils.py:84
↓ 1 callersFunctionset_seed
(seed)
utils.py:92
↓ 1 callersMethodstep
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:172
↓ 1 callersMethodstep
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:192
↓ 1 callersMethodstep
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:301
↓ 1 callersMethodstep
(self, pred: np.ndarray, gt: np.ndarray)
evaluation/metrics.py:414
↓ 1 callersMethodstep
(self, pred: np.ndarray, gt: np.ndarray, gt_ske)
evaluation/metrics.py:480
↓ 1 callersMethodtrain_epoch
(self, epoch)
train.py:225
↓ 1 callersFunctionvalidate_model
(model, test_loaders, epoch)
waiting4eval.py:36
↓ 1 callersFunctionwindow_reverse
Args: windows: (num_windows*B, window_size, window_size, C) window_size (int): Window size H (int): Height of image
models/backbones/swin_v1.py:56
Method__getitem__
(self, index)
dataset.py:86
Method__init__
(self, channels=1, img_size=256)
loss.py:10
Method__init__
(self)
loss.py:39
Method__init__
(self)
loss.py:90
Method__init__
(self)
loss.py:107
Method__init__
(self)
loss.py:124
Method__init__
(self)
loss.py:135
next →1–100 of 221, ranked by callers