LifeLens

Started:

LifeLens is a chatbot that connects to your Immich self-hosted photo library and lets you query it using natural language. It extracts contextual data from your photos — people, places, dates — and pipes that into a conversational interface.

This project was built in 24 hours as part of TartanHacks 2024. It was inspired by Apple’s Journal App and Tab’s AI companion. The core idea: people take a huge number of photos every day, so a personal photo library is a rich source of contextual data about someone’s life. Immich’s flexible open-source API makes it straightforward to tap into that data.

Example prompts it can handle:

  • Who was at [Person]’s birthday party last year?
  • Who did I meet on Jan 26th? Show me the photo.
  • When did I last hang out with [Person]? Who else was there?
  • Where and when did I last see a cow?
  • When did I last visit Philadelphia?
  • Show me 2 random photos.
  • How many photos of [Person] do I have?

No images are sent to OpenAI, making this both cost-effective and privacy-conscious.

Technical Details

Built with Python and Streamlit (streamlit run main_streamlit.py). Uses the Immich API to search and retrieve photos, then feeds metadata as context into an LLM. Currently uses GPT-3.5; upgrading to GPT-4-turbo would improve consistency.

Future improvements include a captioning endpoint so you could prompt “Write a journal entry for what I did today” — using that day’s images via CLIP embeddings or a separate captioning model.

GitHub