Skip to content

jschof1/quickbg

QuickBG Logo

⚡ QuickBG

PyPI Version PyPI Downloads License Build Status Tweet

Lightning-fast AI background removal CLI tool for Mac, Linux, and Windows


✨ Features

  • 🚀 Blazing Fast - Process images in seconds using state-of-the-art AI
  • 🔒 Private & Secure - Runs entirely locally on your machine
  • 🎯 High Quality - Produces clean cutouts with excellent edge handling
  • 📦 Batch Processing - Process entire folders with a single command
  • 🔧 Zero Config - Works out of the box with sensible defaults
  • 🍎 Mac Optimized - Native macOS support with pipx installation

📸 Example

# Remove background from a single image
$ quickbg photo.jpg
Processing: photo.jpg
Saved: photo-nobg.png

# With custom output
$ quickbg product.png -o cleaned.png

# Batch process a folder
$ quickbg -b ./productPhotos/
Found 25 image(s) to process
Output directory: ./productPhotos/nobg
--------------------------------------------------
[1/25] img_001.jpg... OK
[2/25] img_002.jpg... OK
...
--------------------------------------------------
Done! 25/25 images processed successfully

🖼️ Before & After

Before After
Product with background Product no background

📥 Installation

macOS (Recommended)

# Install pipx if you don't have it
brew install pipx

# Install QuickBG
pipx install quickbg

Linux

pipx install quickbg

Windows

pipx install quickbg

Using pip (All Platforms)

pip install quickbg

From Source

git clone https://github.com/jschof1/quickbg.git
cd quickbg
pip install -e .

🔧 Usage

Single Image Mode

# Basic usage (saves as filename-nobg.png)
quickbg input.jpg

# Specify output filename
quickbg input.png -o result.png

# Enable alpha matting for better edges (slower)
quickbg input.jpg --alpha-matting

Batch Processing Mode

# Process all images in a folder
quickbg -b ./photos/

# Specify output directory
quickbg -b ./photos/ -o ./output/

# With alpha matting
quickbg -b ./photos/ -a

Supported Formats

  • Input: JPG, JPEG, PNG, WebP, BMP, TIFF, TIF
  • Output: PNG (with transparency)

⚙️ Options

Flag Description
input Input image file or directory
-o, --output Output file or directory path
-b, --batch Batch mode: process all images in directory
-a, --alpha-matting Enable alpha matting for better edge refinement
-v, --version Show version number
-h, --help Show help message

🔨 Development

Setup Development Environment

# Clone the repository
git clone https://github.com/jschof1/quickbg.git
cd quickbg

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/ tests/

# Lint code
ruff check src/ tests/

Run Tests

pytest tests/ -v

🤝 Contributing

Contributions are welcome! Please read our Contributing Guidelines first.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • rembg - The amazing AI background removal library
  • U-2-Net - The underlying deep learning model

📊 Stats

Alt


Made with ❤️ by Jack Schofield

About

⚡ Lightning-fast AI background removal CLI tool for Mac, Linux, and Windows

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages