MCPcopy Create free account

hub / github.com/Seunggu0305/VLCounter / functions

Functions81 in github.com/Seunggu0305/VLCounter

↓ 7 callersFunctionget_model_dir
Obtain the directory to save/load the model
tools/util.py:93
↓ 5 callersFunctiontokenize
Returns the tokenized representation of given input string(s) Parameters ---------- texts : Union[str, List[str]] An input st
tools/dataset/tokenizer.py:140
↓ 4 callersMethod__init__
(self, drop_prob=None)
tools/models/Encoder_utils.py:24
↓ 4 callersMethodinit_weights
(self)
tools/models/VLCounter.py:107
↓ 3 callersMethodattention
(self, x: torch.Tensor)
tools/models/Encoder_utils.py:96
↓ 3 callersFunctionget_val_loader
Build the episodic validation loader.
tools/dataset/datasets.py:208
↓ 2 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
tools/dataset/tokenizer.py:19
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
tools/dataset/tokenizer.py:41
↓ 2 callersFunctionvalidate_model
( args: argparse.Namespace, val_loader: torch.utils.data.DataLoader, model : torch.nn.Module,
tools/test.py:79
↓ 1 callersMethod__init__
(self, data_root, prompt, singular, mode, main_transform)
tools/dataset/datasets.py:236
↓ 1 callersMethod__init__
(self, input_resolution=384, patch_size=16, width=768, layers=12, heads=12, output_dim=512, drop_path_rate=0.1
tools/models/ViT_Encoder.py:13
↓ 1 callersMethod__init__
(self, in_channels, out_channels, kernel, padding=0, flag=True)
tools/models/VLCounter.py:33
↓ 1 callersMethod_init_prompt
(self, patch, num_tokens, prompt_dim, total_d_layer)
tools/models/ViT_Encoder.py:175
↓ 1 callersMethod_init_prompt
(self, patch, num_tokens, prompt_dim, total_d_layer)
tools/models/ViT_Encoder_add.py:55
↓ 1 callersFunctionbasic_clean
(text)
tools/dataset/tokenizer.py:53
↓ 1 callersMethodbpe
(self, token)
tools/dataset/tokenizer.py:83
↓ 1 callersMethodbuild_attention_mask
(self)
tools/models/Text_Encoder.py:69
↓ 1 callersFunctionconstant_init
(module, val, bias=0)
tools/models/VLCounter.py:26
↓ 1 callersMethodd3_to_d4
(self, t)
tools/models/VLCounter.py:154
↓ 1 callersMethodd4_to_d3
(self, t)
tools/models/VLCounter.py:161
↓ 1 callersMethoddecode
(self, tokens)
tools/dataset/tokenizer.py:132
↓ 1 callersFunctiondefault_bpe
()
tools/dataset/tokenizer.py:14
↓ 1 callersMethodencode
(self, text)
tools/dataset/tokenizer.py:124
↓ 1 callersMethodforward
(self, x)
tools/models/Encoder_utils.py:28
↓ 1 callersMethodforward_deep_prompt
(self, embedding_output, features, H, W, out_last=False)
tools/models/ViT_Encoder.py:289
↓ 1 callersMethodforward_deep_prompt
(self, embedding_output, features, H, W, _t, out_last=False)
tools/models/ViT_Encoder_add.py:177
↓ 1 callersFunctionget_model_dir_carpk
Obtain the directory to save/load the model
tools/util.py:104
↓ 1 callersFunctionget_model_dir_pucpr
Obtain the directory to save/load the model
tools/util.py:116
↓ 1 callersFunctionget_train_loader
Build the train loader. This is a episodic loader.
tools/dataset/datasets.py:182
↓ 1 callersFunctionmain
(args)
tools/train.py:59
↓ 1 callersFunctionmain
(args)
tools/test.py:44
↓ 1 callersFunctionmain
(args)
tools/test_fish.py:44
↓ 1 callersFunctionmain
(args)
tools/test_carpk.py:40
↓ 1 callersFunctionmain
(args)
tools/test_pucpr.py:39
↓ 1 callersFunctionparse_args
()
tools/train.py:21
↓ 1 callersFunctionparse_args
()
tools/test.py:16
↓ 1 callersFunctionparse_args
()
tools/test_fish.py:16
↓ 1 callersFunctionparse_args
()
tools/test_carpk.py:16
↓ 1 callersFunctionparse_args
()
tools/test_pucpr.py:15
↓ 1 callersFunctiontrain_model
( args: argparse.Namespace, train_loader: torch.utils.data.DataLoader, model: torch.nn.Module,
tools/train.py:185
↓ 1 callersFunctiontrunc_normal_init
(module: nn.Module, mean: float = 0, std: float = 1,
tools/models/VLCounter.py:14
↓ 1 callersFunctionvalidate_model
( args: argparse.Namespace, val_loader: torch.utils.data.DataLoader, model : torch.nn.Module,
tools/test_fish.py:79
↓ 1 callersFunctionvalidate_model
( args: argparse.Namespace, val_loader: torch.utils.data.DataLoader, model : torch.nn.Module,
tools/test_carpk.py:80
↓ 1 callersFunctionvalidate_model
( args: argparse.Namespace, val_loader: torch.utils.data.DataLoader, model : torch.nn.Module,
tools/test_pucpr.py:79
↓ 1 callersFunctionwhitespace_clean
(text)
tools/dataset/tokenizer.py:59
Method__call__
(self, sample)
tools/dataset/datasets.py:54
Method__call__
(self, sample)
tools/dataset/datasets.py:153
Method__getitem__
(self, index)
tools/dataset/datasets.py:297
Method__init__
(self, bpe_path: str = default_bpe())
tools/dataset/tokenizer.py:66
Method__init__
(self, MAX_HW=384)
tools/dataset/datasets.py:50
Method__init__
(self, img_size)
tools/dataset/datasets.py:148
Method__init__
(self, input_resolution=384, patch_size=16, width=768, layers=12, heads=12, output_dim=512, drop_path_rate=0.1
tools/models/ViT_Encoder.py:138
Method__init__
(self, out_dim, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., settings='')
tools/models/Encoder_utils.py:36
Method__init__
(self, d_model: int, n_head: int, attn_mask: torch.Tensor = None)
tools/models/Encoder_utils.py:83
Method__init__
(self, width: int, layers: int, heads: int, attn_mask: torch.Tensor = None, drop_path_rate=0.)
tools/models/Encoder_utils.py:136
Method__init__
(self, width: int, layers: int, heads: int, attn_mask: torch.Tensor = None, drop_path_rate=0.)
tools/models/Encoder_utils.py:153
Method__init__
(self, input_resolution=384, patch_size=16, width=768, layers=12, heads=12, output_dim=512, drop_path_rate=0.1
tools/models/ViT_Encoder_add.py:14
Method__init__
(self, context_length=77, vocab_size=49408, # vocab_size=49408+1,
tools/models/Text_Encoder.py:10
Method__init__
(self, args)
tools/models/VLCounter.py:52
Method__len__
(self)
tools/dataset/datasets.py:294
Methodextra_repr
(self)
tools/models/Encoder_utils.py:31
Methodforward
(self, x: torch.Tensor)
tools/models/ViT_Encoder.py:81
Methodforward
(self, x: torch.Tensor)
tools/models/ViT_Encoder.py:242
Methodforward
(self, x: torch.Tensor)
tools/models/Encoder_utils.py:10
Methodforward
(self, x: torch.Tensor)
tools/models/Encoder_utils.py:17
Methodforward
(self, x)
tools/models/Encoder_utils.py:48
Methodforward
(self, x)
tools/models/Encoder_utils.py:105
Methodforward
(self, x: torch.Tensor)
tools/models/Encoder_utils.py:142
Methodforward
(self, x: torch.Tensor)
tools/models/Encoder_utils.py:159
Methodforward
(self, x: torch.Tensor, _t: torch.Tensor)
tools/models/ViT_Encoder_add.py:130
Methodforward
(self, text)
tools/models/Text_Encoder.py:77
Methodforward
(self, trg)
tools/models/VLCounter.py:44
Methodforward
(self, v, tokenized_text)
tools/models/VLCounter.py:118
Methodforward_attention
(self, x: torch.Tensor)
tools/models/Encoder_utils.py:146
Methodforward_attention
(self, x: torch.Tensor)
tools/models/Encoder_utils.py:167
Methodinit_weights
(self, pretrained=None)
tools/models/ViT_Encoder.py:40
Methodinit_weights
(self, pretrained=None)
tools/models/ViT_Encoder.py:205
Methodinit_weights
(self, pretrained=None)
tools/models/ViT_Encoder_add.py:85
Methodinit_weights
(self, pretrained=None)
tools/models/Text_Encoder.py:39
Functionsave_density_map
(query_img, pred_D,attn, GT_D,output_dir, fname='results.png', class_chosen=None, pred_cnt=None)
tools/util.py:46
Functionsave_density_map_carpk
(query_img, pred_D,attn,cnt_err,output_dir, fname='results.png', class_chosen=None, pred_cnt=None)
tools/util.py:7