|
| 1 | +<p align="center"> |
| 2 | + <img src="https://i.ibb.co/SXZsB2fk/icon.png" alt="TrainKit Logo"> |
| 3 | +</p> |
| 4 | + |
| 5 | +<h1 align="center">TrainKit</h1> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + A dataset preparation toolkit for AI image training |
| 9 | +</p> |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | + <a href="https://github.com/LightCyan01/TrainKit/blob/master/LICENSE"> |
| 13 | + <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"> |
| 14 | + </a> |
| 15 | + <a href="https://github.com/LightCyan01/TrainKit/releases"> |
| 16 | + <img src="https://img.shields.io/github/v/release/LightCyan01/TrainKit?include_prereleases" alt="Release"> |
| 17 | + </a> |
| 18 | + <img src="https://img.shields.io/badge/platform-Windows-lightgrey" alt="Platform"> |
| 19 | + <img src="https://img.shields.io/badge/Electron-39-47848F?logo=electron" alt="Electron"> |
| 20 | + <img src="https://img.shields.io/badge/Python-3.12-3776AB?logo=python&logoColor=white" alt="Python"> |
| 21 | + <img src="https://img.shields.io/badge/PyTorch-2.7-EE4C2C?logo=pytorch&logoColor=white" alt="PyTorch"> |
| 22 | +</p> |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## About |
| 27 | + |
| 28 | +TrainKit streamlines the tedious process of preparing image datasets for AI model training. |
| 29 | +It provides GPU-accelerated tools for captioning, upscaling, and organizing your images wrapped in a modern desktop interface. |
| 30 | + |
| 31 | +## Features |
| 32 | + |
| 33 | +- **🖼️ Image Captioning** — Generate captions using local LLaVA-based models (e.g., JoyCaption) with customizable prompts |
| 34 | +- **⬆️ Image Upscaling** — Upscale images using [Spandrel](https://github.com/chaiNNer-org/spandrel) supported architectures |
| 35 | +- **📁 Batch Renaming** — Rename and organize image files with flexible naming patterns. |
| 36 | + |
| 37 | +## Requirements |
| 38 | + |
| 39 | +- **Windows 10/11** |
| 40 | +- **NVIDIA GPU** (8GB+ VRAM recommended for captioning) |
| 41 | +- **Python 3.12** |
| 42 | +- **Node.js 18+** |
| 43 | + |
| 44 | +## Installation |
| 45 | + |
| 46 | +### From Release |
| 47 | + |
| 48 | +Download the latest release from the [Releases](https://github.com/LightCyan01/TrainKit/releases) page. |
| 49 | + |
| 50 | +### From Source |
| 51 | + |
| 52 | +```bash |
| 53 | +# Clone the repository |
| 54 | +git clone https://github.com/LightCyan01/TrainKit.git |
| 55 | +cd TrainKit |
| 56 | + |
| 57 | +# Install frontend dependencies |
| 58 | +npm install |
| 59 | + |
| 60 | +# Install backend dependencies |
| 61 | +cd backend |
| 62 | +uv sync |
| 63 | + |
| 64 | +# Start the app |
| 65 | +npm start |
| 66 | +``` |
| 67 | + |
| 68 | +## Usage |
| 69 | + |
| 70 | +1. **Launch TrainKit** — The backend server starts automatically |
| 71 | +2. **Select a panel** — Choose Caption, Upscale, or Rename from the sidebar |
| 72 | +3. **Configure paths** — Set your input folder, output folder, and model path |
| 73 | +4. **Start processing** — Click the action button and monitor progress in the logs panel |
| 74 | + |
| 75 | +### Captioning |
| 76 | + |
| 77 | +TrainKit supports LLaVA-based captioning models. |
| 78 | + |
| 79 | +### Upscaling |
| 80 | + |
| 81 | +TrainKit uses [Spandrel](https://github.com/chaiNNer-org/spandrel) for upscaling. See the [full list of supported architectures](https://github.com/chaiNNer-org/spandrel?tab=readme-ov-file#model-architecture-support). |
| 82 | + |
| 83 | +## Development |
| 84 | + |
| 85 | +```bash |
| 86 | +# Start in development mode |
| 87 | +npm start |
| 88 | + |
| 89 | +# Build for production |
| 90 | +npm run make |
| 91 | +``` |
| 92 | + |
| 93 | +## Roadmap |
| 94 | + |
| 95 | +- [ ] NCNN support |
| 96 | +- [ ] Additional captioning model architectures |
| 97 | +- [ ] Image tagging |
| 98 | + |
| 99 | +## Contributing |
| 100 | + |
| 101 | +Contributions are welcome! Please open an issue first to discuss what you would like to change. |
| 102 | + |
| 103 | +## License |
| 104 | + |
| 105 | +TrainKit is licensed under the MIT license. See the [LICENSE](LICENSE) file for details. |
0 commit comments