A hybrid Electron + Python desktop application for batch-normalizing headshots using AI background removal.
Before you begin, ensure you have the following installed on your machine:
- Node.js and npm (for the UI)
- Python 3.x and pip (for the AI engine)
If you are downloading this project from source or returning to it after deleting the heavy folders (node_modules, engine, etc.), follow these steps to get running again.
Open your terminal in the project folder and run:
npm installInstall the required AI and image processing libraries:
pip3 install rembg pillow pyinstallerThe app relies on a compiled Python executable to handle the heavy AI processing. You must rebuild this if the engine/ folder is missing.
- Compile the Script:
Run this command to create the standalone folder (using
--onedirfor faster startup):
python3 -m PyInstaller --onedir --name engine engine.py- Move the Output:
The compilation creates a
dist/folder containing anenginefolder. You must move thatenginefolder to the root of your project. Mac/Linux Command:
mv dist/engine .Windows Command:
Move the dist\engine folder to the main project directory manually.
- Cleanup (Optional):
You can now safely delete the
build/anddist/folders created by PyInstaller.
To test the app locally without building a full installer:
npm startNote: In development mode, the app uses the python3 command directly. In production, it looks for the compiled engine executable.
To create a shareable .dmg (Mac) or .exe (Windows) installer:
- Ensure the
engine/folder exists in your project root (see "Building the Python Engine" above). - Run the build command:
npm run dist- Find your installer in the new
dist/folder.
To save space when archiving this project, you can delete the heavy generated folders.
Safe to Delete:
node_modules/(Reinstall withnpm install)engine/(Rebuild with PyInstaller steps above)dist/(Rebuild withnpm run dist)build/(PyInstaller temp files)__pycache__/
Must Keep (Source Code):
engine.pymain.jsindex.htmlpackage.jsonREADME.md