Inspiration

Traditional AI image generators can create "pixel art style" images, but they produce pseudo pixel art with inconsistent block sizes, anti-aliasing, and too many colors. As digital artists need authentic retro-style assets, we saw an opportunity to leverage FIBO's structured prompt capabilities to enforce strict pixel art constraints and then algorithmically perfect the output.

What it does

FIBO Pixel Lab is a 3-stage pipeline that produces professional pixel art assets:

  1. Generate Pseudo Pixel Art - Users enter natural language prompts. FIBO's VLM translates this into structured JSON, which we enhance with pixel-art-specific constraints (limited color palettes, flat lighting, hard edges). FIBO generates the initial image following these rules.

  2. Convert to Perfect Pixels - Our intelligent block detection algorithm analyzes the pseudo pixel art to find the true pixel block size. It then extracts dominant colors block-by-block, vectorizes to SVG, and re-rasterizes to create authentic pixel art with perfect uniformity and no anti-aliasing.

  3. Remove Background - Using BRIA's RMBG v1.4 API, we extract transparent PNG assets ready for use in games, apps, or designs.

Users can download individual stages or save everything as a ZIP file with structured prompt metadata.

How we built it

Backend (Python/FastAPI):

  • FIBO API integration for structured prompt generation and image creation
  • Custom pixel art style injector that modifies JSON fields (style_medium, artistic_style, color_scheme, photographic_characteristics)
  • Computer vision algorithms using OpenCV and scikit-image for block detection
  • PIL and CairoSVG for vectorization and re-rasterization
  • BRIA RMBG v1.4 API for background removal
  • Supabase Storage for cloud file management

Challenges we ran into

  1. Block Size Detection - AI-generated pixel art doesn't have uniform blocks initially. We developed a multi-metric scoring system that tests various block sizes and calculates uniformity scores combined with boundary gradient ratios to find the authentic pixel size.

  2. Prompt Engineering for Pixel Art - Getting FIBO to consistently generate pixel-appropriate images required careful manipulation of structured prompt fields. We inject specific constraints into style_medium, artistic_style, and color_scheme while preserving the semantic content from the VLM translation.

  3. Scalable Vector Conversion - Converting raster pixel art to SVG while maintaining hard edges and no anti-aliasing required using CairoSVG with specific rendering flags and careful color quantization.

Accomplishments that we're proud of

  • Intelligent Block Detection - Our algorithm accurately detects pixel block sizes with 95%+ accuracy across different art styles
  • FIBO JSON Manipulation - Successfully leveraging structured prompts to enforce pixel art constraints while maintaining creative flexibility
  • End-to-End Pipeline - From natural language to production-ready transparent PNG assets in under 60 seconds
  • Professional UX - Interactive zoom with pixel grid overlay, collapsible JSON viewer, and batch downloads

What we learned

  • The power of FIBO's structured prompt API for granular control over image generation
  • How JSON-native workflows enable programmatic style enforcement that traditional text prompts can't achieve
  • Computer vision techniques for analyzing and perfecting AI-generated pixel art
  • The importance of workflow design in creative tools - each stage builds on the previous one

What's next for FIBO Pixel Lab

  • Animation Support - Generate sprite sheets with consistent characters across frames
  • Style Presets - Pre-configured structured prompts for specific pixel art eras (Commodore 64, Game Boy, SNES)
  • Batch Processing - Generate multiple variations from a single prompt
  • Color Palette Extraction - Automatically detect and export the exact color palette used
  • Integration APIs - Allow game engines and design tools to directly integrate our pipeline

Built With

Share this project:

Updates