‹ BackHN Continuity

Thread

Show HN: AI search for every photo and every frame of video on macOS

150 points · 67 comments · allenleee

Loading the complete thread in the background. This saved snapshot is available now. Refresh

  1. stephenitis · · focus · HN ↗
    I like the entire premise, the one thing stopping me from trying this is not knowing the time scales that I will need to set my computer aside for the processing of large folders of video frames, or my photos library's videos, some 12,000 videos
  2. hn3ufz62f7 · · focus · HN ↗
    Having built something similar with CLIP on an M1, frame sampling rate is the whole ballgame. One frame a second on 12k videos is days, keyframes only got me to an overnight run.
    1. xnx · · focus · HN ↗
      Have you tried scene detection? I would guess camera cuts are even less frequent than keyframes.
    2. pezgordo · · focus · HN ↗
      Maybe you need a minimal downscale version as well, I heard is very common technique in the video editing world.

      Based on my experience, sampling rate can be tricky if what you are looking for lasted less than interval period.

      1. Forgeties79 · · focus · HN ↗
        Proxies
        1. iAMkenough · · focus · HN ↗
          And in this case, you'd still end up with the same number of frames to process, right? They'd just be smaller frames with less fidelity.
          1. Forgeties79 · · focus · HN ↗
            Yes they are a fraction of the bitrate
    3. mistrial9 · · focus · HN ↗
      > 12k videos ?

      you are pirating first-release movies for commercial purposes?

      1. Hnrobert42 · · focus · HN ↗
        I think 12K is quantity not resolution.
        1. whilenot-dev · · focus · HN ↗
          [delayed]
    4. allenleee · · focus · HN ↗

      [dead]

  3. aavisangle · · focus · HN ↗
    How do you do that? What's the architecture? Can you guide on that?
  4. lucideer · · focus · HN ↗
    possibly off-topic, but for anyone interested in this on a more cross-platform / holistic basis, Immich does this

    (& by "this" I mean an approximate AI search for photos & videos - I can't account for the "every frame", nor for the comparative search quality)

    1. mannyv · · focus · HN ↗
      Tried immich and there was a lot not to like. It behooves everyone to try each one and see if it fits.

      Just for product aesthetics, i believe it created a thumbnail folder with every resolution, which is annoying since i have a multi-decade 8tb library.

      There were other actual issues with organization and display. But with this I realized I can just get gemini to write a DAM for me in a weekend.

      1. lucideer · · focus · HN ↗
        Caching & overall library directory structures are configurable fwiw. I find the mobile integrations to be the biggest differentiators.
        1. mannyv · · focus · HN ↗
          I understand why it did what it did, but I didn't want to spend the time digging in and changing its behavior.

          The view options are what killed it in the end.

          The thumbnails issue was just me looking at the sausage and like "ugh, I wouldn't have done that."

          It's always a tradeoff between time and work. I would have done a sliding window around the current screen, but then you might have placeholders. Maybe it should do low-res first and generated hi-res thumbnails 3 pages out while scrolling. But that's a lot of work for the 10% case.

          What I want is aperture back, with all the fun AI stuff and using Affinity for photo editing (which I have anyway). I'll add that to my queue of projects I guess.

          1. ryandrake · · focus · HN ↗
            In general, I hate it when software is opinionated about my directory structure, or tries to build its own “library” on top of / in addition to my files on disk. More software should be flexible about the user’s existing data and directory structure.
  5. qprofyeh · · focus · HN ↗
    This is cool. Any way to search for People / faces / pets? Like on iOS?
  6. measure2xcut1x · · focus · HN ↗
    How well do you think this would work on stock photography on m1 mac with 32GB ram? For example I'd like to be able to search a folder of ~2k photos for houses with palm trees. Or find photos of kitchens, or find photos of desert southwest landscapes.
    1. tredre3 · · focus · HN ↗
      Apple Photos can already search photos with natural language using on-device AI. Is it not working well for you?
      1. measure2xcut1x · · focus · HN ↗
        Thanks for suggesting this. I have not tried it because the photos are on an external SMB network drive.
    2. allenleee · · focus · HN ↗
      YES! I can confirm it works perfectly on M1/M2/M3 machines (16g/64g).
  7. freecodeio · · focus · HN ↗
    would be lovely if picture embeddings were attached to the file by the camera but one can only dream of such futures
    1. collingreen · · focus · HN ↗
      [delayed]
  8. alt227 · · focus · HN ↗
    Slightly offtopic, but made me wonder.

    Can you copywrite things like this now that LLMs exist? I mean, up until now if a small startup has a great idea they will get bought out by big tech which will integrate (or kill) their tech. But now with LLMs can the likes of OpenAI just tell their model to make something that works similar to X and then get round copying laws?

    1. tough · · focus · HN ↗
      copywriting is the art of writing copy for products/marketing maybe you were thinking of sherlocking [1]

      1. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34080326">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34080326

      1. seemaze · · focus · HN ↗
        I sure the intended word was copyright[0], as in to protect against getting sherlocked.

        [0]<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Copyright" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Copyright

        1. robotresearcher · · focus · HN ↗
          Copyrights protect the literal text of your program and binaries. Not the design and functionality. Getting Sherlocked is having your functionality duplicated, independent of the code itself.

          No one thinks Apple violated Sherlock copyright. They just made it (nearly) functionally redundant.

    2. 101008 · · focus · HN ↗
      I don&#x27;t see why LLMs should make the legal part different. It&#x27;s like saying if you can copyright a book considering LLMs now can copy &#x2F; write a new one in just one hour. Making it faster doesn&#x27;t change the legal aspect &#x2F; ownership of something.
    3. modzu · · focus · HN ↗
      ianal but copyright law has nothing to say about being sherlocked. it&#x27;s happening - virtually any software you can think of has some shit slop clone out there already
    4. allenleee · · focus · HN ↗

      [dead]

  9. cpursley · · focus · HN ↗
    Why is this a JS bloatware instead of native or Rust?
    1. collingreen · · focus · HN ↗
      [delayed]
      1. cpursley · · focus · HN ↗
        Fair enough, but seriously, my machine has taken a beating by all these JavaScript and electron thingies.
        1. collingreen · · focus · HN ↗
          [delayed]
          1. ryandrake · · focus · HN ↗
            One of my deep dark hopes for LLM coding is that it means that nobody ever needs to write an Electron app again. Have a good idea and the ability to plan and structure the code in JS but don’t know a native app language? No problem! Just have the LLM write the Rust or Swift or even C++!
  10. postalcoder · · focus · HN ↗
    Since this is for the mac you really should be using apple&#x27;s vision framework for OCR. It smokes tesseract in both speed and accuracy.

    Edit: I&#x27;m curious which LLM was used to generate the code. I fed the title of your post to claude&#x2F;deepseek&#x2F;qwen&#x2F;codex asking to recommend a stack for this project, expecting to frown thinking that they still recommend tesseract. However, I found that they all recommend apple&#x27;s vision framework. In fact the latest model to recommend Tesseract is gpt-4.1.

    1. nullsanity · · focus · HN ↗
      And this is why vibe coders always make inferior software.
      1. fhub · · focus · HN ↗
        Compared to who? Every professional developer? Someone learning to code? Fabrice Bellard?
    2. daveguy · · focus · HN ↗
      nullsanity got downvoted into oblivion, but they are correct. This is one of the many reasons why vibe coding produces worse software. The code that is generated and the best practice recommendations are completely separate. They both come from a distribution of &quot;most common&quot;, and best practice is rarely common. Especially when a practice is first established, or in a specific niche.
      1. spiderfarmer · · focus · HN ↗
        On the flipside, it also leads to better software.
      2. thih9 · · focus · HN ↗
        It seems off topic. A hand coded electron project would have a discussion about electron vs native, just as unhelpful, even if relevant outside of the context.

        Unless you are referencing some existing non vibe coded app?

      3. xp84 · · focus · HN ↗
        Isn’t that why you use a plan mode? Or better, use a plan mode, revise and critique the plan, and then let it proceed to build?
      4. baxtr · · focus · HN ↗
        Maybe the real question is: who cares?

        What’s the downside risk of having &quot;worse software&quot; when you’re just ideating and putting things out there to see how people like it.

        1. Someone · · focus · HN ↗
          [delayed]
          1. daveguy · · focus · HN ↗
            And manager types in software still haven&#x27;t figured out that prototypes should not be the final product. In engineering it&#x27;s common knowledge and only rarely do you take a proof of concept directly to production.
          2. TeMPOraL · · focus · HN ↗
            Worst case:

            - release vibe coded tool

            - on HN, someone says, d&#x27;oh, you should be using Y, not X

            - give that comment to your LLM

            - LLM: &quot;The commenter on Hacker News is absolutely right, my mistake. I can easily replace X with Y if you want&quot;

            - release a new, better version of vibe coded tool

            Iteration, in one afternoon.

      5. losteric · · focus · HN ↗
        idk about that. The big labs and their data providers are spending millions of dollars building up expert datasets. I was offered $120&#x2F;hr to critique outputs and provide my own designs. Thats clean and high quality data, not the average internet word distribution
      6. WokeUp420 · · focus · HN ↗
        Kind of like &quot;history is written by the victors&quot;
    3. spiderfarmer · · focus · HN ↗
      So the prompt was probably something like: build me x using Tesseract.
    4. robotmay · · focus · HN ↗
      Mostly unrelated but fun thing I discovered earlier this year with Apple&#x27;s vision - if you have text both correctly oriented and upside down in the same image, it likes to interpret the upside down text as a Cyrillic alphabet. I was trying to use it to read the text on camera lenses and it came up with all sorts of bizarre interpretations. If anyone&#x27;s interested, I got around it by splitting the text at a point and unrolling it into a straight line before running OCR on it.
    5. vavkamil · · focus · HN ↗
      I recently tried to recover text from 8 frames of an office-shot YouTube video, where only a small, blurry portion of a computer screen was visible. After spending half a day with Astra on it, the conclusion was that it’s not possible to read.

      Later that evening, I just paused the YouTube video on my phone, circled the part of the display with Google Lens, and it read the whole thing with pretty good accuracy. It was mindblowing :)

      1. sheept · · focus · HN ↗
        All those years of captchas must&#x27;ve made Google&#x27;s model bulletproof
    6. allenleee · · focus · HN ↗

      [dead]

      1. novok · · focus · HN ↗
        If you look at the apple photos db you&#x27;ll see that there is a bunch of cached pre-analysis you can leverage for items in apple photos.
        1. allenleee · · focus · HN ↗
          thanks for this! will do some research on it
    7. darepublic · · focus · HN ↗
      My own experiments with tesseract were very mixed. I did use just a locally runnable version from a public repository. Text from webpages. Sometimes it would do great but small variations could make it fail completely. Paddleocr on single line text for me has accuracy in the range of 95%
    8. WokeUp420 · · focus · HN ↗
      Turns out it&#x27;s possible to build something without a glorified next-character search engine afterall
    9. schainks · · focus · HN ↗
      This. Learn all the knobs and dials, too. Useful performance gains to be made by tuning the right settings.
    10. amelius · · focus · HN ↗
      I mean, anything built in the AI age will smoke tesseract.
  11. yt1998 · · focus · HN ↗
    Why chose CLIP to do this. Have you tried small VLMs like Qwen-VL? I believe those models have video encoders can better perform at this scenario.
    1. allenleee · · focus · HN ↗

      [dead]

    2. radicality · · focus · HN ↗
      Not OP, but probably because they have no idea what they are doing or what CLIP even is. And the whole thing is likely just from one llm prompt, and then they dumped the whole thing onto GitHub, undoubtedly without even looking at any of the code or architecture.

      And then you end up with image metadata processing code like this, which just by a cursory glance I’m sure has edge case bugs : <a href="https:&#x2F;&#x2F;github.com&#x2F;allenv0&#x2F;SCM&#x2F;blob&#x2F;main&#x2F;screenshot-probe.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;allenv0&#x2F;SCM&#x2F;blob&#x2F;main&#x2F;screenshot-probe.js

  12. Jeeetendra · · focus · HN ↗
    jumping straight to the right moment in a video is the useful bit here. how often does the balanced sampling miss something that only appears for a second or two?
  13. qlasisi15 · · focus · HN ↗
    This would really help in video editing. Thanks!
    1. allenleee · · focus · HN ↗
      Glad you like it :)!
  14. qlasisi15 · · focus · HN ↗
    Useful a lot for video editing
  15. mannanj · · focus · HN ↗
    its a cool project, but I dont want to consume someones ai slop to discern whats true. if the human wrote the page in their own words, I would have considered using it.

    otherwise, I can just make my own with my own ai. why consume someones slop when I can eat my own.

    1. allenleee · · focus · HN ↗
      hahaha fair enough. If the README being AI-assisted is a dealbreaker, you definitely shouldn&#x27;t use it.

      plz — I bet, make your own with your own AI. Nothing would make me happier than one more &quot;local-first AI photo search&quot; repo. You&#x27;ll love the part where ffmpeg orphans itself to PID 1 at 500% CPU after &quot;done&quot; and your 90min film indexes only its final 3 minutes.

      Mine&#x27;s over here actually working. Enjoy eating your own slop.

  16. doubleorseven · · focus · HN ↗
    how long does it takes for a FHD 90 minutes asset?
    1. allenleee · · focus · HN ↗

      [dead]

  17. hemedanmert · · focus · HN ↗
    This is so cool! it could be really beneficial for editors

    isnt it expensive tho?

    1. allenleee · · focus · HN ↗
      Thank you :) It&#x27;s 100% free and open source!
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.