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/image enhance #393

Merged
merged 3 commits into from
Mar 8, 2024
Merged

Feat/image enhance #393

merged 3 commits into from
Mar 8, 2024

Conversation

Zeyi-Lin
Copy link
Member

@Zeyi-Lin Zeyi-Lin commented Mar 8, 2024

Description

优化了swanlab.Image类,改进了:

  1. 增加参数size和file_type

    • file_type可以指定jpg、jpeg、bmp、png四种保存格式;
    • size默认为None即不缩放,如果size为int类型如1024,则设置边长超过1024则进行缩放;如果size为list或tuple类型,如(512, 512),那么将缩放到该尺寸;如果为(512,None)或(None, 512),那么将根据有数值的边等比例缩放。
  2. 支持PyTorch Tensor输入

Closes: #391 #384

@Zeyi-Lin Zeyi-Lin requested a review from SAKURA-CAT March 8, 2024 03:14
@Zeyi-Lin Zeyi-Lin self-assigned this Mar 8, 2024
@Zeyi-Lin Zeyi-Lin added this to the v0.2.3 milestone Mar 8, 2024
@SAKURA-CAT SAKURA-CAT merged commit c8f2b2b into main Mar 8, 2024
@SAKURA-CAT SAKURA-CAT deleted the feat/Image-enhance branch March 8, 2024 04:54
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.

[FEATURE] Add support for saving image from tensor
2 participants