AI Neural Painting

The Problem

An e-commerce platform offering personalized gifts needed a way to transform customer photos into stylized artwork. The existing manual process was prohibitively slow and expensive, taking approximately 26 hours and $5 per image. The challenge was to automate this workflow completely while maintaining high visual quality.

Automated AI neural painting workflow pipeline
The workflow pipeline demonstrates how AI seamlessly replaces the manual process.

The Engineering

I developed a full automation pipeline using OpenCV, Pillow, and Stylized Neural Painting deployed on AWS. The system utilizes a dual-pathway neural renderer that translates images into paintings using vector representations. It incorporates Optimal Transport Loss to ensure similarity to the input and Differentiable Rendering to fine-tune the artistic output. The pipeline handles everything from face detection and background removal to the final application of oil painting effects.

Local Binary Patterns face detection visualization
Visualization of the Local Binary Patterns (LBP) algorithm used for precise face detection and alignment.
Dual-pathway neural rendering architecture diagram
The dual-pathway neural rendering architecture that transforms vector representations into stylized artistic strokes.

The Results

The automation achieved a 100x increase in performance, reducing processing time from 26 hours to just 15 minutes per image. Cost efficiency improved dramatically, dropping from $5 to $0.25 per image (20x reduction). This scalability allowed the store to handle higher order volumes without sacrificing quality or delivery speed.

Input customer photograph before neural painting
Input image.
Output oil painting generated by neural rendering
Output image.