{"id":37229433,"url":"https://github.com/jjshay/art-crop-system","last_synced_at":"2026-01-15T03:32:44.787Z","repository":{"id":332003179,"uuid":"1130646858","full_name":"jjshay/art-crop-system","owner":"jjshay","description":"AI-powered artwork detection and cropping with multi-tier analysis","archived":false,"fork":false,"pushed_at":"2026-01-12T02:40:08.000Z","size":126,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T04:43:14.364Z","etag":null,"topics":["ai","artwork","automation","computer-vision","image-processing","opencv","pillow","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjshay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-08T20:01:08.000Z","updated_at":"2026-01-12T02:40:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jjshay/art-crop-system","commit_stats":null,"previous_names":["jjshay/art-crop-system"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jjshay/art-crop-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjshay%2Fart-crop-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjshay%2Fart-crop-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjshay%2Fart-crop-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjshay%2Fart-crop-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjshay","download_url":"https://codeload.github.com/jjshay/art-crop-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjshay%2Fart-crop-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artwork","automation","computer-vision","image-processing","opencv","pillow","python"],"created_at":"2026-01-15T03:32:44.055Z","updated_at":"2026-01-15T03:32:44.767Z","avatar_url":"https://github.com/jjshay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Art Crop System\n\n![CI](https://github.com/jjshay/art-crop-system/workflows/CI/badge.svg)\n![CodeQL](https://github.com/jjshay/art-crop-system/workflows/CodeQL/badge.svg)\n[![codecov](https://codecov.io/gh/jjshay/art-crop-system/branch/main/graph/badge.svg)](https://codecov.io/gh/jjshay/art-crop-system)\n![Release](https://img.shields.io/github/v/release/jjshay/art-crop-system)\n![Python](https://img.shields.io/badge/python-3.9+-blue.svg)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n![AI Models](https://img.shields.io/badge/AI%20Models-4-purple.svg)\n![rembg](https://img.shields.io/badge/rembg-enabled-brightgreen.svg)\n\n**AI-powered artwork detection and cropping - automatically extract art from photos with perfect borders.**\n\n[![Demo](https://asciinema.org/a/Z0Qp6keIpvrnztvS.svg)](https://asciinema.org/a/Z0Qp6keIpvrnztvS)\n\n[![Watch Demo](https://img.shields.io/badge/▶%20Watch%20Demo-Click%20to%20Play-red?style=for-the-badge\u0026logo=asciinema)](https://asciinema.org/a/Z0Qp6keIpvrnztvS)\n\n---\n\n## What Does This Do?\n\nWhen you photograph artwork, you get the frame, wall, shadows, etc. This tool:\n\n1. **Detects the artwork** in your photo using AI vision\n2. **Finds the exact edges** of the art piece\n3. **Crops perfectly** - no extra background\n4. **Generates detail shots** - corners, signature, texture\n5. **Validates quality** - checks for blur, lighting, angle issues\n\n**Before:** Photo of framed art on a wall\n**After:** Clean, perfectly cropped artwork image + 8 detail shots\n\n---\n\n## Quick Start\n\n```bash\n# Clone the repo\ngit clone https://github.com/jjshay/art-crop-system.git\ncd art-crop-system\n\n# Install dependencies\npip install -r requirements.txt\n\n# Run the interactive demo\npython demo.py\n\n# Or run the visual showcase\npython showcase.py\n\n# Crop sample wall photo\npython ai_art_crop_system.py examples/wall_photo.jpg --output output/\n```\n\n### Sample Files\n- `examples/wall_photo.jpg` - Photo of artwork on wall (ready to crop!)\n- `examples/crop_config.json` - Configuration options\n- `sample_output/crop_report.json` - Example detection results\n\n---\n\n## Architecture\n\n```mermaid\nflowchart TB\n    subgraph Input\n        A[Wall Photo] --\u003e B[Image Loader]\n    end\n\n    subgraph Tier1[\"Tier 1: Fast Processing\"]\n        B --\u003e C[rembg Background Removal]\n        C --\u003e D{Clean Result?}\n    end\n\n    subgraph Tier2[\"Tier 2: Multi-AI Analysis\"]\n        D --\u003e|No| E1[GPT-4 Vision]\n        D --\u003e|No| E2[Claude Vision]\n        D --\u003e|No| E3[Gemini Vision]\n        D --\u003e|No| E4[Grok Vision]\n        E1 \u0026 E2 \u0026 E3 \u0026 E4 --\u003e F[Boundary Consensus]\n    end\n\n    subgraph Tier3[\"Tier 3: CV Fallback\"]\n        F --\u003e G{Consensus?}\n        G --\u003e|No| H[OpenCV Edge Detection]\n    end\n\n    subgraph Output\n        D --\u003e|Yes| I[Crop Engine]\n        G --\u003e|Yes| I\n        H --\u003e I\n        I --\u003e J[Detail Shot Generator]\n        J --\u003e K[Quality Validator]\n        K --\u003e L[Final Outputs]\n    end\n\n    style A fill:#e1f5fe\n    style L fill:#c8e6c9\n    style C fill:#fff9c4\n    style F fill:#f3e5f5\n```\n\n## How It Works\n\n```\nOriginal Photo (art on wall)\n         │\n         ▼\n┌─────────────────────────────────────────┐\n│        TIER 1: rembg (Fast)             │\n│  Background removal for initial crop     │\n└─────────────────────────────────────────┘\n         │\n         ▼\n┌─────────────────────────────────────────┐\n│     TIER 2: Multi-AI Vision Analysis     │\n│  GPT-4V + Claude + Gemini + Grok        │\n│  Consensus on exact artwork boundaries   │\n└─────────────────────────────────────────┘\n         │\n         ▼\n┌─────────────────────────────────────────┐\n│      TIER 3: CV Edge Detection          │\n│  OpenCV fallback for edge cases         │\n└─────────────────────────────────────────┘\n         │\n         ▼\n┌─────────────────────────────────────────┐\n│         TIER 4: Quality Check           │\n│  Blur detection, lighting, angle        │\n└─────────────────────────────────────────┘\n         │\n         ▼\n  Perfect Crop + Detail Shots\n```\n\n---\n\n## Output: 8 Detail Shots\n\nFor each artwork, the system generates:\n\n| Shot | Shows |\n|------|-------|\n| Full | Complete artwork |\n| Top-Left | Upper left corner detail |\n| Top-Right | Upper right corner detail |\n| Bottom-Left | Lower left corner + signature area |\n| Bottom-Right | Lower right corner |\n| Center | Central detail/texture |\n| Signature | Detected signature closeup |\n| Edition | Edition number if present |\n\n---\n\n## Features\n\n- **Multi-AI Consensus**: Uses 4 AI models to agree on crop boundaries\n- **Signature Detection**: Automatically finds and highlights artist signatures\n- **Edition Number Detection**: Locates \"23/100\" style edition markings\n- **Quality Scoring**: Rates image quality (lighting, focus, angle)\n- **Batch Processing**: Process entire folders automatically\n- **Google Drive Integration**: Upload results directly to Drive\n\n---\n\n## Setup\n\n### Basic (No AI)\n```bash\npip install -r requirements.txt\npython demo.py  # Uses rembg only\n```\n\n### Full AI Mode\n```bash\n# Copy and configure .env\ncp .env.example .env\nnano .env\n\n# Add your API keys\nOPENAI_API_KEY=sk-...\nANTHROPIC_API_KEY=sk-ant-...\nGOOGLE_API_KEY=AIza...\n```\n\n---\n\n## Files\n\n| File | Purpose |\n|------|---------|\n| `ai_art_crop_system.py` | Main multi-tier cropping system |\n| `gdrive_gallery_quality_crops.py` | Google Drive integration |\n| `crop_quality_validator.py` | Image quality assessment |\n| `art_crop_pipeline_final.py` | Production pipeline |\n| `demo.py` | Demo without API keys |\n\n---\n\n## License\n\nMIT - Use freely for your artwork processing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjshay%2Fart-crop-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjshay%2Fart-crop-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjshay%2Fart-crop-system/lists"}