Skip to main content

StyleTransfer provides a suite of tools for style migration tasks.

Reason this release was yanked:

The downloader url error

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.1.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.1-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for chromasoul_style_transfer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 31e2551246eb37855382b95a2d2173c08c9e0deafd2279c19fc1ae4ba8496ae6
MD5 75f160c36f2d1e617d88ba5a879d1afe
BLAKE2b-256 927b0f327bdc8f4c6a1e8c51569dad96b652ddd794d9f5fa9adcfb5c14c00a65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromasoul_style_transfer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c907f043acfee020b2336256270f30231a511c99c74c042d92a180d7d0f67828
MD5 7f8d32d4ebe83ffa2366280b5ca604af
BLAKE2b-256 c547e102525a3361f6bd655f87670e1040e9cc14bff905f76a72d6d936af29c0

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