Three ways to let AI cull a shoot
Culling is the boring part of photography. Let AI throw out the soft, blinking and badly exposed frames, and keep the fun part for yourself. Copy, paste, done.
What it does
Each method gives every photo a score from 0 to 100, then applies one rule:
| Score | What happens |
|---|---|
| Below 40 | Rejected |
| 40 to 59 | 2 stars |
| 60 and up | Left alone |
The good frames stay unrated, so the stars are still yours to give. Your photo files are never changed. Ratings and rejects are saved where LightPhotos keeps them, the same as if you set them in the app.
Before you start
- Download LightPhotos, or update
it. You need version 0.1.39 or later. It includes
lightphotos-mcp, the program that lets scripts and AI work with your photos. - Make a copy of a shoot to try it on.
- Close that folder in LightPhotos. The scripts can’t change a folder that the app has open.
On a Mac: the app score
LightPhotos scores each photo itself, on your Mac. It checks focus, clipped highlights, darkness, noise and closed eyes, and uses Apple’s on-device model of what looks good. This is the same score as the Score All button.
1. Open Terminal. Paste all of this and press
Return. It saves the script as cull.py in your home
folder.
cat > ~/cull.py <<'EOF'
#!/usr/bin/env python3
# Cull a folder with LightPhotos's own score (macOS). Nothing leaves your Mac.
# Below 40: rejected. 40 to 59: 2 stars. 60 and up: left alone.
import json, subprocess, sys
MCP = "/Applications/LightPhotos.app/Contents/MacOS/lightphotos-mcp"
server = subprocess.Popen([MCP, "--folder", sys.argv[1]],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True)
last_id = 0
def send(message):
server.stdin.write(json.dumps(message) + "\n")
server.stdin.flush()
def request(method, params):
global last_id
last_id += 1
send({"jsonrpc": "2.0", "id": last_id, "method": method, "params": params})
line = server.stdout.readline()
if not line:
sys.exit("lightphotos-mcp stopped; its error is above")
return json.loads(line)["result"]
def run(command, params):
result = request("tools/call", {"name": "run_command",
"arguments": {"id": command, "params": params}})
if result.get("isError"):
sys.exit(result["content"][0]["text"])
def photos():
result = request("tools/call", {"name": "get_state", "arguments": {}})
return json.loads(result["content"][0]["text"])["photos"]
def current_score(photo):
score = photo.get("score")
return score["value"] if score and not score["stale"] else None
request("initialize", {"protocolVersion": "2025-06-18", "capabilities": {},
"clientInfo": {"name": "cull", "version": "1"}})
send({"jsonrpc": "2.0", "method": "notifications/initialized"})
todo = [p["name"] for p in photos() if p["flag"] != "reject" and current_score(p) is None]
for start in range(0, len(todo), 10):
run("photo.score", {"photos": todo[start:start + 10]})
print(f"scored {min(start + 10, len(todo))} of {len(todo)}", flush=True)
rejects, two_stars = [], []
for p in photos():
score = current_score(p)
if p["flag"] == "reject" or score is None:
continue
if score < 40:
rejects.append(p["name"])
elif score < 60:
two_stars.append(p["name"])
if rejects:
run("photo.flag", {"flag": "reject", "photos": rejects})
if two_stars:
run("photo.rate", {"stars": 2, "photos": two_stars})
print(f"{len(rejects)} rejected, {len(two_stars)} given 2 stars, the rest left alone")
EOF 2. Run it on your folder. Change
~/Pictures/my-shoot to your folder, or type
python3 ~/cull.py and drag the folder into Terminal.
python3 ~/cull.py ~/Pictures/my-shoot
If macOS asks to install the command line developer tools, click
Install, then run the command again. That gives you
python3.
Scores are saved, so running it again on the same folder is instant.
With Claude Code
Claude looks at each photo, scores it, and sets the ratings itself. You don’t need a script, only Claude Code.
Every photo Claude looks at is uploaded to Anthropic. Don’t use this on photos of people who haven’t agreed to that. It also uses your Claude plan.
Paste this into Terminal. Change FOLDER on the first
line to your folder.
FOLDER=~/Pictures/my-shoot
MCP=/Applications/LightPhotos.app/Contents/MacOS/lightphotos-mcp
claude -p 'Cull the photos in the LightPhotos folder with the lightphotos MCP tools.
1. Call get_state to list the photos. Leave any photo already flagged reject alone.
2. Render each of the rest with max_size 1024, a few consecutive frames at a
time, and give each a score from 0 to 100 for how likely a photographer is
to keep it. Be critical: missed focus on the nearer eye of the subject,
closed eyes, a blurred or awkward moment, and bad exposure score below 40;
a usable frame 40 to 59; a good one 60 or more. Compare neighbouring frames.
3. Apply this table with as few run_command calls as you can, passing the
photo names in params.photos:
below 40: photo.flag with flag reject
40 to 59: photo.rate with stars 2
60 and up: leave it as it is
4. Report how many frames got each result. Do not change anything else.' \
--allowedTools mcp__lightphotos \
--mcp-config '{"mcpServers": {"lightphotos": {"command": "'"$MCP"'", "args": ["--folder", "'"$FOLDER"'"]}}}'
On Linux or Windows, set MCP to the
lightphotos-mcp file in the folder where you unpacked
LightPhotos. To cull differently, change the prompt in plain
English.
Then: review
Open the folder in LightPhotos and hide the rejects. Look quickly at the 2-star frames, then pick your favorites from the rest. That is the fun part.
Advanced: a model on your own computer
Use this if you are on Linux or Windows, where the app score
isn’t available, and your photos must not leave your computer.
A vision model, qwen3-vl:32b-instruct, runs in
Ollama on your own computer and
scores four frames at a time.
Know the costs first:
- Slow. 28 minutes for 85 frames, against 16 seconds for the app score.
- Heavy. A 21 GB download, and it needs 32 GB of memory or more.
- Too generous. It scored 80 of my 85 frames 60 or more, so it flagged almost nothing.
1. Install Ollama and download the model. On Linux
and Windows, install Ollama from
ollama.com/download instead
of with brew.
brew install ollama ollama pull qwen3-vl:32b-instruct
2. Start Ollama with its cloud features off, on its
own port. Leave this window open. Its log says Ollama cloud
disabled: true.
OLLAMA_HOST=127.0.0.1:11435 OLLAMA_NO_CLOUD=1 ollama serve
In Windows PowerShell:
$env:OLLAMA_HOST="127.0.0.1:11435"; $env:OLLAMA_NO_CLOUD="1"; ollama serve
3. In a new Terminal window, save the script. On
Linux or Windows, first change MCP near the top to the
lightphotos-mcp file in the folder where you unpacked
LightPhotos.
cat > ~/cull-local.py <<'EOF'
#!/usr/bin/env python3
# Cull a folder with a vision model running in Ollama on this computer.
# Below 40: rejected. 40 to 59: 2 stars. 60 and up: left alone.
import json, subprocess, sys, urllib.request
# macOS. On Linux or Windows, use the lightphotos-mcp next to the lightphotos
# you unpacked, for example "C:/LightPhotos/lightphotos-mcp.exe".
MCP = "/Applications/LightPhotos.app/Contents/MacOS/lightphotos-mcp"
OLLAMA = "http://127.0.0.1:11435"
MODEL = "qwen3-vl:32b-instruct"
SHOOT = "portrait shoot" # what the folder is, for the model
PROMPT = (
"You are helping a photographer cull a {shoot}. These {n} images are "
"consecutive frames, in this order: {names}. Give each a score from 0 to "
"100 for how likely the photographer is to keep it, using the names "
"exactly as given. Be critical: missed focus on the subject's nearer eye, "
"closed eyes, a blurred or awkward moment, and bad exposure score below "
"40; a usable frame scores 40 to 59; a good one 60 or more. Compare the "
"frames with each other."
)
ANSWER = {"type": "object", "required": ["frames"], "properties": {"frames": {
"type": "array", "items": {"type": "object", "required": ["name", "score"],
"properties": {"name": {"type": "string"},
"score": {"type": "integer", "minimum": 0, "maximum": 100}}}}}}
server = subprocess.Popen([MCP, "--folder", sys.argv[1]],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True)
last_id = 0
def send(message):
server.stdin.write(json.dumps(message) + "\n")
server.stdin.flush()
def tool(name, arguments):
global last_id
last_id += 1
send({"jsonrpc": "2.0", "id": last_id, "method": "tools/call",
"params": {"name": name, "arguments": arguments}})
line = server.stdout.readline()
if not line:
sys.exit("lightphotos-mcp stopped; its error is above")
result = json.loads(line)["result"]
if result.get("isError"):
sys.exit(result["content"][0]["text"])
return result["content"]
def render(name):
return [c["data"] for c in tool("render", {"photo": name, "max_size": 1024})
if c["type"] == "image"][0]
def ask_model(names):
prompt = PROMPT.format(shoot=SHOOT, n=len(names), names=", ".join(names))
body = {"model": MODEL, "stream": False, "format": ANSWER,
"options": {"num_ctx": 32768, "temperature": 0},
"messages": [{"role": "user", "content": prompt,
"images": [render(n) for n in names]}]}
request = urllib.request.Request(f"{OLLAMA}/api/chat", data=json.dumps(body).encode(),
headers={"Content-Type": "application/json"})
with urllib.request.urlopen(request, timeout=900) as reply:
frames = json.loads(json.loads(reply.read())["message"]["content"])["frames"]
return {f["name"]: f["score"] for f in frames if f["name"] in names}
send({"jsonrpc": "2.0", "id": 0, "method": "initialize",
"params": {"protocolVersion": "2025-06-18", "capabilities": {},
"clientInfo": {"name": "cull", "version": "1"}}})
server.stdout.readline()
send({"jsonrpc": "2.0", "method": "notifications/initialized"})
state = json.loads(tool("get_state", {})[0]["text"])
names = [p["name"] for p in state["photos"] if p["flag"] != "reject"]
scores = {}
for start in range(0, len(names), 4):
group = names[start:start + 4]
scores.update(ask_model(group))
for name in group:
if name not in scores: # the model skipped it, so ask about it alone
scores.update(ask_model([name]))
print(f"scored {min(start + 4, len(names))} of {len(names)}", flush=True)
rejects = [n for n in names if n in scores and scores[n] < 40]
two_stars = [n for n in names if n in scores and 40 <= scores[n] < 60]
if rejects:
tool("run_command", {"id": "photo.flag", "params": {"flag": "reject", "photos": rejects}})
if two_stars:
tool("run_command", {"id": "photo.rate", "params": {"stars": 2, "photos": two_stars}})
print(f"{len(rejects)} rejected, {len(two_stars)} given 2 stars, the rest left alone")
EOF 4. Run it on your folder:
python3 ~/cull-local.py ~/Pictures/my-shoot
How they compare
I ran each one on a fresh copy of 85 RAW files from one portrait session. The photos stay on my Mac, so I don’t show them here. I did not run Claude on this shoot, because it would upload the photos.
| App score | Claude Code | Local model | |
|---|---|---|---|
| Runs on | macOS | Anywhere | macOS, Linux, Windows |
| Photos leave your computer | No | Yes | No |
| Setup | Paste a script | Paste a command | Ollama and a 21 GB model |
| Time, 85 RAW files | 16 s | Not run | 28 min |
| Rejected | 3 | — | 2 |
| 2 stars | 25 | — | 3 |
| Left alone | 57 | — | 80 |
I use the app score. It is a hundred times faster than the local model, and it flagged 28 frames for a second look, where the model flagged 5. Only one frame was rejected by both.
Letting AI make the whole call did not work. My first version let the local model reject and rate every frame on its own judgment. I ran it twice with small changes, and it agreed with itself on only 45 of 83 frames. A plain score and a fixed rule are boring, and boring is what you want for this part.
None of them picks the best moment. They catch blur, blinks and bad exposure. Choosing between six frames of the same pose is still your job, and it is the best part of culling anyway.