Coder Social home page Coder Social logo

openrecall / openrecall Goto Github PK

View Code? Open in Web Editor NEW
1.7K 23.0 80.0 4.16 MB

OpenRecall is a fully open-source, privacy-first alternative to proprietary solutions like Microsoft's Windows Recall. With OpenRecall, you can easily access your digital history, enhancing your memory and productivity without compromising your privacy.

License: GNU Affero General Public License v3.0

Python 100.00%
ai alternative history macos ocr open-source privacy python recall search

openrecall's Introduction

   ____                   ____                  ____   
  / __ \____  ___  ____  / __ \___  _________ _/ / /   
 / / / / __ \/ _ \/ __ \/ /_/ / _ \/ ___/ __ `/ / /    
/ /_/ / /_/ /  __/ / / / _, _/  __/ /__/ /_/ / / /     
\____/ .___/\___/_/ /_/_/ |_|\___/\___/\__,_/_/_/      
    /_/                                                                                                                         

Enjoy this project? Show your support by starring it! ⭐️ Thank you!

Join our Discord and/or Telegram community to stay informed of updates!

Take Control of Your Digital Memory

OpenRecall is a fully open-source, privacy-first alternative to proprietary solutions like Microsoft's Windows Recall or Limitless' Rewind.ai. With OpenRecall, you can easily access your digital history, enhancing your memory and productivity without compromising your privacy.

What does it do?

OpenRecall captures your digital history through regularly taken snapshots, which are essentially screenshots. The text and images within these screenshots are analyzed and made searchable, allowing you to quickly find specific information by typing relevant keywords into OpenRecall. You can also manually scroll back through your history to revisit past activities.

openrecall_demo.mp4

Why Choose OpenRecall?

OpenRecall offers several key advantages over closed-source alternatives:

  • Transparency: OpenRecall is 100% open-source, allowing you to audit the source code for potential backdoors or privacy-invading features.
  • Cross-platform Support: OpenRecall works on Windows, macOS, and Linux, giving you the freedom to use it on your preferred operating system.
  • Privacy-focused: Your data is stored locally on your device, no internet connection or cloud is required. In addition, you have the option to encrypt the data on a removable disk for added security, read how in our guide here.
  • Hardware Compatibility: OpenRecall is designed to work with a wide range of hardware, unlike proprietary solutions that may require specific certified devices.

Elon Musk Tweet

Features

  • Time Travel: Revisit and explore your past digital activities seamlessly across Windows, macOS, or Linux.
  • Local-First AI: OpenRecall harnesses the power of local AI processing to keep your data private and secure.
  • Semantic Search: Advanced local OCR interprets your history, providing robust semantic search capabilities.
  • Full Control Over Storage: Your data is stored locally, giving you complete control over its management and security.

Lisa Rewind

Comparison

Feature OpenRecall Windows Recall Rewind.ai
Transparency Open-source Closed-source Closed-source
Supported Hardware All Copilot+ certified Windows hardware M1/M2 Apple Silicon
OS Support Windows, macOS, Linux Windows macOS
Privacy On-device, self-hosted Microsoft's privacy policy applies Connected to ChatGPT
Cost Free Part of Windows 11 (requires specialized hardware) Monthly subscription

Quick links

Get Started

Prerequisites

  • Python 3.11
  • MacOSX/Windows/Linux
  • Git

To install:

python3 -m pip install --upgrade --no-cache-dir git+https://github.com/openrecall/openrecall.git

To run:

python3 -m openrecall.app

Open your browser to: http://localhost:8082 to access OpenRecall.

Arguments

--storage-path (default: user data path for your OS): allows you to specify the path where the screenshots and database should be stored. We recommend creating an encrypted volume to store your data.

--primary-monitor-only (default: False): only record the primary monitor (rather than individual screenshots for other monitors)

Contribute

As an open-source project, we welcome contributions from the community. If you'd like to help improve OpenRecall, please submit a pull request or open an issue on our GitHub repository.

Contact the maintainers

[email protected]

License

OpenRecall is released under the AGPLv3, ensuring that it remains open and accessible to everyone.

openrecall's People

Contributors

allesanddro avatar koenvaneijk avatar tvturnhout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openrecall's Issues

[Feature Idea] Highlight Results

I think it would be a nice addition to highlight the part of the screenshot thats the causes the match.

E.g. you browse some NYT article about election results, which contains a bar graph with percentages. You then search for "election results graph" and openrecall shows you the corresponding screenshot but puts a highlight over the graph (colored box with high opacity). Or you ask "How many votes did the democratic party receive in the election?" and it highlights the graph / figure.

Same for text if you ask "When is the next Starlink launch?" and the text says "...the next launch of starlink satellites is scheduled on June 3rd 2024 ..." it would be nice if this gets highlighted.

For the figures / charts and images you could train an object detection model, then use a VLM to generate an image description which you can index. For the text it would be more complicated if it's QA and not just for exact matches. But in the beginning exact matches would be fine as well.

[Feature Request] Allow users to select different models for OCR and NLP

Currently code is using following models which are hard coded. Can we give users an option to select different models if they prefer by specifying a location where model would be stored. This way people can upgrade their models or use domain specific models depending on their needs

NLP-
model = SentenceTransformer("all-MiniLM-L6-v2")

OCR-
det_arch="db_mobilenet_v3_large",
reco_arch="crnn_mobilenet_v3_large",

Support Wayland on Linux

We are currently using mss for taking screenshots and while that works on X11, a lot of Linux users are driving Wayland. Trying out the vanilla implementation in this repo causes this error on Wayland:

File "/home/h/Public/openrecall_venv/.direnv/python-3.11/lib/python3.11/site-packages/mss/linux.py", line 297, in __init__
    raise ScreenShotError("No X11 library found.")
mss.exception.ScreenShotError: No X11 library found.

pyscreenshot claims to have Wayland support. I can confirm this and we can possibly replace mss with it. However, I'm not sure about a multi-monitor setup. It'd be great if someone else could test it out.

Wayland Support

Hi,

This doesn't seem to work on Wayland. MSS appears to only support X11. Any plans to implement Wayland support?

-micush

Error on searching

OS: Windows 11
Python: 3.11(conda)

INFO:werkzeug:127.0.0.1 - - [09/Jun/2024 11:56:28] "GET /search?q=how+i+met HTTP/1.1" 500 -
ERROR:app:Exception on /search [GET]
Traceback (most recent call last):
File "C:\Users\sifat\miniconda3\envs\recall\Lib\site-packages\flask\app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sifat\miniconda3\envs\recall\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sifat\miniconda3\envs\recall\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sifat\miniconda3\envs\recall\Lib\site-packages\flask\app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sifat\miniconda3\envs\recall\Lib\site-packages\openrecall\app.py", line 140, in search
embeddings = [
^
File "C:\Users\sifat\miniconda3\envs\recall\Lib\site-packages\openrecall\app.py", line 141, in
np.frombuffer(entry["embedding"], dtype=np.float64) for entry in entries
~~~~~^^^^^^^^^^^^^
TypeError: tuple indices must be integers or slices, not str

issue

Hi
Thanks for te project. however, as for so many open source projects, the installation or use is neither user friendly nor easy.

this is NOT against the dev but, seemingly, against the open source community itself - is it so hard to create a nice installer, exe file and a nice GUI for an app instead of just saying "install git" and then execute this and this command and then another command to run the app? Why no easy "start menu entry", a nice GUI and nice user interface? most "commercial" developers do this but I see so many open source devs who dont do it and I never understand why.

after running this intsall script for example I get this error

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\Robin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\openrecall\app.py", line 9, in
from openrecall.nlp import cosine_similarity, get_embedding
File "C:\Users\Robin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\openrecall\nlp.py", line 2, in
from sentence_transformers import SentenceTransformer
File "C:\Users\Robin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers_init
.py", line 7, in
from sentence_transformers.cross_encoder.CrossEncoder import CrossEncoder
File "C:\Users\Robin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers\cross_encoder_init
.py", line 1, in
from .CrossEncoder import CrossEncoder
File "C:\Users\Robin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers\cross_encoder\CrossEncoder.py", line 7, in
import torch
File "C:\Users\Robin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch_init_.py", line 141, in
raise err
OSError: [WinError 126] Das angegebene Modul wurde nicht gefunden. Error loading "C:\Users\Robin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\lib\shm.dll" or one of its dependencies.
PS C:\WINDOWS\system32>

even though the "shm.dll" IS in the location requested.

Unable to have OpenRecall installed successfully on my Windows device.

Get this error while installing OpenRecall

Error Snippets:

Collecting pyobjc-core==10.3 (from pyobjc->openrecall)
  Using cached pyobjc_core-10.3.tar.gz (934 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      running egg_info
      error: PyObjC requires macOS to build
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

text not available inside the db?

Hi!
excuse the ignorance I know nothing of embeddings and NLP, but is it normal that the text OCRed from each screenshot is missing from the DB ?
i tried opening it and looking at the text column, and all I see is fragments of text, suggestive of what could be there, like:

28

nn

H


will

rays when

last
ge
amp

But the text should be much much more. Is this by design (=text should NOT be available in general) or is there something wrong going on? the text i'm printing is what goes into here:

embedding = get_embedding(text)

Many thanks!

Search feature? How does it work?

So I finally got the webui up and running. is grabbing lots of screenshots but when I do a search I got a 500 error in my browser.

how does the search work in a nutshell? when I search for a string such as "Visual Studio" as that was an app window title I had open while openrecall was running and grabbed a screenshot of said desktop, it returns a complete list of all images taken in the webpage since day 1 with no relevance between the search string and the images displayed in the search results.

Sorry, I forgot to include an important piece. initially, I got a 500 error when performing a search. I fead the URL of the GitHub repo to ChatGPT 4o and told it to fix it basically... which resulted in every search returning every image ever captured. clearly, chatgpt did not provide proper code.

Arch Linux Setup?

Hey,
I'm having trouble setting this up on my Arch Linux Machine.
even after installing with pipx it shows the module isnt found whn i run python3 -m openrecall.app
Any Ideas?

OpenRecall 0.4 - TypeError: _StoreTrueAction.__init__() got an unexpected keyword argument 'type'

Uh-oh, spaghettio.

Windows 11 23H2 (22635.3720)
Python 3.12.4

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\openrecall\app.py", line 7, in <module>
    from openrecall.config import appdata_folder, screenshots_path
  File "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\openrecall\config.py", line 16, in <module>
    parser.add_argument(
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64__qbz5n2kfra8p0\Lib\argparse.py", line 1477, in add_argument
    action = action_class(**kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^
TypeError: _StoreTrueAction.__init__() got an unexpected keyword argument 'type'```

Feature Request: Client/Server Design for Multiple Systems and Processing Offloading

In order to make this a useful tool across multiple systems, it would be nice to have a server side which collects the screenshots and does the processing and a client side which grabs the screenshots and either caches them (if the server is unavailable because you are away from your "home" network) or sends them to the server.

This would allow you to potentially work across multiple systems and have everything integrated into one UI. It would also allow alleviate the processing overhead on the system that is being recorded and moves it to another location, minimizing the impact on the system that is being actively used.

refactoring/improvements

i browsed the src code, the code is good but i think i can help in improving the code a little more if its fine

License Change Request: Move from AGPL to a More Permissive License (e.g., MIT or Apache 2.0)

OpenRecall has been proposed for packaging in the MIT-licensed pAI-OS, being built by the 501(c)(3) charity Kwaai. I don't think it's an issue but I don't want to waste lawyer cycles on deciding whether it is or not, knowing we're unlikely to get a clear answer either way. I also don't want to give our users any reason to skip over us too. I was planning on implementing the feature anyway and may yet do that, but figured I can't be upset with the decision if you never hear my objection. I've been an active participant in the open source ecosystem for decades and totally understand why the (at this point arguably failed) AGPL was introduced - also being an early proponent of cloud computing - but it makes no sense whatsoever in this context because if I convey the software to you I'd already be triggering the GPL's teeth, and nobody in their right mind is about to give network access to this to third-parties for which the AGPL would be relevant! Please reconsider. - samj

