Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: mit
|
| 4 |
+
datasets:
|
| 5 |
+
- web crawled (coming soon)
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# Simple CNN-based Artist Classifier
|
| 9 |
+
|
| 10 |
+
This repo contains a simple CNN-based Keras model which classifies images into one of 8 artistic trends.
|
| 11 |
+
|
| 12 |
+
See also: `https://huggingface.co/jkang/drawing-artist-classifier`
|
| 13 |
+
|
| 14 |
+
- The purpose of this model was for a quick prototyping
|
| 15 |
+
- Data has been web-crawled using `https://github.com/YoongiKim/AutoCrawler`
|
| 16 |
+
- 8 popular artists/painters were chosen:
|
| 17 |
+
- \[TREND\]: \[ID\]
|
| 18 |
+
- cubism: 0,
|
| 19 |
+
- expressionism: 1,
|
| 20 |
+
- fauvisme: 2,
|
| 21 |
+
- graffitiar: 3,
|
| 22 |
+
- impressionism: 4,
|
| 23 |
+
- popart: 5,
|
| 24 |
+
- post_impressionism: 6,
|
| 25 |
+
- surrealism: 7}
|
| 26 |
+
- About 100 representative paintings per artist considering 8 trends were crawled and manually checked
|
| 27 |
+
- Dataset will be shared later
|
| 28 |
+
|
| 29 |
+
# How to use
|
| 30 |
+
```python
|
| 31 |
+
import tensorflow as tf
|
| 32 |
+
from huggingface_hub import from_pretrained_keras
|
| 33 |
+
model = from_pretrained_keras("jkang/drawing-artistic-trend-classifier")
|
| 34 |
+
|
| 35 |
+
image_file = 'kandinski.jpg'
|
| 36 |
+
img = tf.io.read_file(image_file)
|
| 37 |
+
img = tf.io.decode_jpeg(img, channels=3)
|
| 38 |
+
|
| 39 |
+
last_layer_activation, predictions = model(img[tf.newaxis,...])
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
# Intended uses & limitations
|
| 43 |
+
You can use this model freely for predicting artists or trends of a given image.
|
| 44 |
+
Please keep in mind that this model is not intended for the production, but for a research and quick prototyping.
|
| 45 |
+
Web-crawled image data might not have balanced amount of drawings that sufficiently represent the artists.
|
| 46 |
+
---
|
| 47 |
+
- 2022-01-18 first created by jaekoo kang
|