File size: 937 Bytes
d84abb2
 
 
 
37b01c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# TADNE sample images

Images generated by the [TADNE model](https://huggingface.co/hysts/TADNE).

## Note

- `prediction_results/anime-face-detector`
    - https://github.com/hysts/anime-face-detector
    - YOLOv3 + HRNetV2
- `prediction_results/deepdanbooru`
    - https://github.com/KichangKim/DeepDanbooru
    - `model-resnet_custom_v3.h5`
- `prediction_results/deepdanbooru/intermediate_features`
    - Output by the following model
    - 4096-dim

```python
def create_model() -> tf.keras.Model:
    path = huggingface_hub.hf_hub_download('hysts/DeepDanbooru',
                                           'model-resnet_custom_v3.h5',
                                           use_auth_token=TOKEN)
    model = tf.keras.models.load_model(path)
    model = tf.keras.Model(model.input, model.layers[-4].output)
    layer = tf.keras.layers.GlobalAveragePooling2D()
    model = tf.keras.Sequential([model, layer])
    return model
```