A powerful tool that lets you automatically rename image files based on their content, using a pretrained image classification model. It integrates seamlessly with the Windows context menu for quick access.
- Problem Statement
- Goal
- Features
- Future Improvements
- Demo
- Installation
- Usage
- Project Structure
- Documentation
- Technical Details
- Workflow Overview
- Tech Stack
- Model Requirements
- Contributing
- Roadmap
- License
- Author
When images are downloaded from the web, they are often named arbitrarily (e.g., image123.jpg, random123.png), making them hard to search or organize.
Create a Windows desktop application that:
- Takes an image as input.
- Uses a lightweight open-source ML model to analyze image content.
- Suggests a meaningful filename based on the image (e.g.,
sunset-beach.jpg,cat-sitting-sofa.jpg). - Saves or renames the file with the generated name.
- Embed into Windows Explorer Right-Click Menu (Context Menu)
- Run as background service monitoring "Downloads" folder.
This Meme (Aug'25):
- 🔍 Uses AI to identify image content and rename accordingly.
- 🖱️ Right-click menu integration for easy access from Windows Explorer.
- 🛠️ Offline support - no internet needed to rename images.
- Decrease Latency for model indetifying the Image Tags
- Use a better, more lighteweight Image Captioning Model
To install Smart Image Renamer:
- Download the latest
ImageRenamerSetup.exefrom Releases. - Run the installer. It will:
- Copy required files to the install directory.
- Register right-click context menu entries for image files.
- Use "Uninstall Image Renamer" from the Start Menu to remove.
Note: Requires Python 3.9+ if running from source.
After installation, just right-click any .jpg, .png, .jpeg, etc., and select:
🖼️ Smart Rename with AI
To run from source:
python image_renamer.py path\to\images\image-renamer/
├── image_renamer.py # Main logic
├── installer.iss # Inno Setup script
├── SmartRenameInstaller.exe # Installer file by Inno Setup
├── build.bat # PyInstaller + EXE creation
├── README.md # This file
└── assets/ # Icons and demo images- Model: ResNet18 pretrained on ImageNet (from
torchvision.models) - Prediction flow: image → preprocessing → model → label → renaming
- Installer: built with
Inno Setup, adds right-click handlers via registry - EXE Packaging: via
pyinstaller --onefile --add-data
This project is a Python-based file renaming utility that uses image classification to auto-suggest tags for images and rename them accordingly.
-
User Action:
- Right-click an image → Select “Rename with Tags”.
- Tool launches silently or in CLI (depending on build), takes image path as input.
-
Image Processing:
- The image is passed through a lightweight image classification model (
torchvision.models.squeezenet1_1). - The model returns the top 5 predicted class labels using pretrained weights on ImageNet.
- The image is passed through a lightweight image classification model (
-
Renaming Logic:
- The original filename is updated with the predicted tags.
- New format:
originalfilename-tag1-tag2-tag3.jpg.
-
Packaging:
- The project is bundled into a standalone
.exeusingpyinstaller. - The ImageNet labels file (
imagenet_classes.txt) is embedded into the executable using the--add-dataoption. - An installer is generated using Inno Setup, with optional uninstaller support.
- The project is bundled into a standalone
-
Silent Logging:
- Logs of all renamed files and errors are stored in a
logs/directory next to the executable.
- Logs of all renamed files and errors are stored in a
- Language: Python 3.11+
- ML Model:
torchvision.models.squeezenet1_1 - Packaging Tool: PyInstaller
- Installer: Inno Setup Script (.iss)
- Silent Execution: Supports CLI invocation without UI
- Small in size (can be bundled with the app, works offline).
- Fast inference on CPU (no GPU dependency).
- Decent image captioning ability (for naming).
Contributions are welcome!
- Fork the repo.
- Create a branch:
git checkout -b feature-name - Commit changes with clear messages.
- Submit a PR with description and screenshots if relevant.
- Add support for JPG, PNG, WEBP, BMP
- Drag & drop UI
- Batch renaming preview window
- Mac/Linux versions
- Custom model support
Distributed under the MIT License.
Karan Gupta

