Git Product home page Git Product logo

xrem's Introduction

xrem

Cross-platform in-progress implementation of rem

Way too early to use- seriously, it's not useful yet.

But I want to help develop it!

Oh! That'd be awesome. Just run:

npm run tauri dev -- --release

Does a lot worse in debug mode in terms of performance.

"implemented" (read: likely terrible)

Currently implements, in a parallel / non-blocking way:

  • click the status icon and choose to start / stop recording
  • screenshot capture every 2 seconds
  • OCR at capture time
  • calculate text embedding (rem doesn't have this yet lol, and this is commented out anyway for now, but it works)
  • stream to mp4 without writing pngs to disk
  • basic tray icon + menu
  • efficient timeline seeking of a recorded data (with front-end)
  • view and "search" history as thumbnails: i put it in quotes because search is not working well yet
  • navigate to timeline frame by clicking search result

NOTE:

  • NO CACHING YET (this is vital for fast seeking between video files, currently big delay when swapping chunks)

(more recent screenshot of tray - still using default tauri logo)

image

Recent "search" (recent items) functionality

Screen.Recording.2024-01-19.at.5.13.04.PM.mov

More recent timeline seeking demo

Screen.Recording.2024-01-14.at.5.29.07.PM.mov

First Demo of basic poc:

Taking screenshots + ocr transcript printed to terminal, screenshots streamed to videos and saved, then manually showing this by scrubbing.

out.mp4

It can keep up on my M1 Air, haven't tested elsewhere yet...

BUT, this is using cross-platform rust libraries for the functionality we need.

FAQ

  • when will it be ready?
    • idk, but with your help it might go faster
  • why is the current ocr solution screaming about ARNs?
    • idk, if it was AWS's textract it might make more sense
  • not having live text analysis (MacOS) seems like selecting from past screenshots will be much harder to build
    • yeah

not implemented at all

  • Live OCR
    • overlay transparent text on image so as to be selectable (potentially works on Mac due to webview, but won't work elsewhere)
  • better search UI (matched text - not working well, date, application?)
  • natural language search
  • settings
  • window-specific OCR / filtering

xrem's People

Contributors

jasonjmcghee 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

xrem's Issues

Improve search UI: Show matched text region

Currently the search UI does not show matched text / highlight matched words, as rem does.

Would improve the search experience to show why a particular frame is matching your query.

Screenshot from rem

Screenshot 2024-04-23 at 9 15 22 AM

Live OCR text selection

Overlay transparent text on image so as to be selectable

(potentially works with less effort on Mac due to webview, but won't work elsewhere currently)

Add caching layer for video frames

When scrolling through the timeline, it's very expensive to keep opening videos and pulling out frames.

We need to pull all frames for a video chunk into memory and make them available via a cache.

It would be better to load the "next chunk" for the timeline as well to keep in front of the user so there's no waiting time.

Ideally we'd keep around a bunch of frames in the cache so the user could scroll back and forth and it is instant / snappy.

Add natural language search

Leverage something like sqlite-vss to add natural language search (in addition to) FTS.

The embedding function via candle already exists in the code.

Can't run it. Failed to get max frame.

Hi. I came across your project on HN a while ago. It's nice that you created rem without xcode+swift because I do not want to go through apple signing process. I really appreciate this repo.

While trying to run xrem, I met this error message. I am a noob to rust and svelte. I suspect that it failed to get a max frame from sqlite database.

% npm run tauri dev -- --release
(...)
warning: `xrem` (bin "xrem") generated 22 warnings (run `cargo fix --bin "xrem"` to apply 3 suggestions)
    Finished release [optimized] target(s) in 6.07s
starting app...
starting server...
started server...
9:36:06 AM [vite-plugin-svelte] /Users/noris/workspace/xrem/src/routes/search/ThumbnailCard.svelte:24:0 A11y: visible, non-interactive elements with an on:click event must be accompanied by a keyboard event handler. Consider whether an interactive element such as <button type="button"> or <a> might be more appropriate. See https://svelte.dev/docs/accessibility-warnings#a11y-click-events-have-key-events for more details.
9:36:06 AM [vite-plugin-svelte] /Users/noris/workspace/xrem/src/routes/search/ThumbnailCard.svelte:24:0 A11y: <div> with click handler must have an ARIA role
9:36:06 AM [vite-plugin-svelte] /Users/noris/workspace/xrem/src/routes/search/ThumbnailCard.svelte:70:4 Unused CSS selector ".thumbnail-card .app-name"
9:36:06 AM [vite-plugin-svelte] /Users/noris/workspace/xrem/src/routes/search/ThumbnailCard.svelte:82:4 Unused CSS selector ".thumbnail-card .app-name"
thread 'tokio-runtime-worker' panicked at src/server.rs:93:14:
Failed to get max frame: InvalidColumnType(0, "MAX(id)", Null)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at src/server.rs:88:48:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }
thread 'tokio-runtime-worker' panicked at src/server.rs:88:48:
called `Result::unwrap()` on an `Err` value: PoisonError { .. }

I believe that it refers to async fn get_max_frame_handler() in src-tauri/src/server.rs.

(Don't know if it helps) I am running

  • Vertura on M2 mac
  • rustc 1.76.0

Frames are blurry

I ran npm i and npm run tauri dev -- --release

also had to upgrade ffmpeg rust deps to latest version because it couldn't compile

and my frames look like this:

image

note this log:

[swscaler @ 0x300218000] No accelerated colorspace conversion found from yuv420p to rgb24.

maybe something related to my local env?

mac book pro m3

node -v
v20.9.0

rustup -V
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.79.0 (129f3b996 2024-06-10)`

Settings

rem has settings. Would be great to introduce them to xrem

Screenshot 2024-04-23 at 9 16 21 AM

Multi-Modal Support for Enhanced Retrieval

Is there a plan to incorporate image embeddings along with OCR and metadata-based retrieval? Utilizing the CLIP model from Candle to generate image embeddings could provide clearer context and improve the accuracy of xrem’s results. If performance is a concern, downscaling images before embedding could be a viable solution.

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.