High-quality image upscaling from the command line.
Lanczos interpolation · Unsharp-mask sharpening · Parallel batch processing · tqdm progress bars
- 🔍 Scale images by any factor (1×–16×) using Lanczos interpolation
- 🖼 Supports PNG, JPG, JPEG input and output formats
- ⚡ Multithreaded batch processing for large image sets
- 📊 tqdm progress bar with per-image resolution and timing stats
- 🔧 Modular code — clean
load_image(),upscale_image(),save_image()API - 🛡 Graceful error handling — bad files are logged and skipped, not crashes
- 📦 Installable as a global CLI tool via pip or wheel
pip install stellargit clone https://github.com/pro-grammer-SD/stellar.git
cd stellar
pip install .pip install build# From the repository root:
python -m buildThis produces two distribution artefacts inside dist/:
dist/
├── stellar-1.0.0-py3-none-any.whl ← wheel (preferred)
└── stellar-1.0.0.tar.gz ← sdist
pip install dist/stellar-1.0.0-py3-none-any.whlOr use a glob to pick up whichever version was built:
pip install dist/stellar-*.whlpip install --upgrade dist/stellar-*.whlpip uninstall stellarAfter installation the stellar command will be available on your PATH.
stellar --input ./photosstellar --input ./photos --scale 4stellar --input ./raw --output ./hdstellar -i ./shots -o ./out --format PNGstellar -i ./photos --verbosestellar -i ./large_batch -o ./upscaled -s 2 -w 8stellar \
--input ./raw_photos \
--output ./upscaled \
--scale 3 \
--format PNG \
--workers 6 \
--verboseUsage: stellar [OPTIONS]
🌟 Upscale all images in INPUT_DIR and write them to OUTPUT_DIR.
Supported source formats: PNG, JPG, JPEG.
Options:
-i, --input PATH 📂 Input folder containing images to upscale. [required]
-o, --output PATH 📁 Output folder for upscaled images. [default: upscaled]
-s, --scale FLOAT 🔍 Scale factor (e.g. 2 doubles the resolution). [default: 2.0]
-f, --format TEXT 🖼 Output format override: PNG, JPG, JPEG.
-w, --workers INTEGER ⚡ Number of parallel worker threads. [default: 4]
-v, --verbose 🔊 Print per-image resolution and timing details.
--help Show this message and exit.
Output filenames are the original name with _upscaled appended:
photos/sunset.jpg → upscaled/sunset_upscaled.jpg
| Package | Purpose |
|---|---|
| Pillow | Image format detection |
| opencv-python | Image I/O and Lanczos resize |
| scikit-learn | Optional interpolation utilities |
| typer | CLI framework |
| tqdm | Progress bars |
| numpy | Array operations |
stellar/
├── stellar.py # Main script (load / upscale / save / CLI)
├── pyproject.toml # Build config & metadata
├── README.md
├── LICENSE # MIT
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── SECURITY.md
└── .github/
├── ISSUE_TEMPLATE/
│ ├── bug_report.md
│ └── feature_request.md
└── PULL_REQUEST_TEMPLATE.md
Contributions are welcome! Please read CONTRIBUTING.md first.
To report a security vulnerability, please see SECURITY.md.
This project is licensed under the MIT License.
Copyright © 2025 Soumalya Das
Made with ❤️ by Soumalya Das