Skip to content

Process Captions Page

Particle edited this page Sep 1, 2023 · 1 revision

Process Captions

The "Process Captions" page within Dataset Tools provides a straightforward way to process .caption files by performing a search and replace operation. This feature is useful for making bulk modifications to captions, such as replacing specific substrings with others to enhance the content's clarity or consistency.

Note

This page is a bit experimental; since I work mostly with booru style captioning.

Its a good idea to make a backup of your dataset before processing with this page!

Functionality

Using this page, you can:

  • Search and Replace in Captions: Automatically replace specified substrings within .caption files, allowing for efficient batch caption editing.

Usage

  1. Select Input and Output Folders: Specify the input folder containing your .caption files and the output folder where the processed files will be saved.

  2. Define Search and Replace Rules: Set up search and replace rules by specifying the substring to be searched for and the replacement substring.

  3. Process Captions: Click the "Process" button to initiate the search and replace operation on the selected .caption files.

Example

Suppose you have .caption files with captions like: "...woman..., ...blurry background..." And you want to make the captions more descriptive: "...latina woman..., ...depth of field..."

You can easily achieve this by setting up a search and replace rule for "woman" to be replaced with "latina woman" and "blurry background" to be replaced with "depth of field.". Search and replace will only happen when applicable. If the .caption file already contains the "latina woman" substring, it won't process it again resulting in "latina woman woman".

ProcessCaptions

Tips

  • Use this feature to ensure consistency and clarity in your captions.

The "Process Captions" feature simplifies the task of bulk editing captions within .caption files, making it a valuable tool for managing and enhancing your dataset's metadata.

Clone this wiki locally