File size: 1,347 Bytes
88670dd
f15a53d
12363a3
 
 
 
4e78f19
b02cd1b
88670dd
 
 
 
4e78f19
88670dd
4e78f19
 
88670dd
4e78f19
88670dd
72e0ae1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4e78f19
88670dd
4e78f19
88670dd
4e78f19
88670dd
 
 
 
 
 
 
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
---
library_name: tf-keras
tags:
- gan
- dcgan
- huggan
- tensorflow
- unconditional-image-generation
---

## Model description

Simple DCGAN implementation in TensorFlow to generate CryptoPunks.

## Generated samples
<img src="https://github.com/dimitreOliveira/cryptogans/raw/main/assets/gen_samples.png" width="350" height="350">

Project repository: [CryptoGANs](https://github.com/dimitreOliveira/cryptogans).

## Usage

You can play with the HuggingFace [space demo](https://huggingface.co/spaces/huggan/crypto-gan).

Or try it yourself

```python
import tensorflow as tf
import matplotlib.pyplot as plt
from huggingface_hub import from_pretrained_keras

seed = 42
n_images = 36
codings_size = 100
generator = from_pretrained_keras("huggan/crypto-gan")

def generate(generator, seed):
    noise = tf.random.normal(shape=[n_images, codings_size], seed=seed)
    generated_images = generator(noise, training=False)

    fig = plt.figure(figsize=(10, 10))
    for i in range(generated_images.shape[0]):
        plt.subplot(6, 6, i+1)
        plt.imshow(generated_images[i, :, :, :])
        plt.axis('off')
    plt.savefig("samples.png")
    
generate(generator, seed)
```

## Training data

For training, I used the 10000 CryptoPunks images.

## Model Plot

<details>
<summary>View Model Plot</summary>

![Model Image](./model.png)

</details>