CuttingLabs is a high-performance image segmentation application that leverages a hybrid AI approach, utilizing Google Gemini API for cloud-based precision and RMBG-2.0 for fast, local background removal. Built with Next.js and Django, it features a professional comparison UI with perfect 1:1 alignment, real-time edge refinement, and intelligent hardware-accelerated fallback to ensure a seamless and efficient cutout workflow.
- Hybrid AI Segmentation: Seamlessly switch between Gemini (Cloud) and RMBG-2.0 (Local).
- Pro Comparison Slider: Precision 1:1 alignment for accurate before/after viewing.
- Hardware Acceleration: Automatic detection of CUDA, MPS, or CPU for local processing.
- Edge Refinement: Granular control over Threshold, Feather, and Padding.
- Fast Fallback: Intelligent automatic switching to local model based on API quota or timeout.
- Frontend: Next.js 14, Tailwind CSS, Lucide Icons.
- Backend: Django, Django REST Framework, Celery, Redis.
- AI Models: Google Gemini Pro Vision, RMBG-2.0 (ONNX).
- Processing: Pillow, NumPy, ONNX Runtime.
- Python 3.10+
- Node.js 18+
- Docker (optional)
- Clone the repository:
git clone https://github.com/awpetrik/CuttingLabs.git
- Setup Backend:
- Create
.envfrom.env.exampleand add yourGEMINI_API_KEY. - Install dependencies:
pip install -r requirements.txt. - Run:
python manage.py runserver.
- Create
- Setup Frontend:
- Install dependencies:
npm install. - Run:
npm run dev.
- Install dependencies:
MIT
