Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: swanlab.Video #765

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

feat: swanlab.Video #765

wants to merge 8 commits into from

Conversation

Zeyi-Lin
Copy link
Member

@Zeyi-Lin Zeyi-Lin commented Jan 5, 2025

Description

  1. 增加swanlab.Video类,为视频图表做准备
  2. 使用方式:
import numpy as np
import swanlab

swanlab.init()
frames = np.random.randint(low=0, high=256, size=(10, 3, 100, 100), dtype=np.uint8)

swanlab.log({"video": swanlab.Video(frames, fps=4)})

备注:

  1. 如果输入的是文件路径,则以该文件路径的后缀为格式
  2. 如果输入的是字节流或Numpy/Tensor,则当format参数为None时是gif格式,不为None时则以format为格式。

@Zeyi-Lin Zeyi-Lin requested a review from SAKURA-CAT January 5, 2025 11:48
@Zeyi-Lin Zeyi-Lin self-assigned this Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant