SmilingWolf commited on
Commit
c4fd4de
1 Parent(s): b4adf4d

Add model files

Browse files
Files changed (7) hide show
  1. README.md +28 -0
  2. config.json +37 -0
  3. model.msgpack +3 -0
  4. model.onnx +3 -0
  5. model.safetensors +3 -0
  6. selected_tags.csv +0 -0
  7. sw_jax_cv_config.json +18 -0
README.md CHANGED
@@ -1,3 +1,31 @@
1
  ---
2
  license: apache-2.0
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ library_name: timm
4
  ---
5
+ # WD SwinV2 Tagger v3
6
+
7
+ Supports ratings, characters and general tags.
8
+
9
+ Trained using https://github.com/SmilingWolf/JAX-CV.
10
+ TPUs used for training kindly provided by the [TRC program](https://sites.research.google/trc/about/).
11
+
12
+ ## Dataset
13
+ Last image id: 7220105
14
+ Trained on Danbooru images with IDs modulo 0000-0899.
15
+ Validated on images with IDs modulo 0950-0999.
16
+ Images with less than 10 general tags were filtered out.
17
+ Tags with less than 600 images were filtered out.
18
+
19
+ ## Validation results
20
+ `P=R: threshold = 0.xxxx, F1 = 0.xxxx`
21
+
22
+ ## What's new
23
+ Model v1.0/Dataset v3:
24
+ More training images, more and up-to-date tags (up to 2024-02-28).
25
+ Now `timm` compatible! Load it up and give it a spin using the canonical one-liner!
26
+ ONNX model is compatible with code developed for the v2 series of models.
27
+ The batch dimension of the ONNX model is not fixed to 1 anymore. Now you can go crazy with batch inference.
28
+
29
+ ## Final words
30
+ Subject to change and updates.
31
+ Downstream users are encouraged to use tagged releases rather than relying on the head of the repo.
config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "swinv2_base_window8_256",
3
+ "num_classes": 10861,
4
+ "num_features": 1024,
5
+ "global_pool": "avg",
6
+ "model_args": {
7
+ "act_layer": "gelu_tanh",
8
+ "img_size": 448,
9
+ "window_size": 14
10
+ },
11
+ "pretrained_cfg": {
12
+ "custom_load": false,
13
+ "input_size": [
14
+ 3,
15
+ 448,
16
+ 448
17
+ ],
18
+ "fixed_input_size": false,
19
+ "interpolation": "bicubic",
20
+ "crop_pct": 1.0,
21
+ "crop_mode": "center",
22
+ "mean": [
23
+ 0.5,
24
+ 0.5,
25
+ 0.5
26
+ ],
27
+ "std": [
28
+ 0.5,
29
+ 0.5,
30
+ 0.5
31
+ ],
32
+ "num_classes": 10861,
33
+ "pool_size": null,
34
+ "first_conv": null,
35
+ "classifier": null
36
+ }
37
+ }
model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcdeb6cf20b4674c02bb2761109e2ed40a850d72c24de2ee093de143b83fb66d
3
+ size 413777297
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:622d33fc180ed3ecbd886a5318059ea03b5a6df93c170662725104c339cb8b9c
3
+ size 467460978
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95a626e5dd214c0c0d36894c62296d2c74c9fec8399b4ce6664dfd239bd40816
3
+ size 392149220
selected_tags.csv ADDED
The diff for this file is too large to render. See raw diff
 
sw_jax_cv_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "swinv2_base",
3
+ "model_args": {
4
+ "image_size": 448,
5
+ "patch_size": 4,
6
+ "in_chans": 3,
7
+ "num_classes": 10861,
8
+ "embed_dim": 128,
9
+ "window_size": 14,
10
+ "mlp_ratio": 4.0,
11
+ "qkv_bias": true,
12
+ "drop_rate": 0.0,
13
+ "attn_drop_rate": 0.0,
14
+ "drop_path_rate": 0.1,
15
+ "patch_norm": true,
16
+ "layer_norm_eps": 1e-05
17
+ }
18
+ }