Batch Element Removal

Removes watermarks, text, or local objects from images in batch. Supports bulk text removal and targeted object elimination.

meitu batch image-element-remove

Note: Batch processing is available from meitu-cli v2.1.1 onward. Please upgrade if you're on an older version.

Usage Examples

# Scenario 1: Directory scan mode
meitu batch image-element-remove \
  --input-dir ./images \
  --output-dir ./clean \
  --prompt "Remove watermark" \
  --json

# Scenario 2: Config file mode
meitu batch image-element-remove \
  --config ./batch.image-element-remove.yaml \
  --output-dir ./clean \
  --json

Config File Example

version: 1
defaults:
  outputDir: ./clean
items:
  - input: ./images/watermark1.jpg
    prompt: Remove the watermark in the bottom right corner
  - input: ./images/text1.jpg
    target: watermark
    prompt: Remove the text from the image

Parameter Reference

ParameterRequiredDescription
--input-dirNoInput directory, recursively scans image files
--output-dirYesOutput directory
--configNoPath to YAML/JSON config file
--concurrencyNoType: number; Default: 3; Number of concurrent executions
--max-retriesNoType: number; Default: 0; Number of retries on failure
--skip-existNoSkip existing output files
--dry-runNoPreview the plan without executing
--no-progressNoDisable per-task progress logging
--jsonNoOutput results in JSON format
--json-outputNoWrite results to a specified JSON file
--skill-nameNoSkill name attributed on the server side
--targetNoType: string; Type of element to remove
--promptNoType: string; Description of what to remove