You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+139-5Lines changed: 139 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,23 @@
2
2
3
3
A Python application that uses Vision Language Models (VLMs) to iteratively create original artwork in the style of famous artists. The system starts with a blank canvas and progressively adds strokes suggested by VLMs, building unique images that embody specific artistic styles.
4
4
5
-
**Current Status**: Phase 4 complete - Provider-agnostic VLM client supporting Mistral API and LMStudio, with multi-stroke generation, evaluation, and strategy management.
5
+
The project includes a Next.js viewer application for interactively exploring generated artworks, viewing stroke-by-stroke creation timelines, and examining metadata and evaluation scores.
6
+
7
+
**Current Status**: Phase 4 complete - Provider-agnostic VLM client supporting Mistral API and LMStudio, with multi-stroke generation, evaluation, strategy management, and interactive web viewer.
6
8
7
9
## Prerequisites
8
10
11
+
### Python Backend
9
12
-**Python**: 3.12.2 or higher
10
13
-**Conda**: Anaconda or Miniconda for environment management
11
14
- A VLM provider (one of):
12
15
-**Mistral API** (recommended): Get an API key at https://console.mistral.ai/
13
16
-**LMStudio** (local): Download from https://lmstudio.ai/ and run with server enabled on port 1234
14
17
18
+
### Next.js Viewer (Optional)
19
+
-**Node.js**: 18.0.0 or higher
20
+
-**pnpm**: 9.15.0 or higher (install with `npm install -g pnpm`)
21
+
15
22
## Setup
16
23
17
24
### 1. Create Conda Environment
@@ -67,6 +74,14 @@ cd src/paint_by_language_model
67
74
uv pip install -e ".[dev]"
68
75
```
69
76
77
+
### 5. Install Viewer Dependencies (Optional)
78
+
79
+
To run the interactive web viewer:
80
+
81
+
```sh
82
+
pnpm -C src/viewer install
83
+
```
84
+
70
85
## Running the App
71
86
72
87
### Image Generation (Main Usage)
@@ -175,6 +190,7 @@ src/output/vangogh-001/
175
190
├── final_artwork.jpeg # Final artwork (JPEG format)
176
191
├── metadata.json # Generation metadata
177
192
├── generation_report.md # Human-readable summary
193
+
├── viewer_data.json # Aggregated data for web viewer (auto-generated)
178
194
├── snapshots/ # Canvas images per iteration
179
195
│ ├── iteration-001.png
180
196
│ ├── iteration-002.png
@@ -190,6 +206,68 @@ src/output/vangogh-001/
190
206
└── ...
191
207
```
192
208
209
+
**Note**: `viewer_data.json` is automatically generated after each successful generation. This aggregated file contains all iteration data needed by the web viewer.
210
+
211
+
## Interactive Viewer
212
+
213
+
### Running the Viewer
214
+
215
+
The Next.js viewer provides an interactive web interface for exploring generated artworks:
216
+
217
+
```sh
218
+
pnpm -C src/viewer dev
219
+
```
220
+
221
+
View the gallery at: http://localhost:3000
222
+
223
+
### Features
224
+
225
+
-**Gallery View**: Browse all generated artworks with preview cards
226
+
-**Inspector**: Step through artwork creation stroke-by-stroke
227
+
-**Timeline Playback**: Animate the creation process with play/pause controls
228
+
-**Metadata Display**: View artist name, subject, scores, and generation statistics
229
+
-**Evaluation Insights**: See VLM feedback for each iteration (strengths, weaknesses, suggestions)
230
+
-**Stroke Details**: Examine individual stroke parameters, colors, and reasoning
231
+
232
+
### Preparing Data for the Viewer
233
+
234
+
**Automatic Export**: `viewer_data.json` is automatically generated after each successful artwork generation.
235
+
236
+
**Manual Export**: To re-export data for existing artworks:
0 commit comments