Skip to content

Commit

Permalink
bump to 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawkey committed Jan 25, 2024
1 parent b24fc8e commit a2e8081
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author = 'kiui'

# The full version, including alpha/beta/rc tags
release = '0.2.1'
release = '0.2.2'


# -- General configuration ---------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions kiui/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ def main():
import imageio
images = []
elevation = [opt.elevation,]
# azimuth = np.arange(-180, 180, 2, dtype=np.int32) # back-->front-->back
azimuth = np.arange(0, 360, 2, dtype=np.int32) # front-->back-->front
# azimuth = np.arange(-180, 180, 3, dtype=np.int32) # back-->front-->back
azimuth = np.arange(0, 360, 3, dtype=np.int32) # front-->back-->front
for ele in tqdm.tqdm(elevation):
for azi in tqdm.tqdm(azimuth):
gui.cam.from_angle(ele, azi)
Expand All @@ -428,7 +428,7 @@ def main():
image = (gui.render_buffer * 255).astype(np.uint8)
images.append(image)
images = np.stack(images, axis=0)
# ~6 seconds, 180 frames at 30 fps
# ~4 seconds, 120 frames at 30 fps
imageio.mimwrite(opt.save_video, images, fps=30, quality=8, macro_block_size=1)
else:
gui.render()
Expand Down
10 changes: 3 additions & 7 deletions kiui/vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def plot_image(*xs, normalize=False, save=False):
Args:
xs (Sequence[Union[torch.Tensor, numpy.ndarray]]): can be uint8 or float32.
[B, 4/3/1, H, W], [B, H, W, 4/3/1], [4/3/1, H, W], [H, W, 4/3/1], [H, W] torch.Tensor
[B, H, W, 4/3/1], [B, 4/3/1, H, W], [H, W, 4/3/1], [4/3/1, H, W], [H, W] numpy.ndarray
[B, 4/3/1, H, W], [B, H, W, 4/3/1], [4/3/1, H, W], [H, W, 4/3/1], [H, W] torch.Tensor or numpy.ndarray
normalize (bool, optional): whether to renormalize the image to [0, 1]. Defaults to False.
save (bool, optional): whether to save the image to current dir (in case the plot cannot be showed, like in vscode remote). Defaults to False.
"""
Expand Down Expand Up @@ -90,13 +89,10 @@ def _plot_image(image):


def plot_matrix(*xs):
"""visualize some 2D matrix, different from ``kiui.vis.plot_image``,
this will keep the original range and plot channel-by-channel.
""" visualize some 2D matrix, different from ``kiui.vis.plot_image``, this will keep the original range and plot channel-by-channel.
Args:
xs (Sequence[Union[torch.Tensor, numpy.ndarray]]):
[B, C, H, W], [C, H, W], or [H, W] torch.Tensor
[B, H, W, C], [H, W, C], or [H, W] numpy.ndarray
xs (Sequence[Union[torch.Tensor, numpy.ndarray]]): [B, C, H, W], [C, H, W], or [H, W] torch.Tensor or numpy.ndarray
"""

def _plot_matrix(matrix):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if __name__ == "__main__":
setup(
name="kiui",
version="0.2.1",
version="0.2.2",
description="A toolkit for 3D vision",
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit a2e8081

Please sign in to comment.