Lightning Pose is a FOSS (Free and Open-Source Software) package for PCA and k-mean based pose estimation and motion tracking with semi-supervised machine learning, which was published by Dan Biderman as His paper. In original repository, Windows (but WSL) and Ubuntu (18.04, 22.04, and 24.04) are officially supported, not Arch Linux. So, I made this install guide for Arch Linux.
Execute like the below.
./lightningposeinstall.sh 2>&1 | tee lightningposeinstall_stdouterr.txt
or if you haven't configure your NVIDIA GPU, clone my nvidia repository first.
git clone https://github.com/d3f4l7d/archresearch.git ~/.config/d3f4l7d/archresearch
And execute like the below.
cd ~/.config/d3f4l7d/archresearch
chmod +x nvidiainstall.sh
./nvidiainstall.sh 2>&1 | tee nvidiainstall_stdouterr.txt
- Enter your python venv via
pyenv activate <yourvenvname>~/.pyenv/versions//bin/litpose run_app does not work BTW - Run app via
litpose run_app
Tip
Also LP_IGNORE_UPGRADE=1 DO_NOT_TRUCK=1 litpose run_app works w/o any upgrade or Umami web event tracking.
In case you upgrade the app, execute like the below.
pip install --upgrade pip and,
pip install --upgrade lightning-pose-app
Then, click the link to your localhost server (http://localhost:8080).
Tip
You could literally ignore and keep using your favorite browser (at least librewolf) even if there's the msg like: "Browser other than Chrome detected. Switch to Chrome for Labeling and Viewing keypoints."
- Click 'New Project'
- Select 'From Scratch'
- Fill 'Project Name' in "Local setup" (e.g., pr0j3c7)
- Check 'Data directory' in "Local setup" (e.g.,/home/$USER/LPProjects/pr0j3c7, ~ or - are not acceptable.)
- Add 'Keypoints names' in "Keypoints" (e.g., sigmaA (\n) sigmaB (\n) ... (\n) sigmaH)
- Add 'Camera view names' in "Multiview" (e.g., top (\n) front, add the view name only.)
Caution
Fill the view name only (e.g., top, front, side) otherwise the name is invalid.
Tip
Close server via ctrl + c to load if Project settings was renewed.
- Hit 'Save'
- Hit green [+] on top left.
- Check 'New label file' in "Label file" (only CollectedData.csv is acceptable)
- Hit 'Continue'
- Hit 'Upload a new session' (e.g., <yourvideoheader_top.mp4>)
- Hit 'Choose videos'
- Hit 'Import'
- Enter a number of extraction (e.g., 20 => 200, extraction should be once in a same vid, otherwise imgs are overlapping)
- Label those frames (Takes 85% of your time BTW)
- Hit 'Save and next' (or 'Save')
- New model
- Model name (e.g., srn50802003000032)
- Model type (e.g., Supervised resnet50)
- Labeled frames (e.g., CollectedData.csv)
- Train/val split (e.g., Train prob:0.95 => 0.80, Val prob:0.05 => 0.20, Random seed:0)
- Duration (e.g., epochs:300 => 30000)
- Batch size (e.g., 16 => 32)
- (Wait until status:COMPLETED)
- Run inference
- Choose videos
- Import (upload + transcode)
- Run inference
- (Check predictions)
MIT License - see LICENSE for more details.