Passive OCR and other 'AI' tools on the Linux desktop
With modern CPU's supposedly shipping with 'AI cores': How long do you think it will take for a proper opensource, privacy respecting productivity tools(Something like whatever M$ copilot is supposed to be?) to be available?
Personally, i would love to see something like 'Passive' OCR integrated with the display server: the ability to pause any video and just select whatever text(even handwritten) there is naturally like it was a text document without any additional hassle will be really usefulAlso useful in circumventing any blocks certain websites put on articles to prevent text from being copied
Or an AI grammar checker running natively for LibreOffice.
What are some AI tools you think should be developed for desktop Linux?
garrett
in reply to Artemis_Mystique • • •FOSS apps (all on Flathub)
Some of the AI related apps I've been using that are both Free Software and offline (where it runs on your computer without using network services in the cloud) are:
Chat and image generation (more advanced)
While all the above are graphical apps and on Flathub (some may have distro packages too), there are some additional AI/ML things you can run on Linux as well:
You can run Ollama in a container to make it even easier. Even a Podman container on your user account works. (You don't need to set it up as a system container.) The instructions for Docker work on Podman (just swap the
docker
command forpodman
instead).While the official instructions only list CPU (which is fine for some of the smaller models) and NVidia, it's also possible to use an AMD GPU too:
llama2
is the default ML; there are so many others available. Mixtral is a good one if you have enough vram on your GPU. Whatever you specify, it will auto-download and set it up for you. You only need to wait the first time. (The ROCm version of takes a while to download. Each model varies. The good thing is, it's all cached for subsequent uses.)If you want a web UI like ChatGPT, then you could also run this instead of the command line interaction command:
...and visit http://localhost:3000/
When done, run
podman stop ollama
andpodman stop ollama-webui
to free up resources from your GPU.There are also integrations for text editors and IDEs, similar to GitHub's CoPilot. Neovim has a few already. VS Code (or VS Codium) has some too (like twinny and privy).
...and there are a ton others. Forks of forks of forks.
Krita, GIMP, and Blender all have plugins that can interface with some of these too (usually using a SD Automatic111 API).
For Stable Diffusion on AMD, you need to have ROCm installed and might need to set or use an environment variable to make it work with your card. Something like:
HSA_OVERRIDE_GFX_VERSION=11.0.0
orHSA_OVERRIDE_GFX_VERSION=10.3.0
(depending on your GPU). Prefixing means just putting that at the beginning of the the command with a space and then the rest of the command. Setting it as a variable depends on your shell. You might need toexport
it for some (like for bash). Prefixing it is fine though, especially when you use ctrl+r to do a substrang search in your shell history (so you don't need to retype it or remember silly-long commands).As using these image generating apps pulls down a lot of Python libraries, I'd suggest considering setting up a separate user account instead of using your own, so the app doesn't have access to your local files (like stuff in ~/.ssh/, ~/.local/, your documents, etc.). Setting up containers for these is not so easy (yet), sadly. Some people have done it. And they do run in a toolbox or distrobox podman container... but toolbox and distrobox containers don't really contain so much, so you're better off using podman (with a "docker" container) directly or running it as a separate account for some type of isolation from your user account files.
Everything else above is at least contained (via containers or Flatpak) to some degree... but stuff locally via pip installs can do anything. And it's not just hypothetical either, for example: PyTorch nightly was compromised for a few days on Christmas of 2022.
There are some graphical apps on Flathub for connecting to Stable Diffusion and a ChatGPT AI (which ollama now has)... but in the course of setting them up, you basically have a web and/or text-based UI to interact with.
Install Frog on Linux | Flathub
Flathub☂️-
in reply to garrett • • •