SwanLab icon indicating copy to clipboard operation
SwanLab copied to clipboard

feat: swanlab.Video

Open Zeyi-Lin opened this issue 11 months ago • 0 comments

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 avatar Jan 05 '25 11:01 Zeyi-Lin