{"id":22836521,"url":"https://github.com/jhc13/taggui","last_synced_at":"2025-08-10T21:32:21.245Z","repository":{"id":183543791,"uuid":"611291701","full_name":"jhc13/taggui","owner":"jhc13","description":"Tag manager and captioner for image datasets","archived":false,"fork":false,"pushed_at":"2024-12-11T14:16:03.000Z","size":23158,"stargazers_count":790,"open_issues_count":55,"forks_count":37,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-12-11T15:27:41.704Z","etag":null,"topics":["cogvlm","florence-2","image-captioning","image-tagging","llava","pyside6","stable-diffusion","tag-manager"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhc13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"jhc13","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"polar":null,"custom":null}},"created_at":"2023-03-08T14:23:30.000Z","updated_at":"2024-12-11T14:47:29.000Z","dependencies_parsed_at":"2023-11-16T12:31:28.784Z","dependency_job_id":"ba199eb9-6b7b-4883-b39d-7cbb22d3cf4c","html_url":"https://github.com/jhc13/taggui","commit_stats":null,"previous_names":["jhc13/image-tagging-gui","jhc13/taggui"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhc13%2Ftaggui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhc13%2Ftaggui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhc13%2Ftaggui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhc13%2Ftaggui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhc13","download_url":"https://codeload.github.com/jhc13/taggui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229464314,"owners_count":18077035,"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":["cogvlm","florence-2","image-captioning","image-tagging","llava","pyside6","stable-diffusion","tag-manager"],"created_at":"2024-12-12T23:02:11.939Z","updated_at":"2025-08-10T21:32:21.215Z","avatar_url":"https://github.com/jhc13.png","language":"Python","funding_links":["https://ko-fi.com/jhc13"],"categories":["Python"],"sub_categories":[],"readme":"# TagGUI\n\n\u003cimg src='images/icon.png' alt='TagGUI icon' width='128'\u003e\n\nCross-platform desktop application for quickly adding and editing image tags\nand captions, aimed towards creators of image datasets for generative AI\nmodels.\n\n\u003cimg src='images/screenshot-v1.25.0.png' alt='TagGUI screenshot' width='100%'\u003e\n\n## Features\n\n- Keyboard-friendly interface for fast tagging\n- Tag autocomplete based on your own most-used tags\n- Integrated token counter (for Stable Diffusion)\n- Automatic caption and tag generation with models including CogVLM, LLaVA, WD\n  Tagger, and many more\n- Batch tag operations for renaming, deleting, and sorting tags\n- Advanced image list filtering\n\n## Installation\n\nThe easiest way to use the application is to download the latest release from\nthe [releases page](https://www.github.com/jhc13/taggui/releases).\nChoose the appropriate file for your operating system, extract it wherever you\nwant, and run the executable file inside.\nYou may have to install [7-Zip](https://www.7-zip.org/download.html) to\nextract the files if you don't have it on your system.\n\n- macOS users: There is no macOS release because it requires a device running\n  the OS, and I do not have one. You can still install and run the program\n  manually (see below).\n- Linux users: You may need to install `libxcb-cursor0`.\n  (See [this Stack Overflow answer](https://stackoverflow.com/a/75941575).) You\n  may also have to install `python3.12-dev` or `python3.11-dev` (depending on\n  your Python version) if you get an error while trying to use a CogVLM2\n  model. (See [this issue](https://github.com/jhc13/taggui/issues/234).)\n\nAlternatively, you can install manually by cloning this repository and\ninstalling the dependencies in `requirements.txt`.\nRun `taggui/run_gui.py` to start the program.\nPython 3.12 is recommended, but Python 3.11 should also work.\n\n## Usage\n\nLoad the directory containing your images by clicking the `Load Directory`\nbutton in the center of the window (or `File` -\u003e `Load Directory`).\nTags are loaded from `.txt` files in the directory with the same names as the\nimages.\nAny changes you make to the tags are also automatically saved to these `.txt`\nfiles.\n\n## Automatic Captioning\n\n\u003cimg src='images/auto-captioner-v1.18.0.png' alt='Auto-captioner screenshot' width='100%'\u003e\n\nIn addition to manual tagging, you can automatically generate captions or tags\nfor your images inside TagGUI.\nGPU generation requires a compatible NVIDIA GPU, and CPU generation is also\nsupported.\n\nTo use the feature, select the images you want to caption in the image list,\nthen select the captioning model you want to use in the Auto-Captioner pane.\nIf you have a local directory containing previously downloaded models, you can\nset it in `File` -\u003e `Settings` to include the models in the model list.\nClick the `Start Auto-Captioning` button to start captioning.\nYou can select multiple images to batch generate captions for all of them.\nIt can take up to several minutes to download and load a model when you first\nuse it, but subsequent generations will be much faster.\n\n### Captioning parameters\n\n`Prompt`: Instructions given to the captioning model.\nPrompt formats are handled automatically based on the selected model.\nYou can use the following template variables to dynamically insert information\nabout each image into the prompt:\n\n- `{tags}`: The tags of the image, separated by commas.\n- `{name}`: The file name of the image without the extension.\n- `{directory}` or `{folder}`: The name of the directory containing the image.\n\nAn example prompt using a template variable could be\n`Describe the image using the following tags as context: {tags}`.\nWith this prompt, `{tags}` would be replaced with the existing tags of each\nimage before the prompt is sent to the model.\n\n`Start caption with`: Generated captions will start with this text.\n\n`Remove tag separators in caption`: If checked, tag separators (commas by\ndefault) will be removed from the generated captions.\n\n`Discourage from caption`: Words or phrases that should not be present in the\ngenerated captions.\nYou can separate multiple words or phrases with commas (`,`).\nFor example, you can put `appears,seems,possibly` to prevent the model from\nusing an uncertain tone in the captions.\nThe words may still be generated due to limitations related to tokenization.\n\n`Include in caption`: Words or phrases that should be present somewhere in the\ngenerated captions.\nYou can separate multiple words or phrases with commas (`,`).\nYou can also allow the captioning model to choose from a group of words or\nphrases by separating them with `|`.\nFor example, if you put `cat,orange|white|black`, the model will attempt to\ngenerate captions that contain the word `cat` and either `orange`, `white`,\nor `black`.\nIt is not guaranteed that all of your specifications will be met.\n\n`Tags to exclude` (WD Tagger models): Tags that should not be generated,\nseparated by commas.\n\nMany of the other generation parameters are described in the\n[Hugging Face documentation](https://huggingface.co/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig).\n\n## Advanced Image List Filtering\n\nThe basic functionality of filtering for images that contain a certain tag is\navailable by clicking on the tag in the `All Tags` pane.\nIn addition to this, you can construct more complex filters in\nthe `Filter Images` box at the top of the `Images` pane.\n\n\u003cdetails\u003e\n\u003csummary\u003e\nClick here to see the full documentation for the filter syntax.\n\u003c/summary\u003e\n\n### Filter criteria\n\nThese are the prefixes you can use to specify the filter criteria you want to\napply:\n\n- `tag:`: Images that have the filter term as a tag\n    - `tag:cat` will match images with the tag `cat`.\n- `caption`: Images that contain the filter term in the caption\n    - The caption is the list of tags as a single string, as it appears in the\n      `.txt` file.\n    - `caption:cat` will match images that have `cat` anywhere in the\n      caption. For example, images with the tag `orange cat` or the\n      tag `catastrophe`.\n- `name`: Images that contain the filter term in the file name\n    - `name:cat` will match images such as `cat-1.jpg` or `large_cat.png`.\n- `path`: Images that contain the filter term in the full file path\n    - `path:cat` will match images such as `C:\\Users\\cats\\dog.jpg` or\n      `/home/dogs/cat.jpg`.\n- You can also use a filter term with no prefix to filter for images that\n  contain the term in either the caption or the file path.\n    - `cat` will match images containing `cat` in the caption or file path.\n\nThe following are prefixes for numeric filters. The operators `=` (`==` also\nworks), `!=`, `\u003c`, `\u003e`, `\u003c=`, and `\u003e=` are used to specify the type of\ncomparison.\n\n- `tags`: Images that have the specified number of tags\n    - `tags:=13` will match images that have exactly 13 tags.\n    - `tags:!=7` will match images that do not have exactly 7 tags (images with\n      less than 7 tags or more than 7 tags).\n- `chars`: Images that have the specified number of characters in the caption\n    - `chars:\u003c100` will match images that have less than 100 characters in the\n      caption.\n    - `chars:\u003e=30` will match images that have 30 or more characters in the\n      caption.\n- `tokens`: Images that have the specified number of tokens in the caption\n    - `tokens:\u003e75` will match images that have more than 75 tokens in the\n      caption.\n    - `tokens:\u003c=50` will match images that have 50 or fewer tokens in the\n      caption.\n\n### Spaces and quotes\n\nIf the filter term contains spaces, you must enclose it in quotes (either\nsingle or double quotes).\nFor example, to find images with the tag `orange cat`, you must\nuse `tag:\"orange cat\"` or `tag:'orange cat'`.\nIf you have both spaces and quotes in the filter term, you can escape the\nquotes with backslashes.\nFor example, you can use `tag:\"orange \\\"cat\\\"\"` for the tag `orange \"cat\"`.\nAn alternative is to use different types of quotes for the outer and inner\nquotes, like so: `tag:'orange \"cat\"'`.\n\n### Wildcards\n\nYou can use the `*` character as a wildcard to match any number of any\ncharacters, and the `?` character to match any single character.\nFor example, `tag:*cat` will match images with tags like `orange cat`,\n`large cat`, and `cat`.\n\n### Combining filters\n\nLogical operators can be used to combine multiple filters:\n\n- `NOT`: Images that do not match the filter\n    - `NOT tag:cat` will match images that do not have the tag `cat`.\n- `AND`: Images that match both filters before and after the operator\n    - `tag:cat AND tag:orange` will match images that have both the tag `cat`\n      and the tag `orange`.\n- `OR`: Images that match either filter before or after the operator\n    - `tag:cat OR tag:dog` will match images that have either the tag `cat` or\n      the tag `dog`, or both.\n\nThe lowercase versions of these operators will also work: `not`, `and`,\nand `or`.\n\nThe operator precedence is `NOT` \u003e `AND` \u003e `OR`, so by default, `NOT` will be\nevaluated first, then `AND`, then `OR`.\nYou can use parentheses to change this order.\nFor example, in `tag:cat AND (tag:orange OR tag:white)`, the `OR` will be\nevaluated first, matching images that have the tag `cat` and either the\ntag `orange` or the tag `white`.\nYou can nest parentheses and operators to create arbitrarily complex filters.\n\u003c/details\u003e\n\n## Controls\n\n- ⭐ Previous / next image: `Ctrl`+`Up` / `Down` (just `Up` / `Down` also works\n  in some cases)\n- Jump to the first untagged image: `Ctrl`+`J`\n- Focus the `Filter Images` box: `Alt`+`F`\n- Focus the `Add Tag` box: `Alt`+`A`\n- Focus the `Image Tags` list: `Alt`+`I`\n- Focus the `Search Tags` box: `Alt`+`S`\n- Focus the `Start Auto-Captioning` button: `Alt`+`C`\n\n### Images pane\n\n- First / last image: `Home` / `End`\n- Select multiple images: Hold `Ctrl` or `Shift` and click the images\n- Select all images: `Ctrl`+`A`\n- Invert selection: `Ctrl`+`I`\n- Right-clicking on an image will bring up the context menu, which includes\n  actions such as copying and pasting tags and moving or copying selected\n  images to another directory.\n\n### Image Tags pane\n\n- Add a tag: Type the tag into the `Add Tag` box and press `Enter`\n- ⭐ Add the first tag suggested by autocomplete: `Ctrl`+`Enter`\n- Add a tag to multiple images: Select the images in the image list add\n  the tag\n- Delete a tag: Select the tag and press `Delete`\n- Rename a tag: Double-click the tag, or select the tag and press `F2`\n- Reorder tags: Drag and drop the tags\n- Select multiple tags: Hold `Ctrl` or `Shift` and click the tags\n\n### All Tags pane\n\n- Show all images containing a tag: Select the tag (When `Tag click action` is\n  set to `Filter images for tag`)\n- Add a tag to selected images: Click the tag (When `Tag click action` is set\n  to `Add tag to selected images`)\n- Delete all instances of a tag: Select the tag and press `Delete`\n- Rename all instances of a tag: Double-click the tag, or select the tag and\n  press `F2`\n\nThe `Edit` menu contains additional features for batch tag operations, such as\n`Find and Replace` (`Ctrl`+`R`) and `Batch Reorder Tags` (`Ctrl`+`B`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhc13%2Ftaggui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhc13%2Ftaggui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhc13%2Ftaggui/lists"}