-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from dfgHiatus/feat/linux-installer
(feat/fix) Add Linux installer script, fix misc_utils.py, update README
- Loading branch information
Showing
3 changed files
with
139 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,65 @@ | ||
|
||
![Babble Logo](https://github.com/SummerSigh/ProjectBabble/blob/SummerSigh-patch-4/Babble.png?raw=true) | ||
|
||
# Table of Contents | ||
- [What is Babble?](#what-is-babble) | ||
<h3 align="center"> | ||
Project Babble is an open-source mouth tracking project designed to work with any VR headset. We strive to make our models robust to different lighting, cameras, image qualities and facial structures! | ||
</h3> | ||
|
||
## Table of Contents | ||
- [Features](#features) | ||
- [How do I set it up?](#setup-more-detailed-wiki-and-setup-video-coming-soon) | ||
- [Useful Links](#useful-links) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [Links](#links) | ||
|
||
|
||
## What is Babble? | ||
|
||
<p align="center"> | ||
Babble is an opensource mouth tracking project designed to work with any existing VR headset. We strive to make our models robust to different lighting, cameras, image qualities, and facial structures! | ||
</p> | ||
|
||
## Features | ||
- 100% Opensource! 🌟 | ||
- 100% open-source! 🌟 | ||
- Fast and robust! 🚀 | ||
- Works with most existing blendshape standards! ⚙️ | ||
- Works with existing blendshape standards! ⚙️ | ||
- Constantly updated and modified! 🔧 | ||
|
||
## Setup (More detailed wiki and setup video coming soon!) | ||
To install babble is fairly simple! Head over to the releases tab and download the EXE located there. Run the EXE and install babble! After that, you can test with a USB WEBCAM by doing the following steps: | ||
## Installation | ||
### Windows | ||
Head to the releases section and [download the latest installer](https://github.com/Project-Babble/ProjectBabble/releases/latest). | ||
|
||
### Linux | ||
Install `git`, `curl` and a version of `python` greater than `3.8` for your distro. | ||
|
||
Then, copy paste and run the following script into the terminal of your choice: | ||
|
||
```bash | ||
bash -c "$(curl -fsSL https://gist.githubusercontent.com/dfgHiatus/a92a3caae24c1bfab1c7544537a654c5/raw/fc30aa550c3c7aa83c37a72168e75ef92388e39b/project-babble-install.sh)" | ||
``` | ||
|
||
Once it's finished installing, you can update and run the Babble app by typing `babble-app` into your terminal. | ||
|
||
*You should also be able to run the Windows executable through Wine!* | ||
|
||
#### Notes: | ||
If you receive a `["Error listing UVC devices on Linux ... No such file or directory"]` when choosing/changing your camera, you'll need to install video4linux (`v4l-utils`) for your distro. | ||
|
||
For Ubuntu or other distros with apt: | ||
```bash | ||
sudo apt-get install v4l-utils | ||
``` | ||
|
||
If you receive a `ModuleNotFoundError: No module named 'tkinter'` error message on run, you'll need to install `tkinter` for your distro. | ||
|
||
For Ubuntu or other distros with apt: | ||
```bash | ||
sudo apt-get install python3-tk | ||
``` | ||
For Fedora: | ||
```bash | ||
sudo dnf install python3-tkinter | ||
``` | ||
|
||
- Run the babble app | ||
- Enter 0 into the camera address bar | ||
- Enter cropping mode where your camera feed should be | ||
- Crop your mouth out of the frame | ||
- Open VRCFT | ||
- Install the babble module | ||
- Test in VRC with a VRCFT-compatible avatar | ||
You can read more about this [here](https://stackoverflow.com/questions/25905540/importerror-no-module-named-tkinter). | ||
|
||
## Usage | ||
We have integrations for [VRChat](https://docs.babble.diy/docs/software/integrations/vrc), [Resonite](https://docs.babble.diy/docs/software/integrations/resonite) and [ChilloutVR](https://docs.babble.diy/docs/software/integrations/chilloutVR)! | ||
|
||
## Useful links | ||
- [Our Discord!](https://discord.gg/XAMZmjBktk) | ||
- [Wandb Runs](https://wandb.ai/summerai/ProjectBabble) | ||
Looking for something else? Check out our [documentation](https://docs.babble.diy/)! | ||
|
||
## Links | ||
- [Our Discord](https://discord.gg/XAMZmjBktk) | ||
- [Our Twitter](https://x.com/projectBabbleVR) | ||
- [Wandb Runs](https://wandb.ai/summerai/ProjectBabble) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/bin/bash | ||
|
||
# Check if running on Linux | ||
if [[ "$OSTYPE" != "linux-gnu"* ]]; then | ||
echo "Error: This script is only compatible with Linux operating systems." | ||
exit 1 | ||
fi | ||
|
||
# Check Python version | ||
if ! command -v python3 &> /dev/null; then | ||
echo "Error: Python is not installed. Please install Python 3.8 or higher." | ||
exit | ||
fi | ||
|
||
python_version_major=$(python3 -c 'import platform; print(platform.python_version_tuple()[0])') | ||
python_version_minor=$(python3 -c 'import platform; print(platform.python_version_tuple()[1])') | ||
if (( python_version_major < 3 || python_version_minor < 8 )); then | ||
echo "Error: Your Python version is too low! Please install 3.8 or higher." | ||
exit 1 | ||
fi | ||
|
||
# Set installation directory | ||
install_dir="$HOME/.local/share/project-babble" | ||
|
||
# Function to install requirements | ||
install_requirements() { | ||
cd $install_dir | ||
cd BabbleApp | ||
echo "Installing requirements..." | ||
# Create a temporary requirements file without the Windows-only package | ||
grep -v "onnxruntime-directml" requirements.txt > linux_requirements.txt | ||
pip install -r linux_requirements.txt --quiet | ||
rm linux_requirements.txt | ||
} | ||
|
||
# Function to get the latest release tag | ||
get_latest_tag() { | ||
git fetch --tags | ||
git describe --tags --abbrev=0 | ||
} | ||
|
||
# Function to update the repository | ||
update_repo() { | ||
echo "Checking for updates..." | ||
git fetch --tags | ||
local_tag=$(git describe --tags --abbrev=0) | ||
remote_tag=$(git describe --tags --abbrev=0 origin/main) | ||
|
||
if [ "$local_tag" != "$remote_tag" ]; then | ||
echo "New version available: $remote_tag" | ||
echo "Current version: $local_tag" | ||
echo "Updating to the latest version..." | ||
git checkout "$remote_tag" | ||
echo "Updating dependencies..." | ||
source venv/bin/activate | ||
install_requirements | ||
deactivate | ||
echo "Project Babble has been updated successfully to version $remote_tag!" | ||
else | ||
echo "Project Babble is already at the latest version: $local_tag" | ||
fi | ||
} | ||
|
||
|
||
cd $install_dir | ||
cd BabbleApp | ||
|
||
# Create venv if it does not exists | ||
if ! [ -d "venv" ]; then | ||
python3 -m venv venv | ||
fi | ||
|
||
source venv/bin/activate | ||
update_repo | ||
echo "Verifying dependencies. This might take a second!" | ||
install_requirements | ||
echo "Starting Babble app..." | ||
python3 babbleapp.py |