Update README.md
Browse files
README.md
CHANGED
@@ -2,4 +2,139 @@
|
|
2 |
license: apache-2.0
|
3 |
library_name: timm
|
4 |
pipeline_tag: image-classification
|
5 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
3 |
library_name: timm
|
4 |
pipeline_tag: image-classification
|
5 |
+
---
|
6 |
+
# RedRocket Joint Tagger Project
|
7 |
+
|
8 |
+
## JTP-1: PILOT
|
9 |
+
|
10 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
11 |
+
|
12 |
+
This model is a multi-label classifier model designed and trained by RedRocket for use on furry images, using E621 tags.
|
13 |
+
|
14 |
+
PILOT is the first model of this series. It is trained on **over 9000** tags -- tags were selected with the criteria of being e621 tags with more than 500 occurrences, that are not artist or character tags.
|
15 |
+
|
16 |
+
## Model Details
|
17 |
+
|
18 |
+
### Model Description
|
19 |
+
|
20 |
+
<!-- Provide a longer summary of what this model is. -->
|
21 |
+
|
22 |
+
- **Developed by:** RedRocket
|
23 |
+
- **Compute power provided by:** Minotoro and Frosting.ai (thank you)
|
24 |
+
- **Model type:** Multi-label classifier
|
25 |
+
- **License:** Apache 2.0
|
26 |
+
- **Finetuned from model:** SigLIP-400M ViT
|
27 |
+
|
28 |
+
### Model Sources
|
29 |
+
|
30 |
+
<!-- Provide the basic links for the model. -->
|
31 |
+
|
32 |
+
- **Repository:** Here!
|
33 |
+
- **Demo:** https://huggingface.co/spaces/RedRocket/JointTaggerProject-Inference
|
34 |
+
|
35 |
+
## Uses
|
36 |
+
|
37 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
38 |
+
|
39 |
+
### Direct Use
|
40 |
+
|
41 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
42 |
+
|
43 |
+
Use it to tag furry images.
|
44 |
+
|
45 |
+
### Downstream Use
|
46 |
+
|
47 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
48 |
+
|
49 |
+
Use it to train a text-to-image model on synthetic tags.
|
50 |
+
|
51 |
+
### Out-of-Scope Use
|
52 |
+
|
53 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
54 |
+
|
55 |
+
Use it to tag non-furry images. It might not work terribly well but it might also work surprisingly well! Great entertainment value either way.
|
56 |
+
|
57 |
+
## Bias, Risks, and Limitations
|
58 |
+
|
59 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
60 |
+
|
61 |
+
This model may contain biases. Tags that are poorly tagged in the original data may be weakly predicted by the classifier, for instance. Tags that are very commonly present alongside other tags may be hallucinated.
|
62 |
+
|
63 |
+
### Recommendations
|
64 |
+
|
65 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
66 |
+
|
67 |
+
Check at least some portion of your outputs manually, preferably a diverse sample, to verify the correctness of its outputs, and apply a different threshold if it seems necessary.
|
68 |
+
|
69 |
+
## How to Get Started with the Model
|
70 |
+
|
71 |
+
Use the included code to launch a Gradio demo for playing with the model. We recommend a threshold of 0.2 for starting out. Validation stats during training showed a Bookmaker's Informedness of 0.725 at this value (this means that the model is that much better at guessing tags than random guessing). Manual evaluation seems to suggest that a large portion of the gap between that value and 1 is likely to be due to false negatives from the dataset.
|
72 |
+
|
73 |
+
## Training Details
|
74 |
+
|
75 |
+
### Training Data
|
76 |
+
|
77 |
+
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
78 |
+
|
79 |
+
The model was trained on a roughly 4 million image subset of e621. No dataset filtering was applied.
|
80 |
+
|
81 |
+
Loss weighting was informed by a Bayesian prior model trained on a set of tags from non-deleted post tag strings from an e621 database dump.
|
82 |
+
|
83 |
+
### Training Procedure
|
84 |
+
|
85 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
86 |
+
|
87 |
+
Images go in, logits come out. You can't explain that.
|
88 |
+
|
89 |
+
#### Preprocessing [optional]
|
90 |
+
|
91 |
+
Image preprocessing should be done in the following order:
|
92 |
+
1. Resize image to **longest side** 384.
|
93 |
+
2. torchvision.transforms.ToTensor()
|
94 |
+
3. Composite the alpha channel, if present, with 50% gray.
|
95 |
+
4. Normalize to mean 0.5 and std 0.5 (changing the range from (0, 1) to (-1, 1))
|
96 |
+
5. Pad image to 384x384 (torchvision.transforms.CenterCrop((384,384)) will do this)
|
97 |
+
|
98 |
+
|
99 |
+
#### Training Hyperparameters
|
100 |
+
|
101 |
+
- **Training regime:** Model was trained for 4 epochs on a batch size of 512, using Schedule Free Adam
|
102 |
+
|
103 |
+
#### Speeds, Sizes, Times [optional]
|
104 |
+
|
105 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
106 |
+
|
107 |
+
[More Information Needed]
|
108 |
+
|
109 |
+
## Evaluation
|
110 |
+
|
111 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
112 |
+
|
113 |
+
### Testing Data, Factors & Metrics
|
114 |
+
|
115 |
+
#### Testing Data
|
116 |
+
|
117 |
+
<!-- This should link to a Dataset Card if possible. -->
|
118 |
+
|
119 |
+
[More Information Needed]
|
120 |
+
|
121 |
+
#### Factors
|
122 |
+
|
123 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
124 |
+
|
125 |
+
[More Information Needed]
|
126 |
+
|
127 |
+
#### Metrics
|
128 |
+
|
129 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
130 |
+
|
131 |
+
[More Information Needed]
|
132 |
+
|
133 |
+
### Results
|
134 |
+
|
135 |
+
It seems to tag furry images fairly well.
|
136 |
+
|
137 |
+
#### Summary
|
138 |
+
|
139 |
+
|
140 |
+
|