Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/VAST-AI-Research/TripoSR
/ functions
Functions
88 in github.com/VAST-AI-Research/TripoSR
⨍
Functions
88
◇
Types & classes
28
↓ 8 callers
Method
end
(self, name: str)
run.py:29
↓ 8 callers
Method
start
(self, name: str)
run.py:23
↓ 6 callers
Function
find_class
(cls_string)
tsr/utils.py:24
↓ 4 callers
Method
__init__
(self, dim_in: int, dim_out: int, approximate: str = "none")
tsr/models/transformer/basic_transformer_block.py:272
↓ 4 callers
Method
query_triplane
( self, decoder: torch.nn.Module, positions: torch.Tensor, triplane: torch.Ten
tsr/models/nerf_renderer.py:41
↓ 3 callers
Method
from_pretrained
( cls, pretrained_model_name_or_path: str, config_name: str, weight_name: str )
tsr/system.py:52
↓ 3 callers
Method
gelu
(self, gate: torch.Tensor)
tsr/models/transformer/basic_transformer_block.py:277
↓ 3 callers
Method
head_to_batch_dim
r""" Reshape the tensor from `[batch_size, seq_len, dim]` to `[batch_size, seq_len, heads, dim // heads]` `heads` is the number of hea
tsr/models/transformer/attention.py:280
↓ 3 callers
Method
make_linear
( self, dim_in, dim_out, bias=True, weight_init=None, bias_ini
tsr/models/network_utils.py:81
↓ 3 callers
Method
render
( self, scene_codes, n_views: int, elevation_deg: float = 0.0, camera_
tsr/system.py:122
↓ 3 callers
Function
scale_tensor
(dat: torch.FloatTensor, inp_scale: ValidScale, tgt_scale: ValidScale)
tsr/utils.py:224
↓ 2 callers
Method
_forward
( self, decoder: torch.nn.Module, triplane: torch.Tensor, rays_o: torch.Tensor
tsr/models/nerf_renderer.py:93
↓ 2 callers
Method
convert_and_resize
( self, image: Union[PIL.Image.Image, np.ndarray, torch.Tensor], size: int, )
tsr/utils.py:65
↓ 2 callers
Method
extract_mesh
(self, scene_codes, has_vertex_color, resolution: int = 256, threshold: float = 25.0)
tsr/system.py:171
↓ 2 callers
Function
fill_background
(image)
gradio_app.py:43
↓ 2 callers
Function
get_activation
(name)
tsr/utils.py:236
↓ 2 callers
Method
make_activation
(self, activation)
tsr/models/network_utils.py:108
↓ 2 callers
Method
norm_encoder_hidden_states
r""" Normalize the encoder hidden states. Requires `self.norm_cross` to be specified when constructing the `Attention` class.
tsr/models/transformer/attention.py:416
↓ 2 callers
Method
prepare_attention_mask
r""" Prepare the attention mask for the attention computation. Args: attention_mask (`torch.Tensor`): The
tsr/models/transformer/attention.py:357
↓ 2 callers
Function
remove_background
( image: PIL.Image.Image, rembg_session: Any = None, force: bool = False, **rembg_kwargs, )
tsr/utils.py:402
↓ 2 callers
Function
resize_foreground
( image: PIL.Image.Image, ratio: float, )
tsr/utils.py:417
↓ 2 callers
Method
set_chunk_size
(self, chunk_size: int)
tsr/models/nerf_renderer.py:35
↓ 1 callers
Function
bake_texture
(mesh, model, scene_code, texture_resolution)
tsr/bake_texture.py:151
↓ 1 callers
Method
batch_to_head_dim
r""" Reshape the tensor from `[batch_size, seq_len, dim]` to `[batch_size // heads, seq_len, dim * heads]`. `heads` is the number of h
tsr/models/transformer/attention.py:261
↓ 1 callers
Function
chunk_batch
(func: Callable, chunk_size: int, *args, **kwargs)
tsr/utils.py:154
↓ 1 callers
Method
configure
(self, *args, **kwargs)
tsr/utils.py:60
↓ 1 callers
Method
detokenize
(self, tokens: torch.Tensor)
tsr/models/tokenizers/triplane.py:35
↓ 1 callers
Method
gelu
(self, gate: torch.Tensor)
tsr/models/transformer/basic_transformer_block.py:306
↓ 1 callers
Function
generate
(image, mc_resolution, formats=["obj", "glb"])
gradio_app.py:61
↓ 1 callers
Method
get_attention_scores
r""" Compute the attention scores. Args: query (`torch.Tensor`): The query tensor. key (`torch.Tensor`): The
tsr/models/transformer/attention.py:303
↓ 1 callers
Function
get_ray_directions
Get ray directions for all pixels in camera coordinate. Reference: https://www.scratchapixel.com/lessons/3d-basic-rendering/ r
tsr/utils.py:257
↓ 1 callers
Function
get_rays
( directions, c2w, keepdim=False, normalize=False, )
tsr/utils.py:299
↓ 1 callers
Function
get_spherical_cameras
( n_views: int, elevation_deg: float, camera_distance: float, fovy_deg: float, height: int
tsr/utils.py:341
↓ 1 callers
Function
make_atlas
(mesh, texture_resolution, texture_padding)
tsr/bake_texture.py:9
↓ 1 callers
Function
parse_structured
(fields: Any, cfg: Optional[Union[dict, DictConfig]] = None)
tsr/utils.py:19
↓ 1 callers
Function
positions_to_colors
(model, scene_code, positions_texture, texture_resolution)
tsr/bake_texture.py:137
↓ 1 callers
Function
preprocess
(input_image, do_remove_background, foreground_ratio)
gradio_app.py:42
↓ 1 callers
Function
rasterize_position_atlas
( mesh, atlas_vmapping, atlas_indices, atlas_uvs, texture_resolution, texture_padding )
tsr/bake_texture.py:25
↓ 1 callers
Function
rays_intersect_bbox
( rays_o: torch.Tensor, rays_d: torch.Tensor, radius: float, near: float = 0.0, valid_thre
tsr/utils.py:117
↓ 1 callers
Function
save_video
( frames: List[PIL.Image.Image], output_path: str, fps: int = 30, )
tsr/utils.py:458
↓ 1 callers
Method
set_marching_cubes_resolution
(self, resolution: int)
tsr/system.py:163
↓ 1 callers
Method
set_processor
(self, processor: "AttnProcessor")
tsr/models/transformer/attention.py:224
↓ 1 callers
Function
to_gradio_3d_orientation
(mesh)
tsr/utils.py:471
Method
__call__
( self, image: Union[ PIL.Image.Image, np.ndarray, torch.F
tsr/utils.py:95
Method
__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_stat
tsr/models/transformer/attention.py:489
Method
__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_stat
tsr/models/transformer/attention.py:569
Method
__init__
(self)
run.py:18
Method
__init__
( self, cfg: Optional[Union[dict, DictConfig]] = None, *args, **kwargs )
tsr/utils.py:53
Method
__init__
(self, resolution: int)
tsr/models/isosurface.py:18
Method
__init__
( self, dim: int, num_attention_heads: int, attention_head_dim: int, d
tsr/models/transformer/basic_transformer_block.py:75
Method
__init__
( self, dim: int, dim_out: Optional[int] = None, mult: int = 4, dropou
tsr/models/transformer/basic_transformer_block.py:222
Method
__init__
(self, dim_in: int, dim_out: int)
tsr/models/transformer/basic_transformer_block.py:300
Method
__init__
(self, dim_in: int, dim_out: int)
tsr/models/transformer/basic_transformer_block.py:328
Method
__init__
( self, query_dim: int, cross_attention_dim: Optional[int] = None, heads: int
tsr/models/transformer/attention.py:97
Method
__init__
(self)
tsr/models/transformer/attention.py:563
Method
_query_chunk
(x)
tsr/models/nerf_renderer.py:56
Function
check_input_image
(input_image)
gradio_app.py:37
Method
configure
(self)
tsr/system.py:73
Method
configure
(self)
tsr/models/nerf_renderer.py:31
Method
configure
(self)
tsr/models/network_utils.py:19
Method
configure
(self)
tsr/models/network_utils.py:48
Method
configure
(self)
tsr/models/tokenizers/image.py:20
Method
configure
(self)
tsr/models/tokenizers/triplane.py:19
Method
configure
(self)
tsr/models/transformer/transformer_1d.py:72
Method
detokenize
(self, *args, **kwargs)
tsr/models/tokenizers/image.py:65
Method
eval
(self)
tsr/models/nerf_renderer.py:178
Method
forward
( self, image: Union[ PIL.Image.Image, np.ndarray, torch.F
tsr/system.py:87
Method
forward
( self, decoder: torch.nn.Module, triplane: torch.Tensor, rays_o: torch.Tensor
tsr/models/nerf_renderer.py:154
Method
forward
( self, level: torch.FloatTensor, )
tsr/models/isosurface.py:40
Method
forward
(self, triplanes: torch.Tensor)
tsr/models/network_utils.py:24
Method
forward
(self, x)
tsr/models/network_utils.py:116
Method
forward
(self, images: torch.FloatTensor, **kwargs)
tsr/models/tokenizers/image.py:44
Method
forward
(self, batch_size: int)
tsr/models/tokenizers/triplane.py:29
Method
forward
( self, hidden_states: torch.FloatTensor, attention_mask: Optional[torch.FloatTensor]
tsr/models/transformer/basic_transformer_block.py:149
Method
forward
(self, hidden_states: torch.Tensor)
tsr/models/transformer/basic_transformer_block.py:256
Method
forward
(self, hidden_states)
tsr/models/transformer/basic_transformer_block.py:285
Method
forward
(self, hidden_states, scale: float = 1.0)
tsr/models/transformer/basic_transformer_block.py:312
Method
forward
(self, x: torch.Tensor)
tsr/models/transformer/basic_transformer_block.py:332
Method
forward
The [`Transformer1DModel`] forward method. Args: hidden_states (`torch.LongTensor` of shape `(batch size, num latent pix
tsr/models/transformer/transformer_1d.py:122
Method
forward
r""" The forward method of the `Attention` class. Args: hidden_states (`torch.Tensor`): The hidden states
tsr/models/transformer/attention.py:227
Method
fuse_projections
(self, fuse=True)
tsr/models/transformer/attention.py:450
Function
get_intrinsic_from_fov
(fov, H, W, bs=-1)
tsr/utils.py:32
Method
grid_vertices
(self)
tsr/models/isosurface.py:13
Method
grid_vertices
(self)
tsr/models/isosurface.py:25
Method
process_output
(image: torch.FloatTensor)
tsr/system.py:138
Function
run_example
(image_pil)
gradio_app.py:73
Method
set_chunk_feed_forward
(self, chunk_size: Optional[int], dim: int)
tsr/models/transformer/basic_transformer_block.py:144
Method
train
(self, mode=True)
tsr/models/nerf_renderer.py:174