Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -20,6 +20,7 @@ WriteViT is a one-shot handwritten text synthesis framework that learns a writer
|
|
| 20 |
<a href="https://arxiv.org/abs/2505.13235"><img alt="arXiv" src="https://img.shields.io/badge/arXiv-2505.13235-b31b1b.svg"></a>
|
| 21 |
<a href="https://colab.research.google.com/drive/15Lswqr-aQwI-fF6yRoGYt-2pxSlC2L-R"><img alt="Open in Colab" src="https://colab.research.google.com/assets/colab-badge.svg"></a>
|
| 22 |
<img alt="License" src="https://img.shields.io/badge/license-MIT-blue.svg">
|
|
|
|
| 23 |
</p>
|
| 24 |
|
| 25 |
<p align="center">
|
|
@@ -97,6 +98,52 @@ Install PyTorch for your CUDA version first, then install the project dependenci
|
|
| 97 |
pip install -r requirements.txt
|
| 98 |
```
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
## Configuration
|
| 101 |
|
| 102 |
Experiment settings are defined in `params.py`.
|
|
@@ -165,6 +212,25 @@ Prepared dataset pickle files contain writer-split handwriting samples:
|
|
| 165 |
|
| 166 |
|
| 167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
## Resources
|
| 169 |
|
| 170 |
- Paper: https://arxiv.org/abs/2505.13235
|
|
|
|
| 20 |
<a href="https://arxiv.org/abs/2505.13235"><img alt="arXiv" src="https://img.shields.io/badge/arXiv-2505.13235-b31b1b.svg"></a>
|
| 21 |
<a href="https://colab.research.google.com/drive/15Lswqr-aQwI-fF6yRoGYt-2pxSlC2L-R"><img alt="Open in Colab" src="https://colab.research.google.com/assets/colab-badge.svg"></a>
|
| 22 |
<img alt="License" src="https://img.shields.io/badge/license-MIT-blue.svg">
|
| 23 |
+
<a href="https://huggingface.co/DAIR-Group/WriteViT"><img alt="Hugging Face downloads" src="https://img.shields.io/huggingface/dt/DAIR-Group/WriteViT?label=downloads"></a>
|
| 24 |
</p>
|
| 25 |
|
| 26 |
<p align="center">
|
|
|
|
| 98 |
pip install -r requirements.txt
|
| 99 |
```
|
| 100 |
|
| 101 |
+
## Download Checkpoints and Artifacts
|
| 102 |
+
|
| 103 |
+
The released checkpoints, prepared data files, lexicons, and font resources are hosted in this Hugging Face repository. Clone the full release with Git LFS:
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
git lfs install
|
| 107 |
+
git clone https://huggingface.co/DAIR-Group/WriteViT
|
| 108 |
+
cd WriteViT
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
If you want to download the artifacts into another local copy of this codebase, use `huggingface_hub`:
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
pip install -U huggingface_hub
|
| 115 |
+
python - <<'PY'
|
| 116 |
+
from huggingface_hub import snapshot_download
|
| 117 |
+
|
| 118 |
+
snapshot_download(
|
| 119 |
+
repo_id="DAIR-Group/WriteViT",
|
| 120 |
+
repo_type="model",
|
| 121 |
+
local_dir=".",
|
| 122 |
+
allow_patterns=[
|
| 123 |
+
"File/*.pth",
|
| 124 |
+
"File/*.pickle",
|
| 125 |
+
"File/*.txt",
|
| 126 |
+
"config.json",
|
| 127 |
+
"README.md",
|
| 128 |
+
],
|
| 129 |
+
)
|
| 130 |
+
PY
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
The default IAM setup expects these files under `File/`:
|
| 134 |
+
|
| 135 |
+
```text
|
| 136 |
+
File/
|
| 137 |
+
βββ IAM.pickle
|
| 138 |
+
βββ VN.pickle
|
| 139 |
+
βββ eng_ckpt.pth
|
| 140 |
+
βββ vn_ckpt.pth
|
| 141 |
+
βββ vgg19.pth
|
| 142 |
+
βββ english_words.txt
|
| 143 |
+
βββ vn_words.txt
|
| 144 |
+
βββ unifont.pickle
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
## Configuration
|
| 148 |
|
| 149 |
Experiment settings are defined in `params.py`.
|
|
|
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
+
## Download Tracking
|
| 216 |
+
|
| 217 |
+
Hugging Face shows the `Downloads last month` value in the model metadata panel when downloads of tracked repository files are detected. This repository includes `config.json` so Hugging Face can track downloads for the model page in addition to the downloadable checkpoint files under `File/`.
|
| 218 |
+
|
| 219 |
+
The badge at the top of this model card shows the cumulative download count reported by Hugging Face:
|
| 220 |
+
|
| 221 |
+
```text
|
| 222 |
+
https://img.shields.io/huggingface/dt/DAIR-Group/WriteViT?label=downloads
|
| 223 |
+
```
|
| 224 |
+
|
| 225 |
+
If you publish under a different Hugging Face namespace or repository name, update both the badge link and image URL to use:
|
| 226 |
+
|
| 227 |
+
```text
|
| 228 |
+
https://huggingface.co/<your-namespace>/<your-repo-name>
|
| 229 |
+
https://img.shields.io/huggingface/dt/<your-namespace>/<your-repo-name>?label=downloads
|
| 230 |
+
```
|
| 231 |
+
|
| 232 |
+
After pushing `config.json`, the `Downloads are not tracked for this model` message should disappear once Hugging Face refreshes the repository metadata and download events are recorded.
|
| 233 |
+
|
| 234 |
## Resources
|
| 235 |
|
| 236 |
- Paper: https://arxiv.org/abs/2505.13235
|