Skip to content

fal-ai-community/smart-crop

Repository files navigation

Smart Crop

fal.ai

AI-powered image cropping that keeps the important parts in focus
Powered by fal.ai


Overview

Smart Crop uses AI to detect the focal point of any image and automatically crops it to your desired aspect ratio while keeping the important content centered.

How it Works

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  Upload Image   │────▶│     fal.ai      │────▶│   Moondream3    │────▶│  Coordinates    │
└─────────────────┘     └─────────────────┘     │   Point API     │     │   (x, y)        │
                                                └─────────────────┘     └────────┬────────┘
                                                                                 │
                                                                                 ▼
                                                                        ┌─────────────────┐
                                                                        │  Crop Calc +    │
                                                                        │  Output Image   │
                                                                        └─────────────────┘

Model

Model Purpose
fal-ai/moondream3-preview/point Focal point detection

Setup

npm install
npm run dev

Get your API key at fal.ai/dashboard/keys and enter it when prompted.

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors