A Step-by-Step Guide to Using SpireCV-Pro for Free on WSL
This tutorial will guide you from scratch through setting up the SpireCV-Pro intelligent perception platform in a Windows WSL2 environment and running a YOLO11 object detection visualization example.
01 Install WSL2 + Ubuntu 22.04
1.1 Enable WSL
Open PowerShell as administrator and run:
|
wsl --install |
This command automatically enables WSL2 and installs the default Ubuntu distribution. Restart your computer after the installation completes.
If an older version of WSL is already installed, first upgrade it to WSL2:
|
wsl --update |
1.2 Install Ubuntu 22.04
If Ubuntu 22.04 was not installed automatically in the previous step, install it manually:
|
wsl --install -d Ubuntu-22.04 |
During installation, you will be prompted to create a username and password (remember this password; sudo will be required later).
1.3 Enter WSL
In PowerShell, enter:
|
wsl |
This enters the Ubuntu 22.04 terminal. All subsequent operations are performed in this terminal.
02 Install CUDA for WSL
WSL2 can directly use the NVIDIA driver on the Windows host, so you do not need to install the GPU driver inside WSL.
2.1 Confirm that the NVIDIA driver is installed on Windows
Run the following in Windows PowerShell:
|
nvidia-smi |
If GPU information is displayed, the driver is ready. If not, download and install it from NVIDIA's official website.
2.2 Install the CUDA Toolkit inside WSL
Return to the WSL terminal and run the following commands to install CUDA 12.6 (the WSL-specific version):
|
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin |
2.3 Configure environment variables
|
echo 'export PATH=/usr/local/cuda-12.8/bin:$PATH' >> ~/.bashrc |
Verify the installation:
|
nvcc --version |
03 Install Python 3.10
Ubuntu 22.04 uses Python 3.10 by default. Confirm the version:
|
python3 --version |
If it is not installed or the version is incorrect:
|
sudo apt update |
It is recommended to create a virtual environment:
|
python3.10 -m venv ~/spirecv_env |
04 Install PyTorch (CUDA Version)
|
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128 |
Verify whether PyTorch can use CUDA:
|
python3 -c "import torch; print('CUDA available:', torch.cuda.is_available())" |
Outputting CUDA available: True means the setup is successful.
05 Install SpireMS
SpireMS is the communication framework for SpireCV-Pro and needs to be installed first.
|
sudo apt update |
Verify the installation:
|
python3 -c "import spirems; print(spirems.__version__)" |
06 Install SpireCV-Pro
6.1 Enter the SpireCV-Pro repository
|
cd ~/spirecv-pro |
6.2 Install dependencies
|
pip install ultralytics |
pip install -e . installs SpireCV-Pro in development mode and also registers the smsrun command-line tool.
6.3 Verify the installation
|
smsrun ls |
If you see the node list and Launch list, the installation was successful. The displayed result is as follows:

07 Run Examples
The two examples below both use built-in video files and do not require a camera.
7.1 Start SpireMS Core
Open a WSL terminal, activate the virtual environment, and start Core:
|
source ~/spirecv_env/bin/activate |
Keep this terminal running. Core is the communication hub for all nodes.
7.2 Example 1: YOLO11 Object Detection Visualization
Open another WSL terminal and run:
|
source ~/spirecv_env/bin/activate |
This Launch file automatically starts three nodes:
|
Node |
Function |
|
pvid |
Reads the built-in drone aerial video (downloads automatically) |
|
pyolo11cuda |
Uses the YOLO11 model for object detection (CUDA acceleration) |
|
pdetvis |
Draws the detection results onto the image and opens a window for display |
Expected result: an OpenCV window pops up; vehicles, pedestrians, and other targets in the image are marked with red boxes, and class names and confidence scores are displayed. Press the q key or Ctrl+C to exit.
Custom parameters:
|
smsrun viddet_yolo11_vis_cuda confidence=0.3 pt_model=sms::yolo11m.pt |
|
Parameter |
Description |
Default |
|
confidence |
Detection confidence threshold |
0.2 |
|
pt_model |
Model (the sms:: prefix downloads it automatically) |
sms::visdrone2019_det-yolo11s... |
|
imgsz |
Inference image size |
1280 |
7.3 Example 2: ArUco Marker Detection and Pose Estimation
|
source ~/spirecv_env/bin/activate |
Started nodes:
|
Node |
Function |
|
pvid |
Reads the built-in marker video (downloads automatically) |
|
paruco |
Detects ArUco markers and estimates the 3D pose |
|
pdetvis |
Draws detection boxes and coordinate axes, and opens a window for display |
Expected result: an OpenCV window pops up; the marker is outlined with a green box, 3D coordinate axes (red X / green Y / blue Z) are drawn, and the marker ID is displayed. Press the q key or Ctrl+C to exit.
Custom parameters:
|
smsrun viddet_aruco_det marker_lengths=[0.05] dictionary_id=4 |
|
Parameter |
Description |
Default |
|
marker_lengths |
Actual marker side length (meters), used for pose estimation |
[0.039] |
|
dictionary_id |
ArUco dictionary ID (10 = DICT_6X6_250) |
10 |
08 FAQ
Q: CUDA nodes do not appear in smsrun ls?
Confirm that PyTorch CUDA is available:
|
python3 -c "import torch; print(torch.cuda.is_available())" |
If it returns False, check whether the Windows NVIDIA driver is installed and whether the WSL version is WSL2.
Q: The prompt says spirems cannot be found?
Confirm that the virtual environment is activated and spirems is installed:
|
source ~/spirecv_env/bin/activate |
Q: How do I view all available Launch files and nodes?
|
smsrun ls # View nodes and Launch files available on the current platform |
09 Next Steps
• Read the SpireCV-Pro manual to learn more features
• Read the SpireMS manual to understand the communication framework
• Try other Launch files, such as multi-object tracking and RTSP streaming
|
|
|
|
SpireCV-Pro Wiki |
SpireMS Wiki |


