spripe is an end-to-end open-source toolkit designed to rapidly generate, process, normalize, and polish 2D sprites from video files. Built specifically for game developers and animators, it takes raw gameplay or animation videos and transforms them into game-ready, perfectly aligned transparent PNG sequences using advanced AI background removal.
- 🤖 AI Background Extraction: Feed it an
.mp4or a folder of PNGs, and Spripe usesrembg(U-Net based neural networks) to isolate the character, regardless of complex backgrounds, shadows, or gradients. Video processing runs entirely in a background QThread to keep the UI perfectly responsive. - 📐 Automatic Normalization: Characters are automatically scaled to a consistent height and their feet are aligned to a standard baseline, ensuring fluid continuous animation transitions (e.g., from idle to jump).
- 🎨 Advanced GUI Editor: Includes a built-in PyQt6 painting environment tailored for sprite cleanup:
- GrabCut Quick Selection: Drag a box, and OpenCV AI seamlessly cuts out artifacts.
- Magic Wand & Lassos: Select regions with adjustable tolerances and morphological contour smoothing.
- Non-Destructive Workflows: Easily paint, erase alpha channels, soft-brush, and eyedrop directly over your frames. Full
Ctrl+ZUndo andCtrl+YRedo command history is supported. - 📌 Pinned Keyframe (Onion Skinning): Pin any frame as a transparent overlay to perfectly align and compare positioning across different animations!
- 🎞️ Timeline & Playback: Manage your frames in a dedicated timeline. Drag-and-drop to reorder, delete multiple frames at once, preview animations in real-time at 12 FPS, or toggle "Boomerang" mode. You can also right-click frames or press
Mto instantly Mark to Fix, letting you easily track which frames need more polish without any UI freezing. - 🗂️ Project Workspace: Robust hierarchical organization (Projects -> Assets -> Animations). Effortlessly manage multiple characters and their movesets with full right-click context menu support. The Asset Dashboard also automatically refreshes file sizes instantly after compression.
- 📦 Export System: Instantly export single animations or entire assets into engine-ready structured folders,
.giffiles with customizable frame rates, or ZIP archives. Godot engine users can natively adjust export PNG compression levels. - 🔄 Background Task Indicator: All long-running processes (Normalization, GIF export, Extraction) are tracked seamlessly via an animated spinner in the status bar so you always know what Spripe is doing behind the scenes.
- 🧠 Prompt Template Manager: Manage your generative AI prompts through structured dictionaries and native clipboard integrations.
Spripe simplifies sprite generation into a highly automated 4-step process:
- Import: Use
File > New ProjectorFile > Open Projectto load a lightweight.spripefile or directory. Then import your source.mp4files or PNG sequences. - AI Generation (
sequence_worker.py): The engine processes the video in the background, extracting frames at your desired FPS and stripping the background using AI. Results go toout_{vidname}. - Normalize (
normalize_animations.py): Run the normalizer (via the Pipeline Controls or right-click context menu) to scale the character and align their feet onto a unified 16:9 canvas space. Results go tonormalized_output/. - Polish & Export (GUI): Open the Spripe GUI to manually review the sequence. Use the timeline to tag or delete bad frames, drag-and-drop to fix ordering, and use the Painter tools to erase lingering background artifacts. Finally, use
File > Save Project As...to export your entire polished project into a compressed.spripepackarchive, or export individual sequences!
Spripe is now a fully installable Python package!
-
Clone this repository.
-
Navigate to the project directory and install it via pip. You can choose whether you want the CPU or GPU version for AI background removal:
For CPU processing:
pip install -e .[cpu]
For GPU processing (NVIDIA/CUDA - Much Faster):
pip install -e .[gpu]
Alternatively, you can build a standalone Windows executable by running python build_exe.py.
The easiest way to use Spripe is through its visual interface. It acts as a control center for the entire pipeline. Once installed, simply type:
spripe gui
# or just
spripeFrom the GUI, you can:
- Organize: Use
File > Open Projectto read projects externally or copy them to your workspace. Quickly switch projects viaFile > Recent Projects. Use the Asset Browser to manage them. - Process: Trigger the AI Processing and Normalization scripts seamlessly in the background.
- Edit: Preview and manually paint/edit frames. Use the "Pin Frame" feature to check alignments.
- Export: Use
File > Save Project As...to backup to a.spripepack, or right-click any Asset/Animation to export into an engine-ready ZIP.
If you prefer batch processing or terminal workflows, you can run the core scripts directly via the spripe CLI.
Extract frames and remove background:
spripe process --video .\videos\idle.mp4 --out .\raw_output\Normalize Scale and Position:
spripe normalize --project MyGame --asset Ninja
# Or by path
spripe normalize --path .\raw_output\idleFix Frame Numbering or Reverse: If you manually delete files via the file explorer, you can fix the numbering gaps or reverse them:
spripe rename --path .\raw_output\idle
spripe reverse --path .\raw_output\idleContributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is open-source and available under the MIT License.
