• Aux@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          5 months ago

          You can start by running sudo apt install tesseract-ocr and then reading its docs.

          • MacN'Cheezus@lemmy.today
            link
            fedilink
            English
            arrow-up
            0
            ·
            edit-2
            5 months ago

            It appears to be as simple as tesseract <infile> <outfile>. Possibly could even pipe (or tee) the screenshot straight into that and save both an image and a text file in a single command line.

            So something like this should do the trick:

            gnome-screenshot -f - | tee /Microsoft/yourPrivacy/$(date +%s).png | tesseract - /Microsoft/yourPrivacy/$(date +%s).txt
            

            Skip the database, just use grep to search that directory if you need to find anything. Voilà, homemade Recall.

            • Aux@lemmy.world
              link
              fedilink
              arrow-up
              0
              ·
              5 months ago

              It is much better to search using ElasticSearch or Sphinx. Grep is super slow, non indexed and can’t do natural language full text searches. It’s pretty much useless for any real world text search you’d want from OCRed content. And all these better tools are free and open source, so really a no brainer.

              • MacN'Cheezus@lemmy.today
                link
                fedilink
                English
                arrow-up
                1
                ·
                5 months ago

                I’m sure there are many ways to improve on this solution, but they would all require significantly more effort (ElasticSearch isn’t exactly trivial to set up).

                This is really just a proof of concept, the most minimal viable implementation that gets you something similar in terms of functionality.

                For instance, Windows Recall stores OCR content tagged by app, this solution doesn’t. Also, as others have mentioned, a practical implementation should likely check if anything has changed at all and discard any screenshots that don’t have any new data.

  • DannyBoy@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    5 months ago

    That’s not the worst idea ever. Say a screenshot is 10 mb. 10x60x 8 hours =4800mb per work day. 30 days is 150gb worst case scenario. I suppose you could check the previous screenshot and if it’s the same, then don’t write a new file. Combine that with OCR and a utility to scroll forward and backward through time, it might be a useful tool.

      • DannyBoy@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        0
        ·
        5 months ago

        Once a minute, and only if the screen contents change. I imagine there’s something lightweight enough.

        • MacN'Cheezus@lemmy.today
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          5 months ago

          In order to be certified for running Recall, machines currently must have an NPU (Neural Processing Unit, basically an AI coprocessor). I assume that is what makes it practical to do by offloading the required computation from the CPU.

          Apparently it IS possible to circumvent that requirement using a hack, which is what some of the researchers reporting on it have done, but I haven’t read any reports on how that affects CPU usage in practice.

          • wick@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            5 months ago

            Recall analyses each screenshot and uses AI or whatever to add tags to it. I’d assume that’s what the NPU is used for.

    • RandomLegend [He/Him]@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      Are you on 16k resolution or something?

      When i take a screenshot of my 3440x1440 display it’s 1MB big. I mean this doesn’t change the issue in its core but dramatically downsizes it

    • Evotech@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      5 months ago

      That’s what recall is… It’s literally screenshotring and. Ocr / ai parsing Combined with a sqllite database

      • Cargon@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        5 months ago

        If only MS used DuckDB then they wouldn’t have such a huge PR disaster on their hands.