{"id":28424036,"url":"https://github.com/mooshieblob1/wdtagger","last_synced_at":"2025-06-26T21:32:48.095Z","repository":{"id":294598652,"uuid":"987484871","full_name":"Mooshieblob1/wdtagger","owner":"Mooshieblob1","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-22T13:04:41.000Z","size":121,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T09:43:31.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mooshieblob1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-21T06:29:35.000Z","updated_at":"2025-05-22T13:04:45.000Z","dependencies_parsed_at":"2025-05-21T07:39:12.291Z","dependency_job_id":"f2780b01-2cce-4388-9433-9fdf724655f1","html_url":"https://github.com/Mooshieblob1/wdtagger","commit_stats":null,"previous_names":["mooshieblob1/wdtagger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mooshieblob1/wdtagger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mooshieblob1%2Fwdtagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mooshieblob1%2Fwdtagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mooshieblob1%2Fwdtagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mooshieblob1%2Fwdtagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mooshieblob1","download_url":"https://codeload.github.com/Mooshieblob1/wdtagger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mooshieblob1%2Fwdtagger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262145201,"owners_count":23265892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-05T09:36:14.706Z","updated_at":"2025-06-26T21:32:48.089Z","avatar_url":"https://github.com/Mooshieblob1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wdtagger\n\n`wdtagger` is a local image tagging tool that uses `onnxruntime` and HuggingFace-hosted ONNX models (e.g. `wd-vit-tagger-v3`) to generate Danbooru-style tags for images stored in a BlobPics (Cloudflare Worker + R2) bucket.\nIt downloads the model and tag CSV on first run, performs OpenCV-based preprocessing, and applies a configurable confidence threshold.\n\nEach tagged image is saved as a local `.json` file and automatically uploaded to your BlobPics backend via a `POST /upload-json` API.\n\n---\n\n## 📦 Requirements\n\n* Python 3.11+\n* `uv` package manager (or pip)\n* Access to a BlobPics site (Cloudflare Worker + R2, with `/list`, `/original/`, `/upload-json`)\n* Internet access (for HuggingFace model download)\n* CUDA-compatible GPU (optional)\n\n---\n\n## 🛠 Setup\n\n```bash\ngit clone https://github.com/Mooshieblob1/wdtagger.git\ncd wdtagger\npython3 -m venv .venv\nsource .venv/bin/activate\nuv pip install -r requirements.txt\n```\n\nSet your **BlobPics domain** in the script (`test_tagger.py`):\n\n```python\nDOMAIN = \"blobpics.tech\"\n```\n\n---\n\n## 🚀 Run Tagger\n\nRun the script to fetch all images, tag them, and upload tag data to your site:\n\n```bash\npython test_tagger.py\n```\n\nThis will:\n\n* Get image IDs from your BlobPics `/list` endpoint\n* Download each image and generate tags\n* Save `.json` files locally (one per image)\n* POST tags to your BlobPics `/upload-json` API\n\n---\n\n## 🔁 Persistent Tagging Loop\n\nTo continuously tag new images every 60 minutes:\n\n```bash\n./persistent_runner.sh\n```\n\nOr run in the background:\n\n```bash\nnohup ./persistent_runner.sh \u003e tagger.log 2\u003e\u00261 \u0026\n```\n\n---\n\n## ♻️ Reprocess All Images\n\nIf you change your `TAG_THRESHOLD` and want to regenerate all tags:\n\n```bash\nrm tagged_images.json\npython test_tagger.py\n```\n\n---\n\n## ⚙️ Configuration Options\n\nEdit the top of `test_tagger.py`:\n\n```python\nDOMAIN = \"blobpics.tech\"                # Your BlobPics site\nTAG_THRESHOLD = 0.5                     # Minimum confidence to keep tag\nTAG_BLACKLIST = [\"blue_skin\"]           # Tags to ignore completely\n```\n\n---\n\n## 📁 Files\n\n| File                   | Purpose                                          |\n| ---------------------- | ------------------------------------------------ |\n| `test_tagger.py`       | Tags images from BlobPics \u0026 uploads tags via API |\n| `persistent_runner.sh` | Optional: loops tagging every hour               |\n| `requirements.txt`     | Dependencies for the project                     |\n| `tagged_images.json`   | Output tag cache (local copy)                    |\n\n---\n\n## 📄 License\n\nMIT — use freely with credit.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooshieblob1%2Fwdtagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmooshieblob1%2Fwdtagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooshieblob1%2Fwdtagger/lists"}