SSrename is a Python CLI tool that automatically renames screenshots using OCR-first text extraction with an AI-based fallback for images that lack sufficient readable text.
It is designed to work fully offline, using local models, and supports both directories and individual image files.
- OCR-first filename generation using EasyOCR
- Automatic AI fallback using a local Vision-Language Model (BLIP)
- Adaptive OCR thresholds based on screenshot type (code, chat, document, empty)
- Works on both directories and single image paths
- Safe preview mode with
--dry-run - Collision-safe renaming
- Customizable filename length
- Multiple CLI flags for control and debugging
For each image:
- Extract text using EasyOCR
- Detect screenshot type (code / chat / document / empty)
- Check if OCR text meets the required word threshold
- If insufficient → generate a caption using BLIP
- Clean and rank keywords
- Generate a meaningful filename
- Preview or apply the rename safely
git clone https://github.com/your-username/SSrename.git
cd SSrenameconda create -n ssrename python=3.11
conda activate ssrenamepip install -e .ssrename screenshots/ --dry-runssrename path/to/image.png --dry-runssrename screenshots/ --limit 5 --dry-runssrename screenshots/ --verbosessrename screenshots/ --ocr-onlyssrename screenshots/ --ai-onlyssrename screenshots/ --max-words 3