-
Notifications
You must be signed in to change notification settings - Fork 14
CPR Tracking in the Labeler
Create a CPR parameters file. An example is in <CPR>/param.example.yaml; you can copy this file and edit for your project. At this stage of development, many of the CPR parameters are not well-documented. Some of the listed parameters are unused, while others (such as those related to how features are generated) may be critical to good tracking. Please work with Bransonlab to help configure your project.
(Setup for using CPR with APT is over-complicated. Work in progress, suggestions welcome :O.)
Open the Labeler as usual. When you create a new project, select CPRLabelTracker for the Tracking selection. If this option is not present, your path may not be configured correctly.
Create/load a project with movies and labels as you normally would.
Set your CPR parameters file using Track>Set parameters file. If you modify your parameters, you need to re-set the parameters file for the changes to take effect.
To select/specify training data, use Track>Select Training Data. This menu item supports selecting of training data via this procedure:
- Start the 'training pool' with any shape (labeled frame) selected at random.
- Select the next shape that is most different (or has the largest 'distance') from all shapes in the training pool, and add it to the training pool. Record the 'distance' of this shape from the pool.
- Repeat step 2. until all labeled frames are used up.
The plot shown shows the distribution of distances generated by this procedure. Shapes selected early in the process are more diverse/different (larger distances); towards the end, the remaining shapes tend to be similar.
The idea is that shapes that are very similar to each other may not add much to the tracking algorithm, as they have been "seen before" and will not add new information. So when specifying/selecting training data, we select the most diverse set of labeled data possible.
To select the training set, click on the plot at the desired threshold. To just use all available labeled data for training, click at the right-most edge of the plot.
At this point you have i) labeled data, ii) CPR parameters, and iii) a specified training set. You can now hit the Train button to train a CPR tracker. This could take some time depending on how much data is being used, how many CPR iterations you have specified, etc.
Select which frames you would like tracked using the pulldown menu next to the Track button. Tracking "every frame in every movie" could take a long time, and also overconsume your computer's resources. I usually just track the current movie at every 10th frame.
When tracking is complete, results will be shown in the main Labeler window. If Track: PredictInterpolate: is set to 1 in your pref.yaml, then tracking results will be automatically interpolated to every frame. The markers shown for "real" tracking results differ slightly from those for interpolated results.
Tracking results will be saved along with projects.
- Tracking diagnostics
- Saving tracking results with project