Migrating to the Appο
From the old appο
These instructions convert a singleview project directory from the old app to make it compatible with the new app.
1. Copy the old appβs project directory out into a new folder to work on:ο
# Copies project directory from old path to new location.
cp -r ~/Pose-app/data/PROJECT_NAME ~/LPProjects/PROJECT_NAME
2. Fix data directory structureο
The old app directory structure is as follows:
PROJ_DIR/
βββ labeled-data/
| βββ session0/
| βββ selected_frames.csv
βββ videos/
βββ videos_infer/
βββ CollectedData.csv
βββ label_studio_config.xml
βββ label_studio_metadata.yaml
βββ label_studio_tasks.pkl
βββ model_config_<PROJ_NAME>.yaml
βββ models/
βββ YYYY-MM-DD/
βββ HH-MM-SS_model_name/
βββ video_preds_infer/
The task is to make the directory structure conform to the specification in Singleview Data Directory Structure.
The following changes are required:
Create a
project.yamlfile in the project data directory per the docs.Add the project to
~/.lightning-pose/projects.toml, following the guide at Add an existing project directory.Copy all videos from the
videos_infertovideosdirectory. (Required to see these in the viewer.)Rename the video prediction directory in the model directories from
video_preds_infertovideo_preds.
The following are recommended, but not strictly required:
Remove
label_studiofiles. If you had unlabeled frames in the labeling queue, these will be lost and need to be re-extracted. Alternatively, manually migrate these using the to unlabeled sidecar format.Remove
model_config_<PROJ_NAME>.yamlfile, as its no longer used.Use ffmpeg to re-encode videos such that every frame is an Intra frame. This is required in order for the app viewer to be 100% frame-accurate, but not strictly required otherwise.
Thatβs it. Next time you run the app and you should see your new singleview project.
From the CLIο
The task is to make the directory structure conform to the specification in Singleview Data Directory Structure or Multiview Data Directory Structure, depending on your project type.
The app should work with just the following:
Create a
project.yamlfile in the project data directory per the docs.Add the project to
~/.lightning-pose/projects.toml, following the guide at Add an existing project directory.
Simplest exampleο
If your current directory structure is:
~/data/
~/lightning-pose/outputs/
Then you can add a projects.yaml file at ~/data/project.yaml, and
add the following to ~/.lightning-pose/projects.toml:
[example-project]
data_dir = "/home/username/data"
model_dir = "/home/username/lightning-pose/outputs"
You should consider:
Moving models into data directory so itβs one directory, rather than having models and data be separate.
If you do this, you can remove the
model_dirattribute from the projects.toml file.
Verify that the following against the Directory Structure docs:
Label files are stored as expected
Extracted frames are stored as specified
Multiview: verify calibration file naming