Skip to main content

A pipeline for converting images into stylized game sprites with style transfer, enhancement, and sprite sheet generation.

Project description

pip install sprite-pipeline

You download images to a folder

image

⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️

sp_group --style painting.png -H 100 downloaded/

image

⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️

You open PS, resize layers, fix perspective, patch.

⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️

sp_pack graphics.psd

image image

Congrats! You get packed spritesheet and UV coordinates in .txt

Details

  1. BiRefNet to extract foreground
  2. RetinexNet to fix lights
  3. nst_vgg19 for Neural Style Transfer
  4. RealESRGAN_MtG to improve quality
  5. OpenCV to other filters and algorithms

Requirements

pip install numpy opencv-python torch torchvision pillow psd-tools rectpack modelscope realesrgan nst_vgg19 gdown

CLI args

sp_group --style STYLE_IMAGE -W MAX_WIDTH -H MAX_HEIGHT -f STYLE_FORCE -b BLUR -o OUTPUT_PSD folder_name/ Creates PSD file containing group folder_name where each layer is a processed image with the specified maximum dimensions.

sp_pack -o OUTPUT_DIR --format SPRITESHEET_IMAGE_FORMAT psd_file.psd For each group in PSD creates packed spritesheet image and UV coordinates file named group_name.fmt and group_name_uvs.txt.

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

sprite_pipeline-0.1.1.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

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

sprite_pipeline-0.1.1-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file sprite_pipeline-0.1.1.tar.gz.

File metadata

  • Download URL: sprite_pipeline-0.1.1.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sprite_pipeline-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b41e029c7c4371809f6ab09f4aa77bde2b29a8e7f7363a7eb5580e4b375afdaa
MD5 c0ed853917f5f9a0d1fc3cd1dbc9f6e6
BLAKE2b-256 9bdd2182dba548c748dc37c151db2841726b48d8e66f76f6aa1aa5f11fc0c7d4

See more details on using hashes here.

File details

Details for the file sprite_pipeline-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sprite_pipeline-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d27ed31780512c288714aac1456ba7b171d3dfb5a74c75f37d4b7fce4594b2f
MD5 1b1f5026d08f0c932af2e297c60944f9
BLAKE2b-256 f80531cc2454f95544ba402840ddaaae15559b711a1871ecccae5aef5587b8ac

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