OpenRecall is a powerful tool for logging screen activity to a local SQLite database, offering significant utility for personal and professional projects alike. However, its current license (AGPL) presents substantial challenges and limitations that could impede wider adoption and use, particularly in personal or non-service provider scenarios.

Concerns with AGPL License:

  • Unnecessary Restriction for Individual Use: The AGPL was designed to address the "service provider loophole," ensuring modifications and improvements are shared back with the community. While this is beneficial for server-side software and services, OpenRecall is primarily intended for individual use. The stringent requirements of the AGPL do not provide additional benefits in this context and instead introduce unnecessary legal and operational complexities for users.
  • Deterrent to Adoption:
    The AGPL can be a strong deterrent for developers and organizations considering incorporating OpenRecall into their workflows or products. The obligation to disclose source code modifications and network usage details under AGPL is seen as overly burdensome and can discourage contributions, integrations, and broader community support.
  • Compatibility Issues: Many open-source projects use more permissive licenses (e.g., MIT, Apache 2.0) that are more compatible with a variety of other software. The AGPL's requirements can create conflicts, preventing seamless integration with other tools and libraries. This limits the potential for OpenRecall to be part of larger ecosystems or combined with other open-source projects.

Suggested Action:
To foster a more inclusive and flexible environment for OpenRecall, we propose changing the license to a more permissive one, such as MIT or Apache 2.0. These licenses offer several advantages:

  • Ease of Use: Simplifies the legal and operational aspects for individual users and developers.
  • Encourages Contributions: Lowers the barrier to entry for contributions and integrations, fostering a larger and more vibrant community.
  • Greater Compatibility: Facilitates integration with other open-source projects and tools, enhancing the overall utility and appeal of OpenRecall.

Conclusion:

While the AGPL license has its merits, it imposes significant constraints that are not aligned with the primary use case of OpenRecall. Adopting a more permissive license would remove these barriers, promoting wider adoption, ease of use, and community engagement. We believe this change would significantly enhance the value and impact of OpenRecall, aligning with the broader goals of openness and collaboration in the open-source community.

We look forward to the community's feedback and hope for a constructive discussion on this important matter.

Thank you for your consideration.

Error loading the program

Hi, I tried to run the script and it gave me the following message.
I tried to search in the issues if there was the same error but I didn't find anything, I am newbie :).
I hope to attach enough for someone to be able to help me.
Thank you all!

python3 -m openrecall.app
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\lollo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\openrecall\app.py", line 9, in <module>
    from openrecall.nlp import cosine_similarity, get_embedding
  File "C:\Users\lollo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\openrecall\nlp.py", line 2, in <module>
    from sentence_transformers import SentenceTransformer
  File "C:\Users\lollo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers\__init__.py", line 7, in <module>
    from sentence_transformers.cross_encoder.CrossEncoder import CrossEncoder
  File "C:\Users\lollo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers\cross_encoder\__init__.py", line 1, in <module>
    from .CrossEncoder import CrossEncoder
  File "C:\Users\lollo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers\cross_encoder\CrossEncoder.py", line 7, in <module>
    import torch
  File "C:\Users\lollo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\__init__.py", line 141, in <module>
    raise err
OSError: [WinError 126] Impossibile trovare il modulo specificato. Error loading "C:\Users\lollo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\lib\shm.dll" or one of its dependencies.

Not compatible with Python 3.12 in Mac?

Hi I get the following errors when I try to run it on MacOS with latest Python 3.12.3

Any clue how can I install and run Openrecall?

