-
Notifications
You must be signed in to change notification settings - Fork 1
Install Windows Subsystem for Linux (WSL) to use Local AI Models
For local services on desktops and laptops, the VHToolkit uses a local endpoint wrapped around an AI model, which are often developed on Linux with Python. These can run on Windows with the Windows Subsystem for Linux (WSL).
To install WSL, follow instructions on https://learn.microsoft.com/en-us/windows/wsl/install.
Conda enables developers to set up encapsulated Linux / Python development environments, keeping all dependencies isolated per feature (e.g., local sensing, local LLM). To install Conda / MiniForge, download and run the Windows installer from https://conda-forge.org/download. Alternatively, detailed information and instructions to install from the WSL command line are at https://github.com/conda-forge/miniforge.
To launch WSL, first open a command line with Windows key + R, and type 'cmd'. In the new command line window, type:
wsl ~
This opens the prompt in your Linux home folder.
Conda is used to create separate environments for each locally running service in order to isolate dependencies. We use the following naming convention: <type>_<tech-name>_env, where type is nlp, asr, tts, etc. For example: asr_whisper_env, nlp_rasa_env, sen_deepface_env. To create a Conda environment, type:
conda create -n <env-name> python=3.xx
conda init
conda activate <env-name>
Here is a full example of how to set up a local sensing solution called DeepFace, a light, open source suite of facial recognition related packages. We run DeepFace as a local endpoint Python server that the VHToolkit connects to.
Open a command line (Windows key + R > type ‘cmd’) and type:
wsl ~
conda create -n sen_deepface_env python=3.12
conda init
conda activate sen_deepface_env
When in the correct environment (conda activate sen_deepface_env), type:
pip install deepface==0.0.92
pip install tf-keras==2.16.0
When in the correct environment (conda activate sen_deepface_env), type:
run DeepFace: python %CONDA_PREFIX%/Lib/site-packages/deepface/api/src/api.py
- Make sure the local DeepFace endpoint server is running following the instructions above
- In Unity, go to the Sensing debug menu
- Click DeepFace to select the proper system
- Click Webcam Off to toggle the webcam
- Results are seen on the webcam video view and in the Console
- Note that the first time DeepFace is activated from Unity, it will download its models, which may take a while