Git Product home page Git Product logo

art-analyzer's Introduction

Art Analyzer

Analyze artwork using GPT Vision and LLM

Art Analyzer is an app that uses GPT Vision (See: OpenAI Platform) to identify artwork from images and AI language models like GPT-4 to provide detailed critiques of paintings, drawings, and other visual art forms. Users can upload an image of a piece for review, and the app will generate an analysis of the artwork covering composition, use of color, brushwork/texture, emotional impact, originality/creativity, and recommendations of similar artists and paintings.

Can we really use AI as an art critic or expert? Yes and No. This app is a fun experiment to see how far along GPT Vision has come, and the results are generally very good and surprisingly detailed. But, if you are looking to analyze and critique artwork in a more official capacity feel free to defer to art historians, experts, and enthusiasts.

Read more:

Blog Post - https://eric-blue.com/2023/12/05/art-analyzer/

YouTube Video - https://youtu.be/9-nDqjFrpk0?si=OjIyTMSvDYHY0d5o

Tech

Uses:

Demo URL

Development Environment

Running the app

To start the app, run:

streamlit run streamlit_art.py

Docker

A docker image is publicly available by pulling ericblue/artanalyzer:0.1 and on Dockerhub

Building the Docker Image

# build an image with the 'latest' tag
make build

# build an image with a custom tag (e.g. 0.1)
make build TAG=<enter your custom tag>

Running the Docker Image

## Default Docker Run
docker run -p 8080:8501 ericblue/artanalyzer:0.1

## Run with custom eternal port
docker run -p 8080:8501 ericblue/artanalyzer:0.1

## Run with custom ENV variables containing the OPENAI_API_KEY var
docker run -p 8080:8501 --env-file .env ericblue/artanalyzer:0.1

Running on Heroku

This app has been tested on Heroku (https://heroku.com/) deploying as a Docker image and running with the Python buildpack. For the application name, I used artanalyzer-eb in this example, but you can use any name you like.

# Create a new Heroku app
heroku create  artanalyzer-eb

# Login to the container registry
heroku container:login

# Push the container
heroku container:push web -a artanalyzer-eb

# Release the container
heroku container:release web -a artanalyzer-eb

# Note: Make sure to set PORT to 80 var under Settings > Config Vars
# And, if you want to use a default key make sure to set OPENAI_API_KEY 

# Open with the public URL
heroku open -a artanalyzer-eb

Known Issues

  • On occasion, GPT-4V does not like to provide artist details, including similar artists or paintings (e.g. while analyzing Mona Lisa, the following is returned "I cannot name the artist, but this painting is one of the most recognized works in the world."). Often times, simply reloading and trying again will return successful results.

Version History

  • 0.2 - 12/11/23 - Improved error handling for GPT-4V API calls and image results
  • 0.1 - 12/04/23 - Initial release

About

Analyze artwork using GPT Vision and LLM

This tool is a work in progress. You can contribute to the project on GitHub (ericblue/art-analyzer · GitHub) with your feedback and suggestions💡.

Created by Eric Blue (https://eric-blue.com & https://ericblueart.com).

art-analyzer's People

Contributors

ericblue avatar

Stargazers

 avatar

Watchers

 avatar  avatar Kostas Georgiou avatar

Forkers

joham

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.