Sign In

img-txt_viewer - Manually caption datasets

img-txt_viewer - Manually caption datasets

Check it out here on my Github! 👋

img-txt_viewer

Display an image and text file side-by-side for easy manual captioning. + Tons of features to help you work faster!

📝 Usage

  • Prepare Your Files:

    • Put each image and its matching text file in the same folder.

    • If you choose to include a text pair for an image, ensure they are located in the same folder and have identical basenames.

    • For example: 01.png and 01.txt, 02.jpg and 02.txt...

    • Supported image types: .png .jpg .jpeg .jfif .jpg_large .webp .bmp

💡 Tips and Features

  • Shortcuts:

    • ALT+LEFT/RIGHT: Quickly move between img-txt pairs.

    • SHIFT+DEL: Send the current pair to a local trash folder.

    • ALT: Cycle through auto-suggestions.

    • TAB: Insert the highlighted suggestion.

    • CTRL+S: Save the current text file.

    • CTRL+E: jump to the next empty text file.

    • CTRL+R: Jump to a random img-txt pair.

    • CTRL+F: Highlight all duplicate words.

    • CTRL+Z / CTRL+Y: Undo/Redo.

    • F5: Refresh the text box.

    • Middle-click: A tag to quickly delete it.

  • Tips:

    • Highlight matching words by selecting text.

    • Enable List View to display text in a vertical list format.

    • Quickly create text pairs by loading the image and saving the text.

    • Get Autocomplete Suggestions while you type using Danbooru/Anime tags, the English Dictionary, etc.

    • Fuzzy Search Use an asterisk * while typing to return a broader range of suggestions.

      • For example: Typing *lo*b returns "looking back", and even "yellow background"

  • Text Tools:

    • Batch tag Delete: View all tag in a directory as a list, and quickly delete them. (Stand alone tool)

    • Prefix Text Files: Insert text at the START of all text files.

    • Append Text Files: Insert text at the END of all text files.

    • Search and Replace: Edit all text files at once.

    • Filter Pairs: Filter pairs based on matching text, blank or missing txt files, and more.

    • Active Highlights: Always highlight specific text.

    • My Tags: Quickly add you own tags to be used as autocomplete suggestions.

    • Cleanup Text: Fix simple typos in all text files of the selected folder.

  • Other Tools

    • Batch Resize Images: Resize a folder of images using several methods and conditions. (Stand alone tool)

    • Resize Image: Resize a single image.

    • Batch Crop Images: Crop a folder of images to an exact size, resizing if needed.

    • Crop Image: Quickly crop an image to a square or freeform ratio.

    • Upscale Image: Upscale an image using realesrgan-ncnn-vulkan

    • Expand Current Image: Expand an image to a square ratio instead of cropping.

    • Find Duplicate Files: Find and separate any duplicate files in a folder (Stand alone tool)

    • Rename and Convert Pairs: Automatically rename and convert files using a neat and tidy formatting.

  • Auto-Save

    • Check the auto-save box to save text when navigating between img/txt pairs or closing the window, etc.

    • Text is cleaned when saved, so you can ignore typos such as duplicate tokens, multiple spaces or commas, missing spaces, and more.

    • Clean text on save Can be disabled from the options menu.

🚩 Requirements

You don't need to worry about anything if you're using the portable/executable version.


Python 3.10+

You will need Pillow and NumPy.

  • To install Pillow: pip install pillow

  • To install NumPy: pip install numpy

Or use the included requirements.txt when setting up your venv.

📜 Version History

Check out the releases page for all changelogs.

(This page will not be updated as frequently as the github page, some info may be out of date)

Please let me know if you have any suggestions, thank you!

20

Comments