Skip to main content

StyleTransfer provides a suite of tools for style migration tasks.

Project description

StyleTransfer

English | 中文


Project Overview

StyleTransfer provides a suite of tools for style migration tasks.

Installation

# from pypi
pip install chromasoul_style_transfer

# from release
pip install chromasoul_style_transfer-{version}-py3-none-any.whl

# from source code(without uv)
pip install -e .

# from source code(with uv)
uv sync

Quick start

  1. Use the cli tool.
style_transfer --input /path/to/input_image --reference /path/to/reference_image --output /path/to/output_image

# or shortcut
style_transfer -i /path/to/input_image -r /path/to/reference_image -o /path/to/output_image
  1. Use the example code.
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from style_transfer.libs import TransferFactory
from style_transfer.utils import ImageUtils


def main():
    # init image transfer
    transfer = TransferFactory.create("prism")

    # load the images
    img_ref = ImageUtils.load_img("path/to/input_image")
    img = ImageUtils.load_img("path/to/reference_image")

    # load the images
    transfer.extract(img_ref)
    img_tgt = transfer.transfer(img)

    # the target dir will be auto created
    ImageUtils.save_img(img_tgt, "path/to/output_image")


if __name__ == "__main__":
    main()

Available Methods

  • fast_photo_style (FastPhotoStyle-Style algorithm)

License

This project is licensed under the AGPLv3 License. This means you are free to use, modify, and distribute the code, but any modifications or services based on this project must be open-sourced under the same license. For commercial closed-source integration, please contact us for a commercial license.

See the LICENSE file for details.

Contact Me


ChromaSoul - Let every color find its soul mate ✨

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chromasoul_style_transfer-1.0.2.tar.gz (418.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chromasoul_style_transfer-1.0.2-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file chromasoul_style_transfer-1.0.2.tar.gz.

File metadata

File hashes

Hashes for chromasoul_style_transfer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0e3018d3b089471141acfbc3404effce726297d7499932ae49bd28cbc41730e0
MD5 19cd28a22bb3c90d91940a0639e89930
BLAKE2b-256 b50b9692e980140961fc9752172aa91fecb2cddf6ec10ac131a9b857f946e5fc

See more details on using hashes here.

File details

Details for the file chromasoul_style_transfer-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for chromasoul_style_transfer-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 beaef47eadf84b88ca8c38229cf99f196c7cd70f56ea65259d72d61d70425f40
MD5 fdb8e6d09db7f135f4ab41de4d1a0403
BLAKE2b-256 24c8d6a47691f26f8ccd26055f1a114652e52c7865d21667e3ed92c46206648f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page