Add modern Linux setup script, requirements.txt, and update README
This commit is contained in:
parent
b03e5e35ce
commit
8c195e1b7c
3 changed files with 45 additions and 0 deletions
11
README.md
11
README.md
|
|
@ -1,5 +1,16 @@
|
|||

|
||||
|
||||
> **2024/2025 Modernization Fork (OpenSeeFaceFIX)**
|
||||
> This is a modernized fork of OpenSeeFace updated to support the latest 2024+ Python ecosystems and GPU drivers.
|
||||
>
|
||||
> **Updates include:**
|
||||
> - **Numpy 2.0+ Support:** Fixed internal array broadcasting crashes (`.flatten()`) when performing 3D matrix math.
|
||||
> - **OpenCV 5.0+ Support:** Fixed `cv2.solvePnP` crashes by forcing correct initial guess fallback paths.
|
||||
> - **ONNX Runtime 1.29+ / CUDA 13+ Support:** Re-routed the tracker to use the unoptimized `_gpu.onnx` models natively. This completely bypasses the catastrophic `unsupported conv activation mode "LeakyRelu" / "Clip"` crashes caused by the `FusedConv` operations in the original `_opt.onnx` models when running on modern Nvidia CUDA Execution Providers.
|
||||
> - **Modern Setup Script:** Added `Run_Linux.sh` to automatically build an isolated `venv` and dynamically patch CUDA library paths (`LD_LIBRARY_PATH`) so `onnxruntime-gpu` correctly attaches to pip-installed `cu12/cu13` Nvidia libraries without system-level driver hell.
|
||||
> - **Modern Poetry/Pip Support:** Lifted the strict `Python < 3.11` locks.
|
||||
|
||||
|
||||
# Overview
|
||||
|
||||
**Note**: This is a tracking library, **not** a stand-alone avatar puppeteering program. I'm also working on [VSeeFace](https://www.vseeface.icu/), which allows animating [VRM](https://vrm.dev/en/how_to_make_vrm/) and [VSFAvatar](https://www.youtube.com/watch?v=jhQ8DF87I5I) 3D models by using OpenSeeFace tracking. [VTube Studio](https://denchisoft.com/) uses OpenSeeFace for webcam based tracking to animate Live2D models. A renderer for the Godot engine can be found [here](https://github.com/virtual-puppet-project/vpuppr).
|
||||
|
|
|
|||
30
Run_Linux.sh
Executable file
30
Run_Linux.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
# Modern Linux Setup and Launch Script for OpenSeeFace
|
||||
# Automatically provisions a modern Python environment with CUDA 13 support
|
||||
|
||||
# Navigate to the script's directory so it can be run from anywhere
|
||||
cd "$(dirname "$0")" || exit
|
||||
|
||||
echo "Initializing OpenSeeFace Linux Environment..."
|
||||
|
||||
# Create and activate virtual environment if it doesn't exist
|
||||
if [ ! -d "env" ]; then
|
||||
echo "Creating Python virtual environment..."
|
||||
python3 -m venv env
|
||||
source env/bin/activate
|
||||
|
||||
echo "Installing modern dependencies (CUDA 13, ONNXRuntime 1.29.0+, Numpy 2+, OpenCV 5+)..."
|
||||
pip install --upgrade pip
|
||||
pip install onnxruntime-gpu opencv-python pillow numpy nvidia-cublas nvidia-cuda-runtime nvidia-cudnn-cu13 nvidia-cufft nvidia-curand nvidia-cusolver nvidia-cusparse
|
||||
echo "Setup complete!"
|
||||
else
|
||||
source env/bin/activate
|
||||
fi
|
||||
|
||||
# Fix ONNX Runtime missing CUDA 13 libraries by adding pip modules to LD_LIBRARY_PATH dynamically
|
||||
SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])')
|
||||
export LD_LIBRARY_PATH="$SITE_PACKAGES/nvidia/cu13/lib:$SITE_PACKAGES/nvidia/cublas/lib:$SITE_PACKAGES/nvidia/cudnn/lib:$SITE_PACKAGES/nvidia/cufft/lib:$SITE_PACKAGES/nvidia/cuda_runtime/lib:$SITE_PACKAGES/nvidia/cuda_nvrtc/lib:$SITE_PACKAGES/nvidia/curand/lib:$SITE_PACKAGES/nvidia/cusolver/lib:$SITE_PACKAGES/nvidia/cusparse/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
echo "Starting OpenSeeFace Tracker on GPU..."
|
||||
# Execute facetracker
|
||||
python facetracker.py -c 0 -W 1280 -H 720 --discard-after 0 --scan-every 0 --no-3d-adapt 1 --max-feature-updates 900
|
||||
4
requirements.txt
Normal file
4
requirements.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
onnxruntime-gpu>=1.9.0
|
||||
opencv-python>=4.5.4
|
||||
Pillow>=8.4.0
|
||||
numpy>=1.21.3
|
||||
Loading…
Add table
Add a link
Reference in a new issue