Check out Nextjs implementation: https://blockface.vercel.app/
This project implements a generative adversarial network to create unique Minecraft character skins. It uses advanced techniques including self-attention mechanisms, adaptive residual blocks, and spectral normalization to produce high-quality, diverse character skins.
graph TD
subgraph Data_Pipeline
A[Raw Minecraft Skins] -->|Preprocessing| B[MinecraftImageDataset]
B -->|Validation| C{Image Check}
C -->|Valid| D[DataLoader]
C -->|Invalid| E[Error Log]
D -->|Batch Processing| F[Normalized Tensors]
end
subgraph Generator_Architecture
G[Latent Space] -->|Dense Layer| H[Initial Features]
H -->|Reshape| I[4x4 Feature Maps]
I -->|Block 1| J[8x8 Features + Self-Attention]
J -->|Block 2| K[16x16 Features + Self-Attention]
K -->|Block 3| L[32x32 Features]
L -->|Block 4| M[64x64 Features]
M -->|Final Conv| N[Generated Skin]
subgraph Residual_Block
R1[Input] -->|Conv1| R2[Norm + LeakyReLU]
R2 -->|Conv2| R3[Norm]
R1 -->|Shortcut| R4[1x1 Conv]
R3 -->|SE Block| R5[Channel Recalibration]
R4 --> R6[Add]
R5 --> R6
end
end
subgraph Critic_Architecture
O[Input Image] -->|Initial Block| P[Feature Maps]
P -->|Block 1| Q[Deep Features + Self-Attention]
Q -->|Block 2| S[Deeper Features]
S -->|Block 3| T[Final Features]
T -->|Flatten| U[Vector]
U -->|Linear| V[Criticism Score]
end
subgraph Training_Loop
W[Real & Fake Pairs] -->|Forward Pass| X[Loss Computation]
X -->|Gradient Penalty| Y[WGAN-GP Loss]
Y -->|Backprop| Z[Parameter Updates]
Z -->|New Batch| W
end
subgraph Evaluation_Metrics
AA[Generated Samples] -->|SSIM| AB[Structural Similarity]
AA -->|Visual Check| AC[Sample Gallery]
AB -->|Tracking| AD[Loss Curves]
AC -->|Save| AE[Sample Archive]
end
subgraph Post_Processing
AF[Raw Generated Skin] -->|Format Convert| AG[PNG Output]
AG -->|SkinPy| AH[3D Render]
AH -->|Multiple Views| AI[Final Visualization]
end
F -->|Real Images| W
N -->|Fake Images| W
N -->|Output| AA
V -->|Feedback| X
- WGAN-GP architecture with gradient penalty for stable training
- Self-attention mechanisms for better global coherence
- Adaptive residual blocks with squeeze-and-excitation
- Spectral normalization for improved training stability
- SSIM (Structural Similarity Index) monitoring during training
- Multi-GPU support for faster training
- Custom dataset handling with image validation
It's recommended to use Python 3.11.x with Conda:
conda create -n minecraft-gan python=3.11
conda activate minecraft-gan
pip install -r requirements.txtminecraft-skin-generator/
├── test/
│ ├── save/
│ │ └── *.png
│ └── *.py
├── model/
│ ├── docs/
│ │ └── *.txt
│ ├── samples/
│ │ ├── model v5/
│ │ │ └── *.png
│ │ └── model v3/
│ │ └── *.png
│ └── *.pth
├── train/
│ └── *.py
├── ipynb_files/
│ └── *.ipynb
├── generated_skins/
│ ├── *.txt
│ └── *.png
└── README.md
# for training
python train/train.py
# for testing
python test/test.py- Main training scripts for the GAN
- Data loading and preprocessing utilities
- Model configuration and hyperparameter settings
- Saved model checkpoints (
.pth) - Sample outputs in version-specific directories
- Documentation and model architecture details
- Scripts for generating and testing skins
- Save directory for test outputs
- Validation utilities
- Development and experimentation notebooks
- Training visualization and analysis
- Output directory for generated sample Minecraft skins
- Associated metadata
The training process includes:
- Generator and Critic loss tracking
- SSIM score monitoring
- Regular sample generation for visual inspection








