Commit ·
3d0ea43
1
Parent(s): 4484ece
Update README.md
Browse files
README.md
CHANGED
|
@@ -47,41 +47,6 @@ backbone fine-tuned end-to-end with a single linear projection head.
|
|
| 47 |
|
| 48 |
## Usage
|
| 49 |
|
| 50 |
-
### Standalone (no `transformers` dependency)
|
| 51 |
-
|
| 52 |
-
```python
|
| 53 |
-
from inference_tagger_standalone import Tagger
|
| 54 |
-
|
| 55 |
-
tagger = Tagger(
|
| 56 |
-
checkpoint_path="tagger_proto.safetensors",
|
| 57 |
-
vocab_path="tagger_vocab_with_categories.json",
|
| 58 |
-
device="cuda",
|
| 59 |
-
)
|
| 60 |
-
|
| 61 |
-
tags = tagger.predict("photo.jpg", topk=40)
|
| 62 |
-
# → [("solo", 0.98), ("anthro", 0.95), ...]
|
| 63 |
-
|
| 64 |
-
# or threshold-based
|
| 65 |
-
tags = tagger.predict("https://example.com/image.jpg", threshold=0.35)
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
### CLI
|
| 69 |
-
|
| 70 |
-
```bash
|
| 71 |
-
# top-30 tags, pretty output
|
| 72 |
-
python inference_tagger_standalone.py \
|
| 73 |
-
--checkpoint tagger_proto.safetensors \
|
| 74 |
-
--vocab tagger_vocab_with_categories.json \
|
| 75 |
-
--images photo.jpg https://example.com/image.jpg \
|
| 76 |
-
--topk 30
|
| 77 |
-
|
| 78 |
-
# comma-separated string (pipe into diffusion trainer)
|
| 79 |
-
python inference_tagger_standalone.py ... --format tags
|
| 80 |
-
|
| 81 |
-
# JSON
|
| 82 |
-
python inference_tagger_standalone.py ... --format json
|
| 83 |
-
```
|
| 84 |
-
|
| 85 |
### Web UI
|
| 86 |
|
| 87 |
```bash
|
|
|
|
| 47 |
|
| 48 |
## Usage
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
### Web UI
|
| 51 |
|
| 52 |
```bash
|