Skip to content

shuffle

Generate random captions by picking one variant from each text group.

Usage

bash
datasety shuffle -i ./images -o ./captions \
    --group "Hello.|Hey!|Bonjour." \
    --group "World.|Earth!"

Options

OptionDescriptionDefault
--input, -iInput directory containing images(required)
--output, -oOutput directory for .txt files(required)
--group, -gInline |-separated, .txt file, or URL(required)
--separatorSeparator between groups" "
--seedRandom seed for reproducibility(random)
--dry-runPreview captions without writingfalse
--show-distributionShow caption distributionfalse

Group Sources

  • Inline: "Hello.|Hey!|Bonjour." (pipe-separated)
  • File: phrases.txt (one variant per line)
  • URL: https://example.com/phrases.txt (fetched, one per line)

Examples

bash
# Inline groups
datasety shuffle -i ./images -o ./captions \
    --group "A photo of a person.|Portrait of someone." \
    --group "Remove the hat.|Take off the hat."

# Mix file and inline
datasety shuffle -i ./images -o ./captions \
    --group subjects.txt \
    --group "ending A|ending B" \
    --seed 42 --show-distribution

Released under the MIT License.