whatisgithub

What is image-to-prompt?

cocktailpeanut/image-to-prompt — explained in plain English

Analysis updated 2026-05-18

93JavaScriptAudience · vibe coderComplexity · 3/5Setup · moderate

In one sentence

A local web app that converts an uploaded image into a structured JSON prompt for the Ideogram 4 AI image generator, using an on-device vision model.

Mindmap

mindmap
  root((Image to Prompt))
    What it does
      Image to JSON prompt
      Local vision model
      Editable boxes
    Tech stack
      Florence-2
      PyTorch
      JavaScript API
    Use cases
      Ideogram prompt export
      Batch image queue
      API integration
    Setup
      Pinokio one click
      Manual Python setup
    Audience
      Vibe coders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Upload an image and export a structured JSON prompt formatted for Ideogram 4.

USE CASE 2

Batch-process multiple images through a queue and track which are done, queued, or failed.

USE CASE 3

Edit auto-generated scene captions, object boxes, and OCR text before exporting a prompt.

USE CASE 4

Call the app's API endpoint from your own JavaScript, Python, or command-line tools.

What is it built with?

JavaScriptPythonPyTorchFlorence-2

How does it compare?

cocktailpeanut/image-to-promptdeficryptobots/cryptobots-solana-sniper-pumpfun-freevinayaklatthe/microsoft-security-skills
Stars939688
LanguageJavaScriptJavaScriptJavaScript
Setup difficultymoderatemoderateeasy
Complexity3/52/52/5
Audiencevibe codergeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires installing PyTorch matching your hardware and downloading the Florence-2 model from Hugging Face on first launch.

No license information is provided in the README.

So what is it?

Image to Prompt is a local web app that takes an image you upload and converts it into a structured JSON prompt formatted for Ideogram 4, an AI image generation service. The idea is to reverse-engineer an image into a description that you could feed back to an image generator to recreate or remix it. The analysis is done by a Microsoft AI model called Florence-2 that runs on your own machine, with no data sent to external servers. Florence-2 reads the image and returns a scene caption, object locations, region descriptions, and any text it finds in the image (using optical character recognition). The app turns all of that into editable boxes on a canvas so you can adjust what gets included in the final prompt before exporting. You can drop multiple images at once and they process one at a time in a queue. A row of thumbnails at the top shows which images are done, still queued, or failed. You can switch between images and keep editing while the queue runs. Each image keeps its own set of boxes and labels independently. When you are finished, you can export a single JSON file or download all finished prompts as a zip. Installation can be done with one click through a tool called Pinokio, or manually by cloning the repository and running a Python setup. The app requires PyTorch, which you install separately with a command that matches your hardware (CPU, Apple Silicon, or NVIDIA GPU). On first launch it downloads the Florence-2 model from Hugging Face, which may take a few minutes. The app also exposes a simple API endpoint that accepts an image file and returns the analysis as JSON. This makes it straightforward to call from JavaScript, Python, or the command line if you want to integrate image analysis into your own tools.

Copy-paste prompts

Prompt 1
Explain how Florence-2 analyzes an image to produce captions, object locations, and OCR text.
Prompt 2
Write a Python script that calls this app's API endpoint to convert an image into a JSON prompt.
Prompt 3
How do I install this tool with Pinokio versus doing a manual Python setup?
Prompt 4
Describe the workflow for editing the generated boxes on the canvas before exporting a final prompt.

Frequently asked questions

What is image-to-prompt?

A local web app that converts an uploaded image into a structured JSON prompt for the Ideogram 4 AI image generator, using an on-device vision model.

What language is image-to-prompt written in?

Mainly JavaScript. The stack also includes JavaScript, Python, PyTorch.

What license does image-to-prompt use?

No license information is provided in the README.

How hard is image-to-prompt to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is image-to-prompt for?

Mainly vibe coder.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.