This project uses OpenAI's APIs to recreate famous paintings through an image-to-text-to-image
process.
The goal is to evaluate how well AI can analyze and recreate paintings without explicitly naming the original title or artist.
By providing an image of a famous painting (e.g., the Mona Lisa), OpenAI's APIs generate a detailed description of the artwork, including the objects and colors depicted.
Using this description, the project then prompts the OpenAI APIs to produce a new, original painting.
The title and artist of the original masterpiece are intentionally omitted.
These are some examples of artworks we have created with this project:
ORIGINAL | NEW |
---|---|
You can try this project locally.
- Node >= 18: you can download it here or using a Node Version Manager;
- an OpenAI's account: you can create it here;
- at least 5$ in your OpenAI's wallet: you can charge it here;
- an OpenAI API key: you can create it here;
Once cloned this repository, install its dependencies:
npm i
Create a file called .env.local
in the root folder of the repository, and add your OpenAI API key here:
NEXT_PUBLIC_OPENAI_API_KEY=(openai-api-key-here)
Now you can run the project
npm run dev
And test it on http://localhost:3000.
To contribute to this project, you can follow the instructions reported in Usage above.
The technologies used in this projects:
- OpenAI APIs;
- React;
- Next.js by Vercel;
- SWR;
- Materialize CSS;
- WikiArt for paitining images and data;
- Add the possibility to search a painting (e.g. using WikiArt APIs);
- improve the UI components (migrate to Bulma?).