Skip to content

Caire

Go library and command-line tool that resizes images by removing low-importance seams, keeping key content int

Stars
10.9k
Forks
402
Licence
MIT
Language
Go
Last update
7 days ago
Type
CLI

What it is

Caire is an open-source tool for resizing images in a content-aware way. Instead of simply cropping or stretching a picture, it finds connected paths of low-energy pixels (seams) that are least noticeable and removes or adds them, so the main subjects keep their shape. It is written in Go and can be used as a library, a command-line program, or with a preview window.

  • Shrink a landscape photo to a narrower width while keeping people in the frame unchanged
  • Convert a set of photos to square dimensions with the -square option
  • Resize a whole directory of images concurrently by pointing -in and -out at folders
  • Pipe an image from curl or stdin through caire and write the result to stdout

Great for

  • Developers who need to resize images inside a Go program
  • Designers who want to shrink photos without distorting the main subject
  • People batch-resizing a folder of images from the command line
  • Users who want to keep faces from being squashed, using the face detection option

Not ideal for

  • People who only need quick, simple resizing; standard tools are faster and easier for that
  • Users who need a graphical editor, since the README describes the GUI only as a progress/preview window
  • Those needing very large images processed quickly, as the README does not give performance figures
Step-by-step guide: how to use CaireInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Go

    Install the caire command with Go

    go install github.com/esimov/caire/cmd/caire@latest

    Install via Homebrew (macOS)

    brew install caire
  2. 2

    Run it

    • Install Go and make sure $GOPATH/bin is on your PATH.
    • Run the install command for the caire tool.
    • Resize an image with: caire -in input.jpg -out output.jpg
    • Add -width and -height values to set the new size; use -perc=1 to treat them as percentages.
  3. 3

    Get the most out of it

    • Use -face=1 to avoid distorting detected faces during resizing
    • Use -preview=false to turn off the GUI window when running scripts
    • Use -mask and -rmask with a mask image to protect or remove areas
    • Use stdin and stdout with - to chain caire into other command-line pipelines
    • Point -in and -out at folders to process many images concurrently

Downloads

Strengths

  • Preserves important content such as faces when resizing, using seam carving plus optional face detection
  • Offers flexible command-line options for percentage, square, proportional, and mask-based resizing
  • Released under the MIT license with a large community following

Trade-offs

  • The README does not document performance or memory use, so speed on large images is unknown
  • Requires Go for the standard install method; Homebrew and release binaries are also mentioned but not detailed
  • Some features like the GUI need extra system dependencies per the Gio project

How it compares

ProjectStarsTypeLevelUpdatedBest for
caire (this)10.9kCLIintermediate7 days agoDevelopers who need to resize images inside a Go program
ai-engineering-from-scratch76.3kLearning resourceintermediate4 days agoStudents who want to understand how LLMs, retrieval, and agents work internally
AI-For-Beginners70.5kLearning resourcebeginner13 days agoBeginners who want a structured, self-paced introduction to AI
face_recognition56.9kLibraryintermediate4 months agoPython developers prototyping photo sorting or face matching
supervision51.5kLibraryintermediate4 days agoPython developers building apps on top of object detection or segmentation models
albumentations15.3kLibrarybeginner1.4 years agoMachine learning engineers training image classification or segmentation models with limited data

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.