🧵 How to hand‐correct DeepLabCut 2D Splines - articulateinstruments/AAA-DeepLabCut-Resources GitHub Wiki

DeepLabCut (DLC) splines are freeform splines with no restriction in shape. They are referred to as 2D splines in AAA.

After you finish creating DLC splines, every ultrasound frame or video frame will have a spline keyframe with a unique spline. It is possible to manually edit these from the keyframe tab.

image

To select a single keyframe:

  1. Make sure the Image49 spline tab is selected. Use the image buttons if it is not visible.
  2. Click on a time in the list on the left. The spline will then turn orange to indicate that it has been selected.
  3. The DLC_Tongue spline is controlled by 11 knots (control points) represented by ticks along the contour. Click near a tick and drag to move it around.

If you hold down the key, then click and drag on the Ultrasonic Display, a contour will be drawn with the same number and relative spacing of knots, starting where you first click and ending where the drag ends. You can use this to hand draw the entire contour.

Moving and rotating 2D splines

The Adjust 2D Spline tab offers controls to translate and rotate whole splines. This is not very useful for tongue or lip splines and more often applied to Fiducials. There is also a Snake algorithm. This is intended to iteratively adjust the selected 2D spline to fit to the nearest bright edge. This function is not recommended. Used sparingly (clicked a couple of times) it may move the spline closer to a bright edge but extended use will distort the spline shape.

The image button reveals the parameters for adjusting the Snake algorithm behaviour. But this bright edge hunting algorithm is inferior to DeepLabCut and discouraged. The Track Ultrax button has been deactivated.

image

image

⚠️ **GitHub.com Fallback** ⚠️