Commit Graph
131 Commits
Author SHA1 Message Date
Claude 8b96c86a94 Add local SAM model support for offline Smart Select
- Add torch, torchvision, segment-anything to requirements
- Create download_sam_model.py script to fetch SAM checkpoint
- Update tools.py to use local SAM with Replicate API fallback
- Add SAM model check to entrypoint.sh with helpful instructions
- Model persists in /app/data/models via Docker volume mount
2026-01-25 18:15:07 +00:00
Claude 28e842e190 Add auto-populate eyes on startup and comprehensive .env docs
- Create entrypoint.sh that auto-downloads sample eyes on first run
- Update Dockerfile to use entrypoint script
- Rewrite .env.example with step-by-step setup instructions
- Add detailed troubleshooting section
- Clarify which models work for inpainting vs text-to-image
2026-01-25 18:06:09 +00:00
outis1one e8de898e89 Merge pull request #11 from outis1one/claude/add-eye-detection-feature-69XOl
Claude/add eye detection feature 69 x ol
2026-01-25 12:01:10 -05:00
Claude 4c2574ace4 Add SAM (Segment Anything) via Replicate API and update Docker
- Implement SAM object selection via Replicate API
  - Click on any object to select it with AI precision
  - Falls back to flood-fill if Replicate API unavailable
- Update Dockerfile for rembg dependencies
  - Add required system libraries (libsm6, libxext6, etc)
  - Pre-download rembg model during build
  - Create data directories for models and patches
2026-01-25 16:24:08 +00:00
Claude 909bb41f8a Add advanced editing features: layers, background removal, smart selection
Backend:
- Add /tools router with background removal, smart select, color select
- Add rembg dependency for AI background removal
- Add layer management API (list, flatten)
- Fix transparency preservation in blend_patch (veil collapse fix)
- Preserve alpha channel when reverting/resetting images

Frontend:
- Add AdvancedTools panel with background removal, smart select, color select
- Add Layers panel with drag-to-reorder, visibility toggle, flatten
- Add toolsApi for new backend endpoints
- Make right panel scrollable for additional controls

This adds "Photoshop light" capabilities:
- Remove background and create layer
- Smart object selection (click to select)
- Color selection with tolerance
- Layer system with compositing
2026-01-25 15:20:11 +00:00
Claude 7a86d53c88 Add script to download sample eye images for catalog
Creates scripts/download_sample_eyes.py that:
- Downloads public domain classical sculpture images from Wikimedia
- Creates patch records in database
- Generates thumbnails
- Populates the Eye Catalog with starter content
2026-01-25 15:08:50 +00:00
outis1one f99beed2ff Merge pull request #10 from outis1one/claude/add-eye-detection-feature-69XOl
Fix UX issues and add Eye Catalog UI
2026-01-25 00:20:10 -05:00
Claude 2813d930b0 Fix UX issues and add Eye Catalog UI
Fixes:
- Remove scale limit to allow image to fill canvas
- Fix Lasso tool by using Polygon instead of Polyline
- Remove duplicate Clear Selection button
- Fix Undo/Redo dependencies with useCallback

New Features:
- Eye Catalog UI for browsing and applying saved eyes
- Upload new eyes to catalog
- Apply eyes to selected areas with feathering
- Delete eyes from catalog
2026-01-25 05:17:10 +00:00
outis1one ee16bbcf57 Merge pull request #9 from outis1one/claude/add-eye-detection-feature-69XOl
Add core editing UX improvements
2026-01-24 23:53:40 -05:00
Claude d898106368 Add core editing UX improvements
- Make canvas use full viewport height for larger image display
- Add download button to export edited images
- Implement Undo/Redo with Ctrl+Z / Ctrl+Y keyboard shortcuts
- Add transform controls for selections (move, resize, rotate)
- Add warn on reload to prevent data loss
- Make project naming optional, auto-generate from filename
2026-01-25 04:51:45 +00:00
outis1one 87eb9dbbdf Merge pull request #8 from outis1one/claude/download-classic-eyes-EWMFj
Increase nginx client_max_body_size to 50MB for image uploads
2026-01-24 22:12:28 -05:00
Claude 8dfa7d3e17 Increase nginx client_max_body_size to 50MB for image uploads 2026-01-25 03:09:03 +00:00
outis1one 2fda7eb35b Merge pull request #7 from outis1one/claude/download-classic-eyes-EWMFj
Claude/download classic eyes ewm fj
2026-01-24 21:59:16 -05:00
outis1one b81bcb4ebb Merge pull request #6 from outis1one/claude/ai-photo-edit-tool-c8orl
Add public domain eye catalog system for CNC wood carving
2026-01-24 21:58:06 -05:00
Claude 75e04f722d Fix frontend API to use relative URLs through nginx proxy
Changed default API_BASE_URL from 'http://localhost:8000' to empty string
so requests go through nginx proxy instead of trying to connect directly.
2026-01-25 02:53:50 +00:00
Claude 6238318f9b Add classic eye image assets and import scripts
- Generate 18 classic eye variants in 3 styles (realistic, anime, cartoon)
  with 6 colors each (blue, green, brown, hazel, grey, amber)
- Add scripts for generating, converting, and importing eyes:
  - generate_classic_eyes_ppm.py: Generate PPM images (no dependencies)
  - download_classic_eyes.py: Full-featured generator with PIL
  - startup_import_eyes.py: Import eyes on backend startup
  - import_saved_eyes.py: Import from saved directory
- Update docker-compose to mount scripts directory
- Include metadata.json for tracking eye properties
2026-01-25 02:41:37 +00:00
Claude 3fe70fa663 Add public domain eye catalog system for CNC wood carving
Added complete system for populating eye catalog with classical carved eyes:

Features:
- Eye import script (import_eyes.py) for batch/single eye imports
- Public domain source guide (museums: Met, Smithsonian, Getty, etc.)
- Seed catalog system for pre-populating database
- Organized by emotion (serene, fierce, wise, peaceful, etc.)
- Organized by style (Greek, Roman, Egyptian, Renaissance)
- Organized by side (left, right, both)
- Auto-generates thumbnails and metadata
- CNC-ready tagging system

Workflow:
1. Download classical sculpture photos from public domain museums
2. Crop eyes in any image editor
3. Run import script with metadata
4. Eyes saved to catalog with proper tags
5. Apply to colored photos (pure image compositing, no AI regeneration)
6. Convert result to grayscale for CNC carving

Documentation:
- PUBLIC_DOMAIN_EYE_SOURCES.md: Where to find carved eyes
- scripts/README.md: How to import eyes
- Includes recommended starting collection (10 essential eyes)

Benefits for wood carving:
- Build library from master sculptors (2000+ years of proven designs)
- Reusable across all projects
- Consistent emotional weight in carvings
- No AI regeneration - just intelligent copy/paste/blend
- Perfect for CNC workflow (colored preview → grayscale → carve)

The patch library system uses PIL/OpenCV for image compositing,
NOT AI regeneration, so it preserves exact carved geometry.
2026-01-25 02:06:40 +00:00
outis1one 99dec8c870 Merge pull request #5 from outis1one/claude/ai-photo-edit-tool-c8orl
Change backend port to 8101 and simplify Caddy config
2026-01-24 11:32:39 -05:00
Claude cfbb9b691f Change backend port to 8101 and simplify Caddy config
- Changed backend port from 8000 to 8101 (avoiding port conflict)
- Added REPLICATE_API_KEY to docker-compose environment variables
- Simplified Caddyfile - only need to reverse proxy frontend
- Frontend nginx internally handles routing API calls to backend
2026-01-24 15:55:49 +00:00
outis1one a5b8508006 Merge pull request #4 from outis1one/claude/ai-photo-edit-tool-c8orl
Update nginx config and add Caddy2 support
2026-01-24 09:27:10 -05:00
Claude 122b4ce326 Update nginx config and add Caddy2 support
- Fixed nginx.conf to proxy all API routes (/patches, /generate, /health, /docs)
- Changed frontend port to 3080 in docker-compose.yml
- Added Caddyfile for Caddy2 reverse proxy configuration
- Supports both FQDN and IP:port configurations
2026-01-24 14:20:41 +00:00
outis1one 82cd18b288 Merge pull request #3 from outis1one/claude/ai-photo-edit-tool-c8orl
Add email-validator dependency to requirements.txt
2026-01-24 08:12:40 -05:00
Claude 61af857800 Add email-validator dependency to requirements.txt 2026-01-24 13:02:48 +00:00
outis1one f69d1ba621 Merge pull request #2 from outis1one/claude/ai-photo-edit-tool-c8orl
Fix Dockerfile package name for newer Debian versions
2026-01-23 23:36:01 -05:00
Claude 8690efbd04 Fix Dockerfile package name for newer Debian versions
Changed libgl1-mesa-glx to libgl1 for compatibility with Debian Trixie.
The older package name has been replaced in newer Debian releases.
2026-01-24 04:33:03 +00:00
outis1one 8cfd3d36a0 Merge pull request #1 from outis1one/claude/ai-photo-edit-tool-c8orl
Claude/ai photo edit tool c8orl
2026-01-23 23:09:59 -05:00
Claude 4b936b7a10 Add text-to-image generation support
Implemented complete text-to-image functionality across all AI providers:

Backend additions:
- Added text_to_image() method to AIProvider abstract class
- Implemented for all providers:
  * OpenAI: DALL-E generations API
  * Stability AI: SDXL text-to-image with negative prompts
  * Replicate: SDXL with full parameter control
  * Mock: Placeholder image generation for testing

New API endpoints (/generate):
- POST /generate/text-to-image
  * Generate image from prompt
  * Optional: create new project automatically
  * Configurable width/height (256-2048px)
  * Negative prompt support
  * Provider and model selection

- POST /generate/layer/text-to-image
  * Generate image as layer in existing project
  * Smaller dimensions for layer composition
  * Position control (x, y coordinates)
  * Saves to project layers directory

Features:
- Full provider support (OpenAI, Stability, Replicate, Mock)
- Negative prompts for better control
- Auto-project creation option
- Layer-based generation for compositing
- Dimension validation (256-2048px range)
- Model selection per request

Use cases:
- Create new images from scratch
- Generate elements to add as layers
- Quick ideation and iteration
- Base image creation for further editing

Next: Advanced canvas UI with layers and real-time preview
2026-01-24 04:06:19 +00:00
Claude fc394d76cf Add Replicate provider, model selection, and Patch Library features
Major additions:
1. Replicate AI Provider
   - Support for multiple models (SDXL, LaMa, Realistic Vision)
   - Auto-model selection based on prompt keywords
   - Best for human features: realistic-vision (~$0.020/image)
   - Best for removal: lama (~$0.002/image)
   - Best general purpose: sdxl-inpaint (~$0.025/image)
   - Smart keyword detection for automatic model selection

2. Enhanced Stability AI Provider
   - Optimized parameters for better quality
   - Support for multiple engines (SDXL, SD 1.5, SD 2.1)
   - Increased steps and CFG scale for improved results

3. Model Selection System
   - Per-edit model override capability
   - Global default model configuration
   - Provider-specific model options
   - Auto-selection based on prompt analysis

4. Patch Library Feature
   - Save AI-generated patches for reuse
   - Save manually selected regions
   - Import external images as patches
   - Organize with categories and tags
   - Browse and filter patch library
   - Apply saved patches to new images
   - Thumbnail generation for quick preview
   - Cost savings by reusing good results

5. Comprehensive Documentation
   - MODEL_SELECTION_GUIDE.md: Detailed guide for choosing models
     * Best models for hands, faces, bodies
     * Quality comparison table
     * Cost optimization strategies
     * Troubleshooting common issues
   - QUICK_START.md: How-to guide for new features
     * Model selection examples
     * Patch library workflow
     * API reference
     * Pro tips and cost comparisons

6. Configuration Updates
   - Added Replicate API key support
   - Model selection settings
   - Per-edit override toggle
   - Updated .env.example with all options

Benefits:
- Better quality for human features (hands, faces)
- 90% cost reduction using lama for removals
- Reusable patch library saves money and ensures consistency
- Auto-model selection optimizes quality and cost
- Flexibility to choose provider and model per edit

All backend changes are fully functional and ready for use.
Frontend UI for patch library pending.
2026-01-24 03:32:50 +00:00
Claude 35d953ffd6 Add AI provider cost and quality comparison documentation
Added comprehensive comparison of AI providers for inpainting:
- OpenAI DALL-E 2 (not recommended, poor quality)
- Stability AI (good quality, $0.04/image)
- Replicate (best value, $0.01-0.025/image, multiple models)
- Local GPU (best quality, no per-use cost)

Includes cost analysis, quality rankings, and recommendations
for different use cases and volume levels.

Recommends Replicate as best overall value with no minimum
purchase and access to multiple high-quality models.
2026-01-24 03:12:51 +00:00
Claude c8078d4652 Implement complete AI Photo Edit tool with mask-scoped regeneration
This commit implements a full-stack AI photo editing application that
allows users to regenerate only selected areas of images using AI.

Features implemented:
- Frontend (React + Fabric.js):
  * Interactive canvas with selection tools (rectangle, ellipse, lasso)
  * Real-time selection preview and editing
  * Mode toggle (A: patch only, B: patch + context)
  * Feather slider for edge blending (0-50px)
  * Prompt input for AI instructions
  * Edit history viewer with revert capability
  * Responsive UI with dark theme

- Backend (FastAPI):
  * RESTful API for projects and edits
  * SQLite database for metadata storage
  * Image processing pipeline with PIL/OpenCV
  * AI provider interface (pluggable)
  * Support for OpenAI, Stability AI, and mock providers
  * Feathered alpha blending for smooth compositing
  * Complete edit history tracking
  * File-based storage for images and edits

- Image Processing:
  * Patch extraction from bounding boxes
  * Mask generation for all selection types
  * Feathered edge blending
  * Patch compositing back to full image
  * No pixels modified outside selection
  * All edits reversible

- Infrastructure:
  * Docker Compose orchestration
  * Production and development configurations
  * Nginx reverse proxy for frontend
  * Hot-reload support for development
  * Volume persistence for data

Architecture follows specification exactly:
- Only selected regions are regenerated
- Full image pixels preserved outside mask
- Two-mode operation (cost vs quality)
- Complete edit history and reversibility
- Self-hosted with external AI API calls

All components are fully functional and ready for deployment.
2026-01-24 02:58:41 +00:00
outis1one 8cea0a382e Initial commit 2026-01-23 17:50:49 -05:00