image-to-prompt tool uses Florence2 to auto-detect objects and generate Ideogram JSON prompts
Drag and drop any image to get a reusable Ideogram prompt with detected objects automatically.
A new open-source tool from developer cocktailpeanut automates the tedious process of extracting layout and object information from images for use with Ideogram, an AI image generation platform. The tool, called image-to-prompt, lets users drag and drop any image onto an interface. Under the hood, it uses Microsoft's Florence2 vision model to detect objects and their bounding box regions, then outputs a JSON prompt structure compatible with Ideogram's API. The detected regions can be edited before generating, enabling quick remixing of compositions.
In a demonstration on X, the developer took a photo of Jensen Huang on stage with a robot, ran it through the tool, then replaced the subjects with a female CEO and a corgi — showing how the layout is preserved while characters are swapped. The app is minimal and performs well even on Macs, making it accessible for rapid prototyping of image prompts. The code is available on GitHub (cocktailpeanut/image-to-prompt), allowing others to contribute or modify. This tool significantly lowers the barrier for prompt engineering in AI imagery by eliminating manual bounding box creation.
- Uses Microsoft Florence2 for automatic object detection and bounding box region extraction
- Outputs Ideogram-compatible JSON prompt that can be edited and reused
- Open source on GitHub; demonstrated swapping Jensen Huang and robot with female CEO and corgi
Why It Matters
Saves professionals hours of manual region labeling, enabling rapid layout remixing for AI image generation workflows.