← All Projects

Recipe Graphics Automation

A local application designed to automate the creation of recipe graphics using reusable templates, recipe images, ingredient data, layout analysis, and local image-generation tools.

Type Desktop Automation Tool
Main Language Python
AI Workflow ComfyUI
Status Completed
Main interface of the recipe graphics automation application
Main application interface showing the recipe automation workflow.

Turning a repetitive workflow into a tool

The project started from a repetitive image-production workflow involving recipe photos, ingredient lists, reusable graphic templates, and generated images.

Instead of manually organizing every recipe and recreating the same steps each time, I began building one local program that could manage the process from recipe selection through image generation and export.

Each recipe is stored inside its own folder with food images and an ingredients image, while a separate template library provides reusable visual layouts.

The application connects these pieces together while still giving the user control over selected recipes, templates, images, and the final result.

From recipe folder to finished graphic

01

Select Recipe

Choose one or multiple recipes from the recipe library using a searchable interface.

02

Choose Template

Select a reusable visual template and preview its structure before generating the final graphic.

03

Map Images

Match recipe photos and ingredient information to the correct areas of the selected template.

04

Analyze Layout

Detect important template areas such as hero images, cutouts, titles, and ingredient regions.

05

Generate

Use local AI and image-processing tools to produce the recipe graphic while preserving the requested visual structure.

06

Export

Save the completed image at the required 1080x1350 output size.

Selecting and organizing recipes

The application supports both single-recipe and multi-recipe workflows while keeping the recipe library searchable and organized.

Recipe selection interface with search and recipe choices
Recipe selection and search interface.
Search

Recipes can be searched instead of requiring the user to manually browse through every folder.

Single Recipe

A single recipe can be selected for a standard one-recipe template.

Multi-Recipe

Multiple recipes can be assigned to ordered slots for templates containing several food images.

Folder Structure

Each recipe has its own folder containing food images and a dedicated ingredients image.

Building graphics with several recipes

Some templates contain several food-image slots, so the tool supports selecting multiple recipes and assigning them in a specific order.

Multi-recipe selection interface with several ordered recipe slots
Multi-recipe selection with ordered recipe slots.

Reusing visual layouts

Templates define the visual structure while recipe content changes from one generated graphic to another.

Recipe graphic template preview inside the automation application
Template preview used before generating a recipe graphic.

The goal is not to generate a completely new layout every time. The tool is designed to understand and reuse an existing template's structure while replacing the food, recipe title, and ingredient content.

Previewing recipe images

Being able to see source food images before generation makes it easier to verify that the correct recipe content has been selected.

Food image preview inside the recipe automation application
Source food-image preview before generation.

Understanding the template

A major technical challenge is identifying where different pieces of recipe content belong inside templates that originally exist as flat images.

Template layout analysis showing detected regions for recipe content
Layout-analysis output used to identify important regions inside a template.
Hero Region

Identifies the primary area used for the main recipe image.

Cutouts

Supports additional circular, oval, or smaller image regions depending on the template.

Title Area

Identifies where the recipe name belongs without covering important visual content.

Ingredients

Identifies the region reserved for ingredient text, including layouts that use several columns.

Turning ingredient images into usable content

Each recipe folder includes an ingredients.jpg image containing the recipe's ingredient information.

OCR and layout-analysis experiments are used to identify and extract useful information so the final graphic can place ingredient text into the correct template region.

The target format avoids unnecessary content such as cooking steps, checkboxes, or prices and focuses only on the ingredient information needed for the graphic.

Connecting the application to ComfyUI

01

ComfyUI

Used as the local image-generation workflow behind parts of the graphic-generation process.

02

Reusable Prompts

Different prompt types are used depending on whether the task involves full layouts, food images, multi-slot templates, or ingredient replacement.

03

Multiple Machines

The workflow has been tested across multiple computers with different GPU resources while preserving the same overall recipe system.

Producing the finished graphic

The result is a repeatable workflow that produces consistent 1080x1350 recipe graphics while reducing the amount of manual work required.

Completed recipe graphic produced through the automation workflow
Example of a finished 1080x1350 recipe graphic.

Testing and debugging the pipeline

A large part of developing the tool involved testing individual stages instead of treating generation as one black-box process.

Development and debugging output from the recipe automation tool
Debug output used while testing the template-analysis and generation pipeline.

The application was built in stages. Individual problems such as recipe selection, image previews, layout detection, OCR, template mapping, and export were tested separately before being connected into the larger workflow.

Challenges I worked through

01

Template Detection

A flat image does not naturally describe which regions represent food, titles, or ingredients, so that structure has to be identified separately.

02

OCR Accuracy

Extracting useful ingredient information from images can produce noisy results that require cleanup and better interpretation.

03

Image Placement

Recipe photos need to fit differently shaped template regions without losing important parts of the food image.

04

Multi-Recipe Layouts

Templates containing several recipes require predictable ordering and correct assignment of each image to its intended slot.

05

Consistency

Generated images need to follow the original template structure instead of changing the design unexpectedly.

06

Hardware Differences

The application and generation workflow need to remain usable across machines with different amounts of available GPU power.

A complete working workflow

The completed version brings the major parts of the workflow together into one local application.

It includes recipe selection and search, previews, multi-recipe support, reusable templates, layout analysis, ingredient handling, local generation tools, debugging output, and final 1080x1350 exports.

Building it gave me experience turning a process that originally required repeated manual work into a more organized and reusable software workflow.

Building the workflow