Memories
Memories show curated sets of your own past photos on the Home page, like “3 years ago today” or “Trip to Rome”. Gallery picks the photos that you would show to a friend. It leaves out screenshots, receipts, documents, near-duplicate shots, and photos that are blurry or too dark.
Memories need no machine learning. Smart search, face recognition, and text search make the selection better (see “What each feature adds”). Everything runs on your server. No photo or position leaves it. The only download is a list of city names (see “Place names”).
Memories are on by default. An owner can turn them off with the memories feature flag in Admin → Features. Memories also need the albums flag.
What you see#
Memories are a row of cards at the top of Home on the web, the mobile app, and the TV app. Select a card to open a full-screen story. Each photo shows for 5 seconds, and the next memory starts after the last photo.
| Kind | Example | When it shows |
|---|---|---|
| On this day | “3 years ago”, “This week, 5 years ago” | On the day. One memory for each earlier year that has enough good photos. A year with too few photos on that exact day uses the 3 days either side, and the title says “This week”. |
| Trip | “Trip to Rome” | For about two weeks after you come home, and for a week around each anniversary of the trip. |
| Person | “Alice in 2023”, “Alice over the years” | One at a time, for a week each. Gallery rotates through the people you named. Needs face recognition. |
| Best of year | “Best of 2025” | In January. |
| Last week | “Last week” | In the week after. It uses the Monday to Sunday week before the current week. |
A memory that you have seen goes to the end of the row. A memory never changes when you reload the page.
Which photos are used#
- Photos and Live Photos only. Videos are not used. A Live Photo shows as its still image.
- Albums that you manage. A memory uses the albums where you have the album manager role (the albums that you made, and the albums where someone added you as a manager). It does not use albums that are only shared with you, public albums, or albums where you can only view, contribute, or edit. A server-wide admin or owner role does not count, so an admin does not see memories from the photos of other people.
- Hidden albums are skipped. If you hid an album, its photos are left out.
- Memories are private to you. Two people who manage the same album see their own memories of it. If you lose the manager role on an album, its photos leave your memories at once.
A memory needs at least 4 good photos (an admin can change this) and shows at most 20. A day, week, or trip with fewer good photos makes no memory.
Why a photo is left out#
Gallery checks every photo with rules. Some rules drop a photo alone. Others add to a junk score, and a photo is left out when the score reaches 0.8.
| Rule | What it finds |
|---|---|
screenshot_exif, screenshot_name |
A screenshot or a screen recording: the file says so in its tags, its name (Screenshot_*, Screen Shot *, RPReplay_Final*), or its folder (Screenshots). |
screen_sized |
A PNG or HEIC file with no camera and the exact size of a phone, tablet, or monitor screen. |
small |
The long side is under 640 pixels (for example, an image saved from a chat). |
zero_shot |
Smart search sees a screenshot, receipt, document, whiteboard, monitor, or QR code. |
text_heavy |
Text search found 10 or more lines of text, as in a document. |
blurry, dark |
The photo is out of focus or too dark. These rules add to the score but do not drop a photo alone. A photo that is blurry only because of its background is kept when a named person’s face in it is sharp. |
no_date |
The photo has no capture date in its tags, so “N years ago” would be false. Gallery leaves the photo out of memories that depend on the date. |
The admin page shows how many photos match each rule.
After the junk check, Gallery ranks the photos by quality (the look of the photo, sharpness, exposure, named people, and your favorites and 4 or 5 star ratings). It skips a photo that is almost the same as a better one, or that comes from the same camera within 2 seconds. Then it shows the photos in time order.
Control your memories#
- Hide a memory. Use the menu in the story viewer on the web or the mobile app. The TV app only shows memories. A hidden memory never comes back, also not on its anniversary.
- Remove one photo from a memory.
- Never show in memories. Use this on a photo to leave it out of every memory.
- People to leave out. In Settings → Memories, choose people whose photos never appear. A person that you hid in People is left out too. This needs face recognition.
- Turn off the Home row. In Settings → Memories, turn off the switch. Gallery also stops making new memories for you.
What each feature adds#
| Feature | What it adds |
|---|---|
| Nothing | File names, tags, picture size, sharpness, and exposure. Memories work with only this. |
Smart search (smart_search) |
Finds screenshots and documents from the picture, scores how good a photo looks, and removes near-duplicates. This is the biggest improvement. |
Face recognition (face_recognition) |
Ranks photos of named people higher, picks a cover with a person, keeps sharp faces, and makes the person memories. |
Text search (ocr_search) |
Finds documents and photos that are mostly text. |
Admin → Memories shows which of these are active.
Cost#
Memories add little work. A new photo gets one small check (about 6 ms) after its thumbnail exists. Older photos are checked when a memory needs them, and the result is kept. The scores use the vectors that smart search already makes, so memories add no model.
Place names#
Trip titles use the nearest large city of the photos, for example “Trip to Rome”. Gallery finds it offline from the GeoNames list of cities with more than 15000 people. Place data is © GeoNames, license CC BY 4.0.
- Download. The server downloads the list (3.4 MB) in the background when it starts with memories on, and when an owner turns memories on. Until it finishes, trips use a date title such as “Trip, May 2023”. Nothing waits for it.
- Updates. The server refreshes the list each month. It uses the new list only when the file opens, every row parses, and the number of rows is within 20% of the old list. It keeps the old list on any failure.
- Existing titles stay. A refresh never changes the title of a memory that exists.
- English names only.
- No internet. Put the file
cities15000.txtfrom the GeoNamescities15000.zipin<BasePath>/data/models/geonames/. Gallery loads it as is. To use a mirror, set the environment variableGALLERY_GEONAMES_URLto its URL. Set it tooffto turn the download off. Trips then use the date title.
For admins#
Admin → Memories shows how many photos are checked, the active features, the number of photos that each rule dropped, the job queue, and the state of the place names.
- Settings. The fewest and most photos in a memory, the junk threshold (default 0.8), and the duplicate threshold (default 0.95). A change applies to memories made afterwards. It does not rewrite existing memories.
- Curate missing photos. Checks every photo that has no result yet. Memories do not need this, because Gallery checks old photos when it needs them. Use it to fill the statistics.
- Build memories now. Starts the daily pass at once. Without it, the server runs the pass 2 minutes after it starts, and then once a day. The On this day memories form when a user opens Home, not in this pass.
- Delete all memories data. Deletes every memory and every check result. Each user’s settings and never-show list stay. The action is written to the audit log (
memories_data_delete). The memories form again when the pass runs and when a user opens Home.
A trip is a run of 2 to 30 days with photos more than 80 km from home. Home is the place with photos on the most different days. A trip becomes a memory 3 days after the last photo. Photos need a GPS position to start a trip, but photos with no position in the same days are included. The trip needs at least 4 good photos.
Limits#
- A photo’s day is the UTC day of its capture time. A photo taken near midnight can land on the day before or after.
- Titles are in English.
- No music, no sharing, no notifications, and no videos.
- The scores are tuned on synthetic screenshots and documents and on stock photos. Real libraries can differ. Change the thresholds in Admin → Memories if too many or too few photos are dropped.