Sking
收藏资源简介:
Sking是一个专门用于Minecraft皮肤生成与处理的数据集,集成了完整的3D渲染与数据预处理流水线。该数据集旨在支持文本到图像和图像到图像任务,特别是针对Minecraft角色皮肤的生成与编辑。数据集的核心内容围绕64x64像素的RGBA格式Minecraft皮肤纹理展开,通过自动化处理流程,原始皮肤纹理被转换为多种形式:包括格式标准化(自动检测并转换Alex格式为Steve格式)、3D体素渲染引擎将2D纹理转换为3D体素角色网格(支持核心层和装饰层的双图层渲染),最终生成768x768像素的复合布局图像,该图像同时包含原始2D皮肤纹理和17个预配置的3D渲染视角(涵盖行走、闲置、背视图、特写及图层切换角度)。数据集还包含用于高级ControlNet训练框架的标准化控制图像(1024x1024透明画布),以及通过专用提取器从合成图像中恢复的64x64皮肤UV贴图。处理流程解决了体素边缘纹理一致性问题,并提供了皮肤水平翻转、前视图数据集切片、皮肤合并等实用功能。整个数据集通过多线程批处理管道生成,支持并行处理,并配备了RESTful FastAPI服务,便于从训练目标图像中提取可用的皮肤纹理。数据集适用于Minecraft皮肤生成、3D角色建模、纹理合成、多视角图像生成等计算机视觉和图形学任务。
Sking is a dataset specifically designed for Minecraft skin generation and processing, integrating a complete 3D rendering and data preprocessing pipeline. The dataset aims to support text-to-image and image-to-image tasks, particularly for the generation and editing of Minecraft character skins. The core content revolves around 64x64 pixel RGBA format Minecraft skin textures. Through an automated processing workflow, original skin textures are converted into multiple forms: first, format standardization automatically detects and converts Alex format (3-pixel arm width) to Steve format (4-pixel arm width); then, a 3D voxel rendering engine transforms 2D textures into 3D voxel character meshes, supporting dual-layer rendering for core layers (base body) and decorative layers (jacket, sleeves, pants, hat); finally, generating 768x768 pixel composite layout images that include both the original 2D skin texture and 17 pre-configured 3D rendering perspectives (covering walking, idle, back view, close-up, and layer switching angles). The dataset also includes standardized control images (1024x1024 transparent canvas) for advanced ControlNet training frameworks, as well as 64x64 skin UV maps recovered from synthetic images via a dedicated extractor. The processing workflow addresses voxel edge texture consistency issues and provides practical functions such as skin horizontal flipping, front-view dataset slicing (retaining the left half), and skin merging (combining the head of skin A with the body/limbs of skin B). The entire dataset is generated through a multi-threaded batch processing pipeline, supports parallel processing, and is equipped with a RESTful FastAPI service for extracting usable skin textures from training target images. The dataset is suitable for computer vision and graphics tasks such as Minecraft skin generation, 3D character modeling, texture synthesis, and multi-view image generation.
数据集概述:Sking
- 数据集名称: Sking
- 语言: 英语 (en)
- 许可证: AGPL-3.0
- 任务类别: 文本到图像 (text-to-image), 图像到图像 (image-to-image)
- 标签: minecraft, 3d, voxel, minecraft-skin, texture, dataset-generation
核心功能与用途
该数据集及相关管道专为训练和微调 Sking Model 而设计,是一个完整的 Minecraft 皮肤 3D 体素渲染与数据集预处理流水线。主要功能包括:
- 3D 体素渲染 (
mc_render.py): 基于PyVista(VTK) 将 2D 皮肤纹理转换为 3D 体素角色网格,支持双层渲染(核心层与装饰层)、肢体关节参数化旋转、交互式光照模式及正交/透视投影。 - 体素纹理一致性解析器 (
mc_voxel_texture_resolver.py): 解决双层皮肤在 3D 体素化过程中的视觉间隙伪影,按优先级顺序自动填充相邻透明面。 - 布局标准化:Alex-to-Steve (
alice_to_steve.py): 自动检测并转换细臂(Alex)皮肤为标准(Steve)格式,统一数据集特征。 - 多视图布局烘焙 (
build_target_img.py): 生成 768x768 的复合布局图像,包含 2D 皮肤纹理及 17 个预配置的 3D 渲染视口。 - 批量处理管道 (
build_target_imgs.py): 利用多线程并行处理批量渲染任务。 - 皮肤 UV 图提取 (
extract_skin.py): 从合成训练目标图像中裁剪并提取 64x64 的皮肤 UV 图,支持命令行与 FastAPI 微服务模式。 - 条件图像格式化 (
force_resize_control_imgs.py): 自动重采样并将控制图像居中放置于 1024x1024 的透明画布中。 - 水平翻转 (
ext_flip_img.py): 对角色前/后视图进行水平翻转,并正确镜像皮肤 UV 图。 - 前视图数据集切片 (
make_half_dataset.py): 生成仅包含前视图的子集,用于训练。 - 皮肤合并工具 (
merge_skins.py): 将皮肤 A 的头部与皮肤 B 的身体/四肢合并。
项目结构
Sking/ ├── mc_render.py # 核心3D引擎 ├── mc_voxel_texture_resolver.py # 体素纹理修补器 ├── alice_to_steve.py # Alex到Steve转换算法 ├── build_target_img.py # 单皮肤多视图布局烘焙 ├── build_target_imgs.py # 并发批量渲染管道 ├── extract_skin.py # UV图提取CLI与FastAPI服务 ├── force_resize_control_imgs.py # 控制图重采样与画布标准化 ├── ext_flip_img.py # 视图翻转与UV镜像 ├── make_half_dataset.py # 前视图数据集切片 ├── merge_skins.py # 皮肤合并工具 ├── skin-mask.png # 核心层像素空间映射掩码 ├── skin-decor-mask.png # 装饰层像素空间映射掩码 ├── skins/ # 原始输入皮肤目录 ├── target_imgs_v73/ # 烘焙多视图布局输出目录 ├── control_imgs/ # 条件控制图处理目录 └── control_imgs_v2/ # 多视图布局控制图目录
系统要求与安装
-
前提条件: Python 3.8 或更高版本,建议使用虚拟环境。
-
安装依赖: bash pip install pyvista numpy pillow fastapi uvicorn opencv-python pydantic
-
无头环境注意: 在无图形界面的服务器上运行需使用
xvfb-run等虚拟帧缓冲工具。
相关资源
- 数据集: Hugging Face Sking Dataset
- 训练模型: Hugging Face Sking Model
- 技术报告: Technical Architecture
- 在线演示: EntropyDrop Web Portal




