dev(narugo): more models added
Browse files- README.md +4 -0
- tagger/model.py +1 -1
README.md
CHANGED
@@ -9,7 +9,11 @@ app_file: app.py
|
|
9 |
pinned: true
|
10 |
license: mit
|
11 |
preload_from_hub:
|
|
|
|
|
12 |
- SmilingWolf/wd-vit-tagger-v3 model.safetensors,config.json,sw_jax_cv_config.json,selected_tags.csv
|
|
|
|
|
13 |
models:
|
14 |
- SmilingWolf/wd-convnext-tagger-v3
|
15 |
- SmilingWolf/wd-swinv2-tagger-v3
|
|
|
9 |
pinned: true
|
10 |
license: mit
|
11 |
preload_from_hub:
|
12 |
+
- SmilingWolf/wd-convnext-tagger-v3 model.safetensors,config.json,sw_jax_cv_config.json,selected_tags.csv
|
13 |
+
- SmilingWolf/wd-swinv2-tagger-v3 model.safetensors,config.json,sw_jax_cv_config.json,selected_tags.csv
|
14 |
- SmilingWolf/wd-vit-tagger-v3 model.safetensors,config.json,sw_jax_cv_config.json,selected_tags.csv
|
15 |
+
- SmilingWolf/wd-vit-large-tagger-v3 model.safetensors,config.json,sw_jax_cv_config.json,selected_tags.csv
|
16 |
+
- SmilingWolf/wd-eva02-large-tagger-v3 model.safetensors,config.json,sw_jax_cv_config.json,selected_tags.csv
|
17 |
models:
|
18 |
- SmilingWolf/wd-convnext-tagger-v3
|
19 |
- SmilingWolf/wd-swinv2-tagger-v3
|
tagger/model.py
CHANGED
@@ -128,7 +128,7 @@ def render_heatmap(
|
|
128 |
# hmap_dim = int(math.sqrt(pos_embed_dim))
|
129 |
|
130 |
image_hmaps = gradients.mean(2, keepdim=True).mul(image_feats.unsqueeze(0)).squeeze()
|
131 |
-
hmap_dim = int(math.sqrt(image_hmaps.mean(-1).
|
132 |
image_hmaps = image_hmaps.mean(-1).reshape(len(image_labels), hmap_dim, hmap_dim)
|
133 |
image_hmaps = image_hmaps.max(torch.zeros_like(image_hmaps))
|
134 |
|
|
|
128 |
# hmap_dim = int(math.sqrt(pos_embed_dim))
|
129 |
|
130 |
image_hmaps = gradients.mean(2, keepdim=True).mul(image_feats.unsqueeze(0)).squeeze()
|
131 |
+
hmap_dim = int(math.sqrt(image_hmaps.mean(-1).numel() / len(image_labels)))
|
132 |
image_hmaps = image_hmaps.mean(-1).reshape(len(image_labels), hmap_dim, hmap_dim)
|
133 |
image_hmaps = image_hmaps.max(torch.zeros_like(image_hmaps))
|
134 |
|