I rebuilt my 9-year selfie time-lapse with Genie Code

It took 3 hours instead of 3 days.

Posted by Patrick Ruoff on October 18, 2026 · 9 mins read

Summary

  • In 2024 I built a time-lapse of 229 selfies by hand with Python and OpenCV. It took me 3 days of trial and error and needed some real computer-vision knowledge.
  • Today, just two years later, I rebuilt it from 500 photos with Databricks Genie Code. I described what I wanted in plain language and didn't write a single line of code myself.
  • The result was ready in 3 hours after only a handful of prompts, while the largest part was manual image selection from my phone's photo library. The code aligns every photo on the eyes instead of the whole face and rotates it so the eyes are always level, so the face no longer jumps or tilts between frames, and it shows fewer dropped frames due to failed recognition.
  • So I got a better result in less time, and shifted my focus from technical expertise to design and feel.

What is the project about?

Since 2017, I've been taking a selfie every now and then. In 2024, I turned 229 of them into a 36-second time-lapse (original post). My approach was simple: OpenCV detected the box around the face in each photo, and I cropped every photo with a fixed margin around that box, then put them all together into a video.

How did I do it this time?

  • The photos sat in a Unity Catalog Volume.
  • I worked on Databricks ML compute with a single node (given the small volume).
  • My one rule: I describe the result I want, and I never write or edit code myself. I only accept, reject or redirect. Genie Code takes the technical decisions.

How did the conversation with Genie Code go?

It went really smoothly. Genie Code planned the steps, picked the libraries, ran the code and showed me the preview frames I'd asked for. While it worked through the 500 photos, I could step away and come back to finished results.

From there I ran a few short iterations, all of them about how the result looked, not technical details:

  • Keep more of each photo. Aligning faces leaves uneven edges that get cropped away, so I asked Genie Code to keep as much of the remaining image area as possible. It worked: there's no padding in the result.
  • Add an intro and outro. I wanted a short text intro and the last photo to stay on screen longer, so the time-lapse starts and ends with a short pause.

My focus stayed on design and feel. Genie Code handled the technical side.

The generated notebook with Genie Code on the right. There's a lot of code generated that I didn't need to review in this context but focus solely on the results.

Why does aligning on the eyes work better than aligning on the face?

My 2024 version used OpenCV's Haar cascade face detector, which only returns a box around the face. Genie Code chose MediaPipe Face Landmarker instead. It finds 468 facial landmarks, averages 12 points per eye to get each eye's center, and then rotates, scales and shifts every photo so both eyes land on the same fixed coordinates. That gives three improvements:

  • Rotation correction: the eyes are always level, even when I tilted my head.
  • Precise centering: frames are centered on the midpoint between the eyes, not on a face box that shifts with jaw and hair.
  • Consistent scale: the distance between the eyes is fixed (600 px in the reference frame), so the face is the same size no matter how close I held the camera.

So what's the result like?

I love it! The new version has more than twice as many photos as the 2024 one (500 instead of 229), and the extra years show. Over time I got more adventurous with glasses, hats and other headwear, and my look kept changing. Even so, Genie Code (and I!) kept the face in place from frame to frame, so the changes are easy to follow instead of distracting.

Time-lapse of 500 aligned selfies from 2017 to 2026: the face stays in the same position while glasses, headwear and hairstyle change.

How did the 2026 version compare with the 2024 one?

2024 (by hand)2026 (Genie Code)
Time to the finished video~3 days~3 hours
Lines of code I wrote5000
Promptsn/a6 prompts
Photos processed229500
Aligned onFace box (OpenCV Haar cascade)Eye centers (MediaPipe Face Landmarker)
Can someone else run it?Only with my local setupAnyone with access to the notebook

I'm sure I could turn this into an app in no time with Genie App Builder (currently in Beta): upload a folder of photos, get the time-lapse back. Once you have such tools available, you can really get creative with what you want to build. What a time to be alive!

What does this say about AI coworkers?

Genie Code didn't replace judgment. It replaced setup and boilerplate. I still decided what "aligned" meant, spotted which frames were wrong and said when the result was good enough. It's a super coworker which makes a project like this (and more elaborate ones) quick to take on.

Key takeaways

  • Databricks Genie Code cut the work from about 3 days to about 3 hours while improving the result.
  • Writing clear prompts that described the result, not the technical details, did most of my work.
  • Steering still matters: follow-up prompts were corrections of my requirements.

FAQ

Do I need to know Python to use Databricks Genie Code?
No. I gave plain-language instructions and reviewed the results. Knowing what a good result looks like helps more than knowing the code. In fact, for this project I didn't read the code at all and just checked the outputs.

Can Databricks Genie Code do image processing?
Yes. In this project it used MediaPipe Face Landmarker to find the eyes in 500 photos, aligned and cropped them, and rendered a GIF and an MP4.

What is the difference between Genie Code and Genie One?
Today, Genie Code is for technical work such as code, notebooks and pipelines. Genie One is for business users who ask questions about governed data in plain language. (Genie docs)

Why run a small personal project on Databricks instead of a laptop?
Mainly because I wanted to build it with Databricks Genie Code, which is built for exactly this kind of data science and machine learning work: exploring files, choosing models, running code on ML compute and checking the results. On top of that, there's no setup, the photos stay in governed storage, and the pipeline can be rerun or shared. And everybody can try it with Databricks Free Edition!

Disclosure: I work at Databricks. Opinions here are my own.