We have wrapped this example into a Transformation Block (Enterprise Feature) to make it even easier to generate images and upload them to your organization. See: https://github.com/edgeimpulse/example-transform-Dall-E-images
Local Software Requirements
- Python 3
- Pip package manager
- Jupyter Notebook: https://jupyter.org/install
- pip packages (install with
pip install
packagename
):
Set up OpenAI API
First off you will need to set up and Edge Impulse account and create your first project. You will also need to create an API Key for OpenAI: https://platform.openai.com/docs/api-reference/authenticationGenerate your first image
The API takes in a prompt, number of images and a sizeGenerate some variations of this image
The API also has a variations call which takes in an existing images and creates variations of it. This could also be used to modify existing images.Generate a dataset:
Here we are iterate through a number of images and variations to generate a dataset based on the prompts/labels given.Plot all the output images:

Images generated from the script