➜  ~ python3 -m pip install --upgrade --no-cache-dir git+https://github.com/openrecall/openrecall.git
Collecting git+https://github.com/openrecall/openrecall.git
  Cloning https://github.com/openrecall/openrecall.git to /private/var/folders/9y/53qj1vqx5d125mbqn731kjs00000gp/T/pip-req-build-1pjuq_he
  Running command git clone --filter=blob:none --quiet https://github.com/openrecall/openrecall.git /private/var/folders/9y/53qj1vqx5d125mbqn731kjs00000gp/T/pip-req-build-1pjuq_he
  Resolved https://github.com/openrecall/openrecall.git to commit 5f00e3d8ec00f355174c4b3cdb741991bd28c74c
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Flask==3.0.3 (from OpenRecall==0.5)
  Downloading flask-3.0.3-py3-none-any.whl.metadata (3.2 kB)
Collecting numpy==1.26.4 (from OpenRecall==0.5)
  Downloading numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl.metadata (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.1/61.1 kB 1.1 MB/s eta 0:00:00
Collecting mss==9.0.1 (from OpenRecall==0.5)
  Downloading mss-9.0.1-py3-none-any.whl.metadata (3.9 kB)
Collecting pillow==10.3.0 (from OpenRecall==0.5)
  Downloading pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl.metadata (9.2 kB)
Collecting sentence-transformers==3.0.0 (from OpenRecall==0.5)
  Downloading sentence_transformers-3.0.0-py3-none-any.whl.metadata (10 kB)
INFO: pip is looking at multiple versions of openrecall to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement torch==2.3.0 (from openrecall) (from versions: 2.2.0, 2.2.1, 2.2.2)
ERROR: No matching distribution found for torch==2.3.0

Multi-Monitor Support

From what I'm seeing, there's really good stuff so far. However, I use two screens. My left is my primary one and the one I do all my work on. My right is my secondary screen, which is used for media like YouTube, Twitch, or music players.
OpenRecall is only capturing my secondary screen. Would it be possible for it to capture all monitors, or else configure which screen it monitors?

Using Windows 11. Python 3.11.0 (as instructed in readme.md, lacking any specific subversion.)

OpenRecall 0.5 - ValueError: pid must be a positive integer (got -2111540272)

OpenRecall has been running for, I dunno, two hours by this point? The time as of writing is 1:16 pm. The last screenshot was 12:44 pm. I looked over at the console, and this has happened:

Traceback (most recent call last):
  File "C:\Users\[User-Redacted]\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "C:\Users\[User-Redacted]\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\[User-Redacted]\AppData\Roaming\Python\Python311\site-packages\openrecall\screenshot.py", line 79, in record_screenshots_thread
    active_app_name = get_active_app_name()
                      ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\[User-Redacted]\AppData\Roaming\Python\Python311\site-packages\openrecall\utils.py", line 80, in get_active_app_name
    return get_active_app_name_windows()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\[User-Redacted]\AppData\Roaming\Python\Python311\site-packages\openrecall\utils.py", line 60, in get_active_app_name_windows
    exe = psutil.Process(pid).name()
          ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\[User-Redacted]\AppData\Roaming\Python\Python311\site-packages\psutil\__init__.py", line 323, in __init__
    self._init(pid)
  File "C:\Users\[User-Redacted]\AppData\Roaming\Python\Python311\site-packages\psutil\__init__.py", line 334, in _init
    raise ValueError(msg)
ValueError: pid must be a positive integer (got -2111540272)

It is apparently still capable of serving screenshots to the UI, but doesn't seem to be creating any new ones.

I have a similar project can be used for functional reference (but specially designed for Windows)

https://github.com/yuka-friends/Windrecorder

This project implements some features in the issue, and the code might be used for porting and reference, feel free to use:

  • Complete backtracking interface and statistical design
  • Tray Menu
  • Deduplication of index content
  • Skip lock screen and custom content
  • Window title record
  • Multi-monitor support
  • Image semantic search through ONNX instead of heavy torch

image

min. hardware requirements

Would the following PC be new/fast enough to operate openrecall?:

CPU: quad core Intel Core i5-4570 (-MCP-) speed/min/max: 837/800/3201 MHz
RAM: 15895.7 MiB
Storage: 2.17 TiB
Graphics:  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics
    vendor: Hewlett-Packard driver: i915 v: kernel arch: Gen-7.5 process: Intel 22nm built: 2013
    ports: active: VGA-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:0412
    class-ID: 0300[/CODE]
No graphical card.

I mean, if it takes all 5 seconds a screenshot and has to OCR it with text and picture: With this hardware: Is not all the time GPU and CPU at 100% ?

Thank you.

Optimize for performance, battery, efficiency

Optimize openrecall to consume as little resources as possible. Take snapshots only when something changes on the screen not when it is idle. Consume as little battery, cpu as possible, make it efficient.

Support for Debian12-X11-KDE?

Testing machine info: Debian 12, KDE, X11, all debian packages, nothing custom, website opens fine but does not seem to be doing much appart from that, site shows "Nothing recorded yet, wait a few seconds." and its been like that for hours, ran the install as is from the github readme, even ran pip install -r requeriments.txt manually in case something missing from installation.
Thanks.

[Feature suggestion] Optional authentication for front-end?

Hello!

I must start with saying that I don't know if this feature is in or not, as I'm running a Wayland-only system which ain't supported at the moment, so I haven't tried it yet. But I will assume not, as it's not listed in the readme, roadmap or any other issue at the time of writing.

So Linux systems may be ran as a multi-user system, and as such other users may be able to access the url the front-end is available on. As such, it would be great if it was possible to enable an authentication layer so that the front-end cannot be accessed by an unauthorized user, in such a multi-user system case.

Basic implementation could be just asking for the decryption password, or another user-set password before allowing access to the front-end, with the front being served through https so that said password won't be sent in clear-text.

Thank you for reading!

One-click installer for Windows & macOS

One-Click Installer for Windows and macOS

Description

To enhance the user experience and make OpenRecall more accessible, we are introducing a one-click installer for both Windows and macOS platforms. This feature will streamline the installation process, allowing users to get started with OpenRecall quickly and effortlessly, without needing to perform manual setup steps.

Benefits

  • Ease of Use: Simplifies the installation process, making it accessible even to non-technical users.
  • Quick Setup: Reduces the time required to install and configure OpenRecall.
  • User-Friendly: Provides a seamless experience, encouraging more users to try and adopt OpenRecall.

Implementation

  • Use pyinstaller to bundle all runtime dependencies
  • Find out a way to have a smaller pytorch runtime, as CUDA enabled is close to 1GB uncompressed.

OS Dependency on installation (PyObjC requires macOS to build)

My system
⢀⣤⣴⣶⣶⣶⣦⣤⡀⠀⣀⣠⣤⣴⣶⣶⣶⣶⣶⣶⣶⣶⣤⣤⣀⡀ spritan@spritan-pc
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⡀ ------------------
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄ OS: Nobara Linux 39 (KDE Plasma) x86_64
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄ Host: Nitro AN515-43 V1.12
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ Kernel: 6.8.7-201.fsync.fc39.x86_64
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠋⠉⠁⠀⠀⠉⠉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧ Uptime: 15 hours, 14 mins
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⢀⣀⣀⡀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ Battery: 100%% [Full]
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⠀⢠⣾⣿⣿⣿⣿⣷⡄⠀⠀⠀⠻⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⣀⣀⣬⣽⣿⣿⣿⣿⣿⣿ Packages: 3447 (rpm), 11 (flatpak-system), 20 (flatpak-user), 8 (snap)
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠈⠻⢿⣿⣿⡿⠟⠁⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ Shell: zsh 5.9
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ Display: 1920x1080 @ 120Hz [Built-in]
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ Terminal: konsole 24.5.0
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ CPU: AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx (8) @ 2.30 GHz
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠉⠛⠛⢿⣿⣿⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿ GPU: AMD Radeon Vega 10
⠘⢿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⠟⠁ GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q
⠈⠙⠛⠛⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠛⠛⠛⠉⠁ Memory: 5.05 GiB / 13.58 GiB (37%)

Error

`
Collecting openrecall
Downloading OpenRecall-0.1-py3-none-any.whl.metadata (5.1 kB)
Collecting Flask==3.0.3 (from openrecall)
Downloading flask-3.0.3-py3-none-any.whl.metadata (3.2 kB)
Collecting numpy==1.26.4 (from openrecall)
Using cached numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Collecting mss==9.0.1 (from openrecall)
Using cached mss-9.0.1-py3-none-any.whl.metadata (3.9 kB)
Collecting pillow==10.3.0 (from openrecall)
Using cached pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (9.2 kB)
Collecting sentence-transformers==3.0.0 (from openrecall)
Downloading sentence_transformers-3.0.0-py3-none-any.whl.metadata (10 kB)
Collecting torch==2.3.0 (from openrecall)
Downloading torch-2.3.0-cp311-cp311-manylinux1_x86_64.whl.metadata (26 kB)
Collecting torchvision==0.18.0 (from openrecall)
Downloading torchvision-0.18.0-cp311-cp311-manylinux1_x86_64.whl.metadata (6.6 kB)
Collecting shapely (from openrecall)
Downloading shapely-2.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.0 kB)
Collecting h5py (from openrecall)
Downloading h5py-3.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.5 kB)
Collecting rapidfuzz (from openrecall)
Downloading rapidfuzz-3.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)
Collecting pyobjc (from openrecall)
Downloading pyobjc-10.3-py3-none-any.whl.metadata (25 kB)
Collecting Werkzeug>=3.0.0 (from Flask==3.0.3->openrecall)
Using cached werkzeug-3.0.3-py3-none-any.whl.metadata (3.7 kB)
Collecting Jinja2>=3.1.2 (from Flask==3.0.3->openrecall)
Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting itsdangerous>=2.1.2 (from Flask==3.0.3->openrecall)
Using cached itsdangerous-2.2.0-py3-none-any.whl.metadata (1.9 kB)
Collecting click>=8.1.3 (from Flask==3.0.3->openrecall)
Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting blinker>=1.6.2 (from Flask==3.0.3->openrecall)
Downloading blinker-1.8.2-py3-none-any.whl.metadata (1.6 kB)
Collecting transformers<5.0.0,>=4.34.0 (from sentence-transformers==3.0.0->openrecall)
Using cached transformers-4.41.2-py3-none-any.whl.metadata (43 kB)
Collecting tqdm (from sentence-transformers==3.0.0->openrecall)
Using cached tqdm-4.66.4-py3-none-any.whl.metadata (57 kB)
Collecting scikit-learn (from sentence-transformers==3.0.0->openrecall)
Using cached scikit_learn-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Collecting scipy (from sentence-transformers==3.0.0->openrecall)
Using cached scipy-1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)
Collecting huggingface-hub>=0.15.1 (from sentence-transformers==3.0.0->openrecall)
Using cached huggingface_hub-0.23.3-py3-none-any.whl.metadata (12 kB)
Collecting filelock (from torch==2.3.0->openrecall)
Using cached filelock-3.14.0-py3-none-any.whl.metadata (2.8 kB)
Collecting typing-extensions>=4.8.0 (from torch==2.3.0->openrecall)
Using cached typing_extensions-4.12.1-py3-none-any.whl.metadata (3.0 kB)
Collecting sympy (from torch==2.3.0->openrecall)
Using cached sympy-1.12.1-py3-none-any.whl.metadata (12 kB)
Collecting networkx (from torch==2.3.0->openrecall)
Using cached networkx-3.3-py3-none-any.whl.metadata (5.1 kB)
Collecting fsspec (from torch==2.3.0->openrecall)
Using cached fsspec-2024.6.0-py3-none-any.whl.metadata (11 kB)
Collecting nvidia-cuda-nvrtc-cu12==12.1.105 (from torch==2.3.0->openrecall)
Using cached nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)
Collecting nvidia-cuda-runtime-cu12==12.1.105 (from torch==2.3.0->openrecall)
Using cached nvidia_cuda_runtime_cu12-12.1.105-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)
Collecting nvidia-cuda-cupti-cu12==12.1.105 (from torch==2.3.0->openrecall)
Using cached nvidia_cuda_cupti_cu12-12.1.105-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cudnn-cu12==8.9.2.26 (from torch==2.3.0->openrecall)
Using cached nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cublas-cu12==12.1.3.1 (from torch==2.3.0->openrecall)
Using cached nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)
Collecting nvidia-cufft-cu12==11.0.2.54 (from torch==2.3.0->openrecall)
Using cached nvidia_cufft_cu12-11.0.2.54-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)
Collecting nvidia-curand-cu12==10.3.2.106 (from torch==2.3.0->openrecall)
Using cached nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)
Collecting nvidia-cusolver-cu12==11.4.5.107 (from torch==2.3.0->openrecall)
Using cached nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-cusparse-cu12==12.1.0.106 (from torch==2.3.0->openrecall)
Using cached nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)
Collecting nvidia-nccl-cu12==2.20.5 (from torch==2.3.0->openrecall)
Using cached nvidia_nccl_cu12-2.20.5-py3-none-manylinux2014_x86_64.whl.metadata (1.8 kB)
Collecting nvidia-nvtx-cu12==12.1.105 (from torch==2.3.0->openrecall)
Using cached nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl.metadata (1.7 kB)
Collecting triton==2.3.0 (from torch==2.3.0->openrecall)
Downloading triton-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.4 kB)
Collecting nvidia-nvjitlink-cu12 (from nvidia-cusolver-cu12==11.4.5.107->torch==2.3.0->openrecall)
Using cached nvidia_nvjitlink_cu12-12.5.40-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting pyobjc-core==10.3 (from pyobjc->openrecall)
Downloading pyobjc_core-10.3.tar.gz (934 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 934.4/934.4 kB 2.0 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
running egg_info
error: PyObjC requires macOS to build
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
`

Please drop Linux support

Dropping Linux support from openrecall can be a strategic decision that might be justified under certain circumstances. Here are some potential reasons why this could be considered a good move forward:

  1. Resource Allocation and Focus

    Development Resources: Maintaining support for multiple operating systems requires significant resources. By focusing on a single or fewer platforms, the development team can concentrate efforts, leading to potentially higher quality and more innovative features on those platforms.
    Testing and QA: Quality assurance and testing are simpler and more thorough when limited to fewer environments. This can result in a more stable and reliable product.

  2. Market Share and User Base

    Target Audience: If the primary user base predominantly uses Windows or macOS, it makes sense to focus on these platforms. For instance, certain consumer software, professional tools, or games might have a user base that heavily leans towards non-Linux systems.
    Market Trends: Market analysis might show that Linux users represent a small fraction of potential customers. Prioritizing resources towards more widely used operating systems can be more profitable and align better with the business goals.

  3. Technical Challenges

    Compatibility Issues: Linux has many distributions, each with its own quirks and dependencies. Ensuring compatibility across these can be complex and time-consuming.
    Hardware Support: Linux often has varied support for hardware and peripherals. Dropping Linux support might simplify the development process, particularly for software that relies on specific hardware capabilities.

  4. Strategic Partnerships and Integrations

    Platform Partnerships: Companies might enter strategic partnerships with OS vendors (like Microsoft or Apple) that encourage focusing development on their platforms in exchange for marketing support, technical assistance, or financial incentives.
    Integration with Proprietary Technologies: Certain applications might benefit from deep integration with proprietary technologies that are not available or are limited on Linux.

  5. Security and Compliance

    Regulatory Compliance: Meeting compliance and regulatory standards can be easier on fewer platforms. Windows and macOS might have more straightforward paths to compliance for certain industries compared to the diverse landscape of Linux distributions.
    Security Management: Maintaining security across multiple platforms is challenging. Focusing on fewer platforms can streamline the implementation of security measures and reduce vulnerabilities.

  6. User Experience and Support

    Consistent User Experience: Ensuring a consistent user experience across platforms is difficult. By limiting platform support, the development team can create a more seamless and polished user experience.
    Support and Documentation: Providing support and documentation for fewer platforms can improve the quality of these services. This makes it easier for users to find help and for the company to offer efficient support.

  7. Cost Considerations

    Economic Viability: Supporting Linux might not be economically viable if the user base is too small to justify the investment. Dropping Linux support could free up financial resources that can be better utilized elsewhere.

Conclusion

While dropping Linux support might alienate some users, the decision can be justified if it leads to better resource allocation, higher quality products on other platforms, and aligns better with the company's strategic goals. Ultimately, the decision should be based on a thorough analysis of user demographics, market trends, and the cost-benefit ratio of maintaining multi-platform support.

OpenRecall 0.5 [WinError 126] The specified module could not be found.

Coming from #36

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\openrecall\app.py", line 9, in <module>
    from openrecall.nlp import cosine_similarity, get_embedding
  File "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\openrecall\nlp.py", line 2, in <module>
    from sentence_transformers import SentenceTransformer
  File "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers\__init__.py", line 7, in <module>
    from sentence_transformers.cross_encoder.CrossEncoder import CrossEncoder
  File "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers\cross_encoder\__init__.py", line 1, in <module>
    from .CrossEncoder import CrossEncoder
  File "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\sentence_transformers\cross_encoder\CrossEncoder.py", line 7, in <module>
    import torch
  File "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\__init__.py", line 141, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\[User-Redacted]\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\torch\lib\shm.dll" or one of its dependencies.```

theading.py This Platform is Not Supported

Feel free to close if this isn't your issue. I'm getting the following error:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.12/threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "/home/ccrow/venv/openrecall/lib/python3.12/site-packages/openrecall/screenshot.py", line 68, in record_screenshots_thread
active_app_name = get_active_app_name()
^^^^^^^^^^^^^^^^^^^^^
File "/home/ccrow/venv/openrecall/lib/python3.12/site-packages/openrecall/utils.py", line 78, in get_active_app_name
raise NotImplementedError("This platform is not supported")
NotImplementedError: This platform is not supported

This is running on Ubuntu 22.04 with Python 3.12.4 installed from source. Modules are installed in a venv with python3.12 set as the interpreter.

Doctr was install via the method in the pull request (as the default wasn't working for me)

pip3 install git+https://github.com/koenvaneijk/doctr.git@af711bc04eb8876a7189923fb51ec44481ee18cd

Let me know if you would like further details or if there is anything I can do to help.

[Feature Request] Specify DB storage path and Image storage path

I can see many images being generated over time and eating up a lot of storage. would be nice to be able to point image storage to a location other than user profile path where storage might be limited. Maybe some basic settings via conf file or web GUI.

I'm definitely keeping my eye on this project. Im no dev. but will definitely buy you a beer!

Failed to run due to `No module named 'doctr'`

Getting module errors when running after install (OS: Linux)

Running

python3 -m pip install --upgrade --no-cache-dir git+https://github.com/openrecall/openrecall.git 
python3 -m openrecall.app

Gives this output (and error)

# Install
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/openrecall/openrecall.git
  Cloning https://github.com/openrecall/openrecall.git to /tmp/pip-req-build-gvdxm4gk
  Running command git clone --filter=blob:none --quiet https://github.com/openrecall/openrecall.git /tmp/pip-req-build-gvdxm4gk
  Resolved https://github.com/openrecall/openrecall.git to commit 5f00e3d8ec00f355174c4b3cdb741991bd28c74c
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: Flask==3.0.3 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (3.0.3)
Requirement already satisfied: numpy==1.26.4 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (1.26.4)
Requirement already satisfied: mss==9.0.1 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (9.0.1)
Requirement already satisfied: pillow==10.3.0 in /usr/lib64/python3.12/site-packages (from OpenRecall==0.5) (10.3.0)
Requirement already satisfied: sentence-transformers==3.0.0 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (3.0.0)
Requirement already satisfied: torch==2.3.0 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (2.3.0)
Requirement already satisfied: torchvision==0.18.0 in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (0.18.0)
Requirement already satisfied: shapely in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (2.0.4)
Requirement already satisfied: h5py in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (3.11.0)
Requirement already satisfied: rapidfuzz in ./.local/lib/python3.12/site-packages (from OpenRecall==0.5) (3.9.3)
Requirement already satisfied: Werkzeug>=3.0.0 in ./.local/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (3.0.3)
Requirement already satisfied: Jinja2>=3.1.2 in ./.local/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (3.1.4)
Requirement already satisfied: itsdangerous>=2.1.2 in ./.local/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (2.2.0)
Requirement already satisfied: click>=8.1.3 in /usr/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (8.1.3)
Requirement already satisfied: blinker>=1.6.2 in ./.local/lib/python3.12/site-packages (from Flask==3.0.3->OpenRecall==0.5) (1.8.2)
Requirement already satisfied: transformers<5.0.0,>=4.34.0 in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (4.41.2)
Requirement already satisfied: tqdm in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (4.66.4)
Requirement already satisfied: scikit-learn in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (1.5.0)
Requirement already satisfied: scipy in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (1.13.0)
Requirement already satisfied: huggingface-hub>=0.15.1 in ./.local/lib/python3.12/site-packages (from sentence-transformers==3.0.0->OpenRecall==0.5) (0.23.3)
Requirement already satisfied: filelock in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (3.14.0)
Requirement already satisfied: typing-extensions>=4.8.0 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (4.12.2)
Requirement already satisfied: sympy in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (1.12.1)
Requirement already satisfied: networkx in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (3.3)
Requirement already satisfied: fsspec in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (2024.6.0)
Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.105)
Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.105)
Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.105)
Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (8.9.2.26)
Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.3.1)
Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (11.0.2.54)
Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (10.3.2.106)
Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (11.4.5.107)
Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.0.106)
Requirement already satisfied: nvidia-nccl-cu12==2.20.5 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (2.20.5)
Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in ./.local/lib/python3.12/site-packages (from torch==2.3.0->OpenRecall==0.5) (12.1.105)
Requirement already satisfied: nvidia-nvjitlink-cu12 in ./.local/lib/python3.12/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch==2.3.0->OpenRecall==0.5) (12.5.40)
Requirement already satisfied: packaging>=20.9 in /usr/lib/python3.12/site-packages (from huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (23.1)
Requirement already satisfied: pyyaml>=5.1 in /usr/lib64/python3.12/site-packages (from huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (6.0.1)
Requirement already satisfied: requests in /usr/lib/python3.12/site-packages (from huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (2.28.2)
Requirement already satisfied: MarkupSafe>=2.0 in ./.local/lib/python3.12/site-packages (from Jinja2>=3.1.2->Flask==3.0.3->OpenRecall==0.5) (2.1.5)
Requirement already satisfied: regex!=2019.12.17 in /usr/lib64/python3.12/site-packages (from transformers<5.0.0,>=4.34.0->sentence-transformers==3.0.0->OpenRecall==0.5) (2024.4.16)
Requirement already satisfied: tokenizers<0.20,>=0.19 in ./.local/lib/python3.12/site-packages (from transformers<5.0.0,>=4.34.0->sentence-transformers==3.0.0->OpenRecall==0.5) (0.19.1)
Requirement already satisfied: safetensors>=0.4.1 in ./.local/lib/python3.12/site-packages (from transformers<5.0.0,>=4.34.0->sentence-transformers==3.0.0->OpenRecall==0.5) (0.4.3)
Requirement already satisfied: joblib>=1.2.0 in ./.local/lib/python3.12/site-packages (from scikit-learn->sentence-transformers==3.0.0->OpenRecall==0.5) (1.4.2)
Requirement already satisfied: threadpoolctl>=3.1.0 in ./.local/lib/python3.12/site-packages (from scikit-learn->sentence-transformers==3.0.0->OpenRecall==0.5) (3.5.0)
Requirement already satisfied: mpmath<1.4.0,>=1.1.0 in ./.local/lib/python3.12/site-packages (from sympy->torch==2.3.0->OpenRecall==0.5) (1.3.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/lib/python3.12/site-packages (from requests->huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.12/site-packages (from requests->huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (3.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3.12/site-packages (from requests->huggingface-hub>=0.15.1->sentence-transformers==3.0.0->OpenRecall==0.5) (1.26.18)

[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: python3 -m pip install --upgrade pip
# Running
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/var/home/me/.local/lib/python3.12/site-packages/openrecall/app.py", line 10, in <module>
    from openrecall.screenshot import record_screenshots_thread
  File "/var/home/me/.local/lib/python3.12/site-packages/openrecall/screenshot.py", line 11, in <module>
    from openrecall.ocr import extract_text_from_image
  File "/var/home/me/.local/lib/python3.12/site-packages/openrecall/ocr.py", line 1, in <module>
    from doctr.models import ocr_predictor
ModuleNotFoundError: No module named 'doctr'

OpenRecall should ignore screen saver

It's taking a lot of meaningless screenshots :)

Another issue is that when I search, it matches a lot of those screensaver screenshots although they're just photos of trees :)
image

Windows Install Issues

There are 3 errors I'm encountering, and there may be more.

Include python-doctr on pip install.
Include requirement for GTK Runtime
Fix torch compatibility

Problem 1:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openrecall\app.py", line 9, in
from doctr.models import ocr_predictor
ModuleNotFoundError: No module named 'doctr'

Fix:
pip install python-doctr

Problem 2:
OSError: cannot load library 'gobject-2.0-0': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'

Fix:
Install GTK-for-Windows-Runtime-Environment-Installer

Problem 3:
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\shm.dll" or one of its dependencies.

Fix:
None yet. I tried downgrading to torch 2.2.1, but dependencies don't allow that. Running the app anyway just shows a terminal new line and the localhost site doesn't work.

Error when running the app with python3

Hello! I've run the command to install the app, but when i try to run, I get the following error:

Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\silvi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openrecall\app.py", line 9, in <module> from openrecall.nlp import cosine_similarity, get_embedding File "C:\Users\silvi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openrecall\nlp.py", line 2, in <module> from sentence_transformers import SentenceTransformer File "C:\Users\silvi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sentence_transformers\__init__.py", line 7, in <module> from sentence_transformers.cross_encoder.CrossEncoder import CrossEncoder File "C:\Users\silvi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sentence_transformers\cross_encoder\__init__.py", line 1, in <module> from .CrossEncoder import CrossEncoder File "C:\Users\silvi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\sentence_transformers\cross_encoder\CrossEncoder.py", line 7, in <module> import torch File "C:\Users\silvi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\__init__.py", line 141, in <module> raise err OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\silvi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\lib\shm.dll" or one of its dependencies.

Can someone help me fix it, please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.