AI-powered 3D LUT generation from reference images. Upload any image and generate professional .cube LUT files for video editing software.
- 🎨 Reference-based LUT generation - Analyze any image to extract color grading characteristics
- 🧠 AI color analysis - Automatic detection of shadows, midtones, highlights and color temperature
- 🎬 Professional output - Standard 33×33×33 .cube files compatible with DaVinci Resolve, Premiere Pro, Final Cut Pro
- ⚡ Real-time preview - Canvas-based processing with instant before/after comparison
- 🎛️ Manual controls - Fine-tune exposure, contrast, color balance, and LUT intensity
- 📱 Responsive design - Works seamlessly on desktop and mobile devices
- Node.js 18+ and npm/yarn
- Python 3.11+ and pip
- Google Gemini API key
git clone https://github.com/veedy-dev/lutforge-ai.git
cd lutforge-aicd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Create .env file
echo "GEMINI_API_KEY=your_api_key_here" > .envcd frontend
npm install
# Create .env.local file
echo "NEXT_PUBLIC_API_URL=http://localhost:8000" > .env.localBackend:
cd backend
uvicorn main:app --reload --port 8000Frontend:
cd frontend
npm run devVisit http://localhost:3000 to use the application.
- AI Visual Analysis - Google Gemini 2.5 Flash analyzes the reference image to identify the optimal cinematic look and color grading approach
- Color Space Processing - Convert reference image to multiple color spaces (RGB, HSV, LAB) for comprehensive analysis
- Luminance Segmentation - Split image into shadows (<25%), midtones (25-75%), highlights (>75%) using professional colorist techniques
- Color Characteristic Extraction - Calculate dominant colors, temperature bias, and saturation levels for each luminance range
- Professional LUT Generation - Build 33×33×33 lookup table using color-matcher algorithms and trilinear interpolation for smooth transitions
- Backend: FastAPI + OpenCV for image processing, Google Gemini 2.5 for AI analysis
- Frontend: Next.js + Canvas API for real-time LUT preview
- Color Science: Uses MKL (Monge-Kantorovich Linear) algorithm for natural color transfer
- Safety: Conservative blending prevents color inversions and maintains skin tone integrity
- Framework: Next.js 14 with TypeScript
- Styling: Tailwind CSS
- UI Components: Radix UI
- Image Processing: Canvas API
- API: FastAPI (Python)
- Image Processing: OpenCV, PIL
- AI: Google Gemini 2.5 Flash
- Color Science: color-matcher library
- Performance: ujson, NumPy
color-matcher- Professional color transfer algorithms (MKL, Reinhard)opencv-python- Image processing and analysisnumpy- Mathematical operations for LUT generationfastapi- Modern Python web framework
lutforge-ai/
├── backend/ # FastAPI backend service
│ ├── main.py # Core API with LUT generation
│ ├── requirements.txt # Python dependencies
│ ├── Dockerfile # Container configuration
│ └── koyeb.yaml # Deployment configuration
├── frontend/ # Next.js frontend application
│ ├── app/ # Next.js App Router
│ ├── components/ # React components
│ │ ├── lut-generator.tsx # AI-powered LUT generation
│ │ ├── manual-controls.tsx # Manual adjustment controls
│ │ ├── raw-processor.tsx # Professional LUT processing
│ │ ├── before-after-slider.tsx # Interactive comparison
│ │ └── ui/ # Reusable UI components
│ ├── lib/ # Utility functions and API clients
│ ├── styles/ # Global styles and themes
│ └── public/ # Static assets and branding
└── debug/ # Development and testing utilities
- Film Look Matching - Recreate color grading from movie stills or reference images
- Consistent Editing - Apply uniform color grading across photo/video series
- Look Development - Create custom color palettes for brand consistency
- Learning Tool - Analyze professional color grading techniques
- Input: JPEG, PNG, TIFF
- Output: .cube LUT files (33×33×33 resolution)
- Compatible with: DaVinci Resolve, Adobe Premiere Pro, Final Cut Pro, After Effects, Photoshop
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If this project helps your workflow, consider supporting its development:
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License - see the LICENSE file for details.
🌐 Try It Now • 📧 Contact • 🐦 Twitter
Made with ❤️ by veedy-dev