Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WalBouss/GEM
/ functions
Functions
23 in github.com/WalBouss/GEM
⨍
Functions
23
◇
Types & classes
4
↓ 2 callers
Method
__init__
(self, vit)
gem/gem_utils.py:152
↓ 2 callers
Function
create_gem_model
( model_name: str, pretrained: Optional[str] = None, gem_depth: int = 7, ss_at
gem/gem.py:91
↓ 2 callers
Method
encode_text
(self, text: list)
gem/gem_wrapper.py:44
↓ 2 callers
Function
get_gem_img_transform
( img_size: Union[int, Tuple[int, int]] = (448, 448), mean: Optional[Tuple[float, ...]] = Non
gem/gem.py:76
↓ 2 callers
Method
min_max
(self, logits)
gem/gem_wrapper.py:51
↓ 2 callers
Function
visualize
(image, text, logits, alpha=0.6, save_path=None)
gem/gem.py:150
↓ 1 callers
Function
_read_reqs
(relpath)
setup.py:14
↓ 1 callers
Method
apply_gem
(self)
gem/gem_wrapper.py:22
↓ 1 callers
Function
available_models
Returns the names of available GEM-VL models
gem/gem.py:61
↓ 1 callers
Method
batched_forward
:param image: torch.Tensor [B, 3, H, W] :param text: list[list[]] :param normalize: bool - if True performs min-max normaliza
gem/gem_wrapper.py:87
↓ 1 callers
Function
resample_abs_pos_embed
( posemb, new_size: List[int], old_size: Optional[List[int]] = None, num_prefi
gem/gem_utils.py:12
Method
__init__
(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., ss_attn_iter=1,
gem/gem_utils.py:46
Method
__init__
(self, res_block)
gem/gem_utils.py:127
Method
__init__
(self, model, tokenizer, depth=7, ss_attn_iter=1, ss_attn_temp=None)
gem/gem_wrapper.py:12
Function
change_to_url
(url)
app.py:34
Function
change_weights
Handle changing model's weights triggered by a Dropdown module change.
app.py:26
Function
create_model_and_transforms
( model_name: str, pretrained: Optional[str] = None, gem_depth: int = 7, preci
gem/gem.py:124
Method
forward
(self, x, attn_bias=None, prev_attn=None)
gem/gem_utils.py:60
Method
forward
(self, q_x: torch.Tensor, k_x: Optional[torch.Tensor] = None,
gem/gem_utils.py:131
Method
forward
:param image: torch.Tensor [1, 3, H, W] :param text: list[] :param normalize: bool - if True performs min-max normalization
gem/gem_wrapper.py:58
Function
get_tokenizer
Wrapper around openclip get_tokenizer function
gem/gem.py:67
Function
modified_vit_forward
(self, x: torch.Tensor)
gem/gem_utils.py:155
Function
viz_func
(url, image, text, model_weights)
app.py:38