File size: 1,590 Bytes
588de8c
d46affe
7ea76c1
d46affe
 
a602ef4
588de8c
 
baa26ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
tags:
- Keras
- gan
- tensorflow
- conditional-image-generation
---

## rasm
Arabic art using GANs. We currently have two models for generating calligraphy and mosaics.  

## Notebooks 

<table class="tg">
  <tr>
    <th class="tg-yw4l"><b>Name</b></th>
    <th class="tg-yw4l"><b>Notebook</b></th>
  </tr>
  <tr>
    <td class="tg-yw4l">Visualization</td>
    <td class="tg-yw4l"><a href="https://colab.research.google.com/github/ARBML/rasm/blob/master/demo.ipynb">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" width = '100px' >
</a></td>
  </tr>
</table>

## Visualization 
A set of functions for vis, interpolation and animation. Mostly tested in colab notebooks. 

### Load Model 
```python 
from rasm import Rasm
model = Rasm(mode = 'calligraphy')
model = Rasm(mode = 'mosaics')
```

### Generate random 
```python 
model.generate_randomly()
```

### Generate grid 
```python 
model.generate_grid()
```

### Generate animation 
```python
model.generate_animation(size = 2, steps = 20)
```

![alt text](video.gif)

## Sample Models 

### Mosaics 
![alt text](imgs/mosaic.png)
![alt text](imgs/mosaicsv2.png)
![alt text](imgs/mosaicsv3.png)
![alt text](imgs/mosaicsv4.png)
### Calligraphy 
![alt text](imgs/calligraphyv2.PNG)
![alt text](imgs/calligraphyv3.png)
![alt text](imgs/calligraphyv4.png)
![alt text](imgs/calligraphyv5.png)


## References 
- Gan-surgery: https://github.com/aydao/stylegan2-surgery
- WikiArt model: https://github.com/pbaylies/stylegan2 
- Starter-Notebook: https://github.com/Hephyrius/Stylegan2-Ada-Google-Colab-Starter-Notebook/