{"id":17661787,"url":"https://github.com/adirthaborgohain/art-critiq","last_synced_at":"2026-04-20T13:37:37.036Z","repository":{"id":188251024,"uuid":"607006398","full_name":"AdirthaBorgohain/art-critiq","owner":"AdirthaBorgohain","description":"A multi modal pipeline to generate three tones of reviews [harsh, constructive, kind] for a given artwork using fine-tuned Flan-T5 models.","archived":false,"fork":false,"pushed_at":"2023-02-27T06:49:15.000Z","size":179,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T13:18:05.623Z","etag":null,"topics":["ai","computer-vision","image-captioning","multimodal","nlp","python","text-generation"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdirthaBorgohain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-27T05:34:20.000Z","updated_at":"2024-05-22T16:33:47.000Z","dependencies_parsed_at":"2023-08-14T14:28:55.210Z","dependency_job_id":"8ca8fee0-2f39-4fc6-b694-46e23beced82","html_url":"https://github.com/AdirthaBorgohain/art-critiq","commit_stats":null,"previous_names":["adirthaborgohain/art-critiq"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdirthaBorgohain%2Fart-critiq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdirthaBorgohain%2Fart-critiq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdirthaBorgohain%2Fart-critiq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdirthaBorgohain%2Fart-critiq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdirthaBorgohain","download_url":"https://codeload.github.com/AdirthaBorgohain/art-critiq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246309806,"owners_count":20756799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","computer-vision","image-captioning","multimodal","nlp","python","text-generation"],"created_at":"2024-10-23T17:42:15.097Z","updated_at":"2025-10-07T16:27:17.732Z","avatar_url":"https://github.com/AdirthaBorgohain.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Art Critiq\n\nArt Critiq is a Python project that can generate three kinds of reviews given the image of an artwork and its details\nlike the artist, title, and type of artwork as well as the technique used in creating the artwork.\n\nThe project uses an image captioning model (multiple models are available to choose\nfrom: [blip2](https://arxiv.org/abs/2301.12597), [git](https://arxiv.org/abs/2205.14100), [coca](https://arxiv.org/abs/2103.00020))\nto generate a caption from the input image file and then uses the generated caption along with\nthe other details of the artwork to generate reviews using a [T5-Flan model](https://arxiv.org/abs/2210.11416).\nThe pipeline can be accessed through an API endpoint /generate_review (Created with FastAPI). The project is easily\ndockerized with help of the\ngiven Dockerfile and can be deployed anywhere as needed.\n\n## Getting Started\n\n### Requirements\n\n- Docker\n- Python \u003e= 3.9\n\n### Installation\n\n#### Using Dockerfile:\n\n- Navigate into the root project directory: ``cd art-critiq``\n- Build the Docker image: ``docker build -t art-critiq .``\n- Run the Docker image: ``docker run --name art-critiq -p 8080:8080 art-critiq-app``\n\nThis will start the API and map port 8000 on your local machine to port 8080 inside the container.\n\n#### Using API Directly:\n\n- Navigate into the root project directory: ``cd art-critiq``\n- Install all libraries and modules mentioned in ``requirements.txt``: `pip install -r requirements.txt`\n- Run the API: ``python app.py``\n\n### Things to Remember:\n\n- It is recommended to run the project in a CUDA enabled NVIDIA GPU system for better performance in terms of speed.\n- In order to change the image captioning model that will be used, change it in `app.py` file. Specify the model to use\n  while creating the ArtCritiq object with the `caption_model` parameter.\n\n### API Endpoint\n\nThe API endpoint /generate_review expects a POST request with the following parameters:\n\n- **url**: Valid and publicly accessible url for the artwork.\n- **artist**: Name of the artist.\n- **title**: Title of the artwork.\n- **type**: Type of artwork (eg. Painting, Sculpture, etc.).\n- **technique**: Technique used in the artwork (eg. Oil on Canvas, Watercolor, etc.)\n- **review_type**: Type of review that is to be generated. Can be 'kind', 'constructive' or 'harsh'. If not\n  specified, it will generate reviews for all the types.\n\nHere's an example of how to use the API endpoint:\n\n```python \nimport requests\n\nres = requests.post(\"http://0.0.0.0:8080/generate_review\",\n                    json={\n                        \"url\": \"https://openaccess-cdn.clevelandart.org/1942.645/1942.645_web.jpg\",\n                        \"artist\": \"Joshua Reynolds (British, 1723–1792)\",\n                        \"title\": \"Portrait of the Ladies Amabel and Mary Jemima Yorke\",\n                        \"type\": \"Painting\",\n                        \"technique\": \"Oil on canvas\",\n                    })\nprint(res.json())\n```\n\nThe API will return a JSON object with either the review as specified in `review_type` input parameter or all the three\nreviews if `review_type` parameter is not specified. It is generated using the caption from the image captioning model\nand the artwork details using the T5-Flan model.\n\n### Results:\n\n![Results from model](./art-critiq.png)\n\n#### Note: \nPlease note that the full training data is not provided in the repo and only a few samples of how the data looked like has been given in the `data` folder. Also, fully fine-tuned models are not provided for public access due to legal puposes.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadirthaborgohain%2Fart-critiq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadirthaborgohain%2Fart-critiq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadirthaborgohain%2Fart-critiq/lists"}