Logo: Stylized βDβ mark with vibrant orange and red wing motifs β glossy 3D finish.
# Dekupai π ### *Premium Glassmorphic AI Background Remover & Decoupage Studio* Developed by **TrunΓ§gil AI**, **Dekupai** is a state-of-the-art desktop application built on **ElectronJS** that leverages the cutting-edge **BiRefNet** (Bilateral Reference Network) deep learning model for extremely high-resolution, pixel-perfect background extraction and image matting. With a beautiful, modern **Glassmorphic interface** themed with glowing neon citrus accents, **Dekupai** bridges the gap between complex AI segmentation workflows and elite creator utilities, enabling instant edge-accurate transparent subject isolation, visual cropping, auto-trimming, custom background compositing, and professional asset exporting. --- ## β¨ Features - π **TrunΓ§gil Brand Accentuation**: Stunning glassmorphic dark theme styled with heavy back-filters (`backdrop-filter: blur(28px)`) and organic glowing neon orange and golden orbs. - π§ **BiRefNet Neural Engine**: State-of-the-art segmentation that handles intricate visual details (e.g. hair, thin lines, translucent materials) using a lightweight CPU-optimized local inference pipeline. - βοΈ **Integrated Environment Setup**: An automated initial setup overlay that checks, builds, and configures an isolated Python virtual environment (`.venv`) and downloads requirements automatically. - π **Interactive Cropper Studio**: Full integration with `Cropper.js` enabling precise bounding boxes, standard aspect presets (Square, Story, Cinema, Portrait), 90-degree rotations, and horizontal/vertical mirroring. - β‘ **Native Auto-Trim**: A high-performance client-side pixel iteration algorithm that scans the active transparent alpha borders and instantly snaps the crop boundaries tight around your subject. - π¨ **Creative Background Compositor**: - **Transparent Mode**: Keeps alpha transparency (perfect for png stickers and web assets). - **Solid Colors**: Burns clean flat fills with quick-selection swatches and a custom color wheel picker. - **Premium Gradients**: Composes gorgeous, pre-curated linear gradients behind your isolated subject in real-time. - πΎ **Lossless Export Studio**: Composite and save final assets to **PNG (transparent)**, **JPEG**, or **WebP** formats with configurable quality parameter sliders using native system dialogs and helpful "Show in Folder" explorer shortcut notifications. --- ## π Directory Tree The project structure is organized cleanly as follows: ```text Dekupai/ βββ backend/ β βββ requirements.txt # Python dependency library list (torch, transformers, timm, einops, etc.) β βββ setup.py # Automated virtual environment builder and dependency installer β βββ process.py # BiRefNet background segmentation processor (runs local AI inference) βββ node_modules/ # Electron & frontend packages (Ignored in Git) βββ .git/ # Git tracking files βββ .venv/ # Python isolated environment (Ignored in Git) βββ .gitignore # Git ignore instructions βββ package.json # Node project scripts, metadata, and dependencies βββ package-lock.json # Node dependency lock file βββ main.js # Electron main process (IPC handlers, dialogs, python executors) βββ preload.js # Secure sandbox context bridge mapping IPC communications βββ index.html # Main HTML5 layout and inline SVG vectors βββ styles.css # Glassmorphism styling variables, colors, and layout configurations βββ renderer.js # Renderer logic, drag-drop loops, cropper lifecycles, and export generators βββ README.md # Project documentation (This file) ``` --- ## π Getting Started ### Prerequisites Ensure you have the following installed on your machine: * [Node.js](https://nodejs.org/) (v18 or above recommended) * [Python](https://www.python.org/) (v3.10 to v3.12 recommended) * [Git](https://git-scm.com/) ### Installation & Run 1. **Move into the project directory**: ```bash cd dekupai ``` 2. **Install Node Dependencies**: ```bash npm install ``` 3. **Boot the Application**: ```bash npm start ``` 4. **Automatic AI Configuration**: On your very first launch, the **DEKUPAI Initialization Wizard** will display. Click **Configure Engine (Automatic)**. The system will build a local virtual environment (`.venv`), upgrade pip, and install PyTorch CPU version, Hugging Face transformers, and runtime model dependencies. *All progress is streamed in real-time straight to your dashboard progress bar and system terminal window!* ### Packaging & Building To package and compile **Dekupai** into standalone production binaries or installers for Windows and macOS, we use the integrated `electron-builder` engine: * **Build for Windows (NSIS Standalone Installer .exe)**: ```bash npm run build:win ``` *Compiles a single-file executable setup installer inside the `dist/` directory.* * **Build for macOS (Standalone DMG Volume .dmg)**: ```bash npm run build:mac ``` *Compiles the installer package for Apple Systems inside the `dist/` directory. (Note: You can compile macOS builds on Windows using target overrides, but native signed builds are best run on a macOS host).* * **Compile for Both Platforms Simultaneously**: ```bash npm run build:all ``` --- ## π Operational Guide ### 1. Load an Image * Drag and drop any `PNG`, `JPG`/`JPEG`, or `WebP` file directly onto the large glowing dragzone. * Or, click **Browse Local Files** and pick an image from your explorer. ### 2. Extract Background * Click **Extract Subject** in the right-side control tower. * The loader box will show real-time progress (`[STATUS] Loading model...`, `[STATUS] Running background removal...`). * *Note: During the first extraction, the system will download the BiRefNet model weights (~200MB) from Hugging Face. This occurs only once and is cached for instant future runs.* ### 3. Crop & Edit * Toggle between the **Drag Mode** (navigate) and **Crop Selection** buttons at the bottom. * Apply aspect constraints, rotate, or flip your image. * Click **Auto-Trim** to instantly snap the bounding box securely around your transparent subject's non-empty pixels! ### 4. Style & Export * Select your background fill in Section 3: **Transparent**, **Solid**, or **Gradient**. * In Section 4, pick your export format (PNG, JPEG, WebP) and adjust the quality slider. * Click **Export Masterpiece**, choose your directory, and save. * Click **Show in File Explorer** in the success toast to find your exported file instantly! --- ## π Credits & Acknowledgments **Dekupai** is developed under the corporate vision of **TrunΓ§gil Teknoloji** by the software engineering and design expertise of **Γmit TunΓ§**. **Logo & Brand Identity:** The Dekupai app icon features a stylized capital βDβ combined with wing-like elements in orange and red gradients, rendered with a glossy three-dimensional finish β representing speed, precision, and creative elevation. It integrates state-of-the-art AI-powered image segmentation, combining the deep-learning capabilities of **BiRefNet** with high-end glassmorphic client-side controls to deliver professional desktop matting pipelines directly to local workstations.