Skip to content
eitherwayPublic

About

Cull / Clean up your near-identical photos easily from Immich or a folder with this simple python app

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation


Cullibri Logo
Cullibri

Did you ever need to quickly sort through about 3000 pictures from your last vacation? Yes? Then you are like me and this tool is probably for you.

Setup • How does the Scoring work • Known Limitations • Use Without Immich • Citations

This tool makes it very easy to delete duplicate or near-identical photos. Especially if you are like me who takes about 10 pictures that look all almost the same.

No internet connection needed. All models are run 100% locally. This was important to me, because I don't want to send all my pictures to OpenAI or Anthropic.

This project was developed and tested on a Mac. However, it should be cross-platform compatible. uv should install the right package for your system. See vlm.py.

Immich is my picture database of choice, so it uses their API to get the pictures, view and delete them. It can however also be used without Immich.

Cullibri Screenshot

Setup

  1. In Immich, open Account Settings → API Keys. Create a key with the permissions asset.read, asset.view and asset.delete. Add library.read (admin account only) if you want to choose between your external libraries in the app; without it, only the path_prefix from the config is offered.

  2. Move config.example.toml to config.toml and paste api key into there.

  3. Start it:

    uv run python -m cullibri
  4. Open http://127.0.0.1:8765 and you are good to go.

The first start downloads the model weights (about 7 GB in total, most of it the vision model, which only loads when you first press "Ask vision model"). The face model (4 MB) comes from Google's MediaPipe storage and is checked against a fixed checksum. It is downloaded into models/.

How the decision process looks like:

  • Grouping: Photos taken within 2 minutes of each other whose DINOv2 embeddings are at least 0.85 alike (see grouping.py).
  • Sharpness: Tenengrad gradient energy on a lightly smoothed image, taken from the sharpest tiles. Unlike Laplacian variance it is barely affected by sensor noise. When every photo in a group has a face, sharpness is measured on the largest face.
    • Why Sharpness? If you take a lot of images in a row or a burst, some of them are usually blurry. You typically don't want them in your image database. Chang et al 1 also comes to the conclusion that sharpness matters most for people if they evaluate near identical shots.
  • Aesthics: This step was removed, because I didn't find a suitable model.
    • In the beginning I used the CLIP+MLP Aesthetic Score Predictor from Schuhmann 2, but that score is not very good for my use case. It's based on CLIP and thus far better on evaluating between different pictures not on a set of very similar pictures.
    • I also tried out FGAesQ (based on Yang et al 3), but despite the impressive demo in the paper, the results were very meh in my testing.
  • Vision model (optional): Qwen3-VL compares the photos and names its own pick with reasons. The specific variant depends on your machine.

End decision: Entirely done by you. You have the final say, nothing gets deleted without you.

Analysis results are cached in data/cache.sqlite, so re-scanning a range is fast.

Known limitations

I currently disagree with the scoring of the vision and the aesthetics model a lot, but they help me make a decision. I would however not currently rely on their decision-making process. I will try to improve that in the future.

Use without Immich

uv run python -m cullibri --folder testdata/photos

In this mode "trash" moves files into a _trash subfolder.

Use of AI

This project was a "quick" sidequest and I only wanted a tool to sort through a huge amount of vacation pictures. It was heavily vibe coded by me with Claude. This README is 100% human and all code was reviewed by me.

Citations

Footnotes

  1. H. Chang, F. Yu, J. Wang, D. Ashley, and A. Finkelstein, “Automatic triage for a photo series,” ACM Trans. Graph., vol. 35, no. 4, p. 148:1-148:10, Jul. 2016, doi: 10.1145/2897824.2925908. ↩

  2. C. Schuhmann, “christophschuhmann/improved-aesthetic-predictor: CLIP+MLP Aesthetic Score Predictor.” Accessed: Nov. 11, 2026. [Online]. Available: https://github.com/christophschuhmann/improved-aesthetic-predictor ↩

  3. Z. Yang et al., “Fine-grained Image Aesthetic Assessment: Learning Discriminative Scores from Relative Ranks,” Mar. 04, 2026, arXiv: arXiv:2603.03907. doi: 10.48550/arXiv.2603.03907. ↩

About

Cull / Clean up your near-identical photos easily from Immich or a folder with this simple python app

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages