Thanks for your interest in contributing!
- Fork the repository and create a feature branch.
- Set up a development environment:
python -m venv venv
source venv/bin/activate
pip install -e .- Make your changes and test them against real images and videos:
# Image
backgroundremover -i input.jpg -o output.png
# Video (use -fl to limit frames for quick testing)
backgroundremover -i input.mp4 -mk -fl 30 -o matte.mp4- Open a pull request with a clear description of the problem and the fix.
- Keep changes focused — one fix or feature per pull request.
- Match the existing code style of the file you are editing.
- The CLI (
backgroundremover/cmd/cli.py), the core library (backgroundremover/bg.py), and the video pipeline (backgroundremover/utilities.py) are the main entry points. - Image-processing flags (
-a,-mt,-om, etc.) should behave the same in single-file, pipe, and-iffolder modes. - If your change affects output quality or resolution, include before/after details in the PR description.
Please include the exact command you ran, the version
(pip show backgroundremover), your OS, and whether you are on CPU or GPU.
Sample input files that reproduce the problem help a lot.