Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,4 +11,76 @@ license: mit
|
|
| 11 |
short_description: Fuses 2 paintings/images
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
short_description: Fuses 2 paintings/images
|
| 12 |
---
|
| 13 |
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
## 🎨 Neural Style Transfer — A + B = C
|
| 19 |
+
|
| 20 |
+
Ever wondered what Van Gogh’s brush would look like on your selfie? Or how a castle would look reimagined in Picasso’s palette? **This app lets you do exactly that.**
|
| 21 |
+
|
| 22 |
+
Upload your own images or remix iconic paintings using **neural style transfer** — a deep learning technique that fuses the *content* of one image with the *style* of another. Watch `A + B = C` come to life in real time.
|
| 23 |
+
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
### 🚀 Features
|
| 27 |
+
|
| 28 |
+
- **✨ Stylize Your Own Images**
|
| 29 |
+
Upload any two images: one for content, one for style. The result? A stunning hybrid visual that blends their essence.
|
| 30 |
+
|
| 31 |
+
- **🎲 Pick Random Pairings**
|
| 32 |
+
Not sure what to try? Click *"Pick Random & Generate"* to randomly fuse masterpieces from the [Famous Paintings](https://huggingface.co/datasets/heramb04/Famous-paintings) dataset.
|
| 33 |
+
|
| 34 |
+
- **🧪 Adjustable Optimization**
|
| 35 |
+
Slide between fast runs and deep stylization with the step slider (100–500 iterations).
|
| 36 |
+
|
| 37 |
+
- **🖌️ Triptych Output** *(coming soon)*
|
| 38 |
+
Visualize the fusion in a layout: `Content + Style = Output`.
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
### 🧠 How It Works
|
| 43 |
+
|
| 44 |
+
Under the hood, this app leverages:
|
| 45 |
+
|
| 46 |
+
- `torchvision`'s pretrained **VGG-19** model
|
| 47 |
+
- **Content and style loss modules** with Gram matrices
|
| 48 |
+
- **LBFGS optimizer** for iterative refinement
|
| 49 |
+
- Hosted on Hugging Face Spaces using Gradio
|
| 50 |
+
|
| 51 |
+
No pretraining or model uploads needed — everything runs on-the-fly.
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
### 📁 Dataset
|
| 56 |
+
|
| 57 |
+
This app uses [Famous Paintings](https://huggingface.co/datasets/heramb04/Famous-paintings) hosted on Hugging Face Datasets — curated for visual diversity and artistic flair.
|
| 58 |
+
|
| 59 |
+
You can remix any pair of artworks, or contribute your own.
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
### 🛠️ Requirements
|
| 64 |
+
|
| 65 |
+
This app installs the following Python packages:
|
| 66 |
+
|
| 67 |
+
```
|
| 68 |
+
torch
|
| 69 |
+
torchvision
|
| 70 |
+
gradio
|
| 71 |
+
Pillow
|
| 72 |
+
datasets
|
| 73 |
+
matplotlib
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
### 💡 Credits & Collaboration
|
| 79 |
+
|
| 80 |
+
Built by [Heramb Joshi]
|
| 81 |
+
|
| 82 |
+
Feel free to fork, remix, or contribute ideas! Pull requests, dataset expansions, and UI upgrades are welcome.
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
+
|