Real-Time video tracking and E-stimulation in mouse

I would like to develop a Real-Time mouse/rat hind-limb tracking with multiple markers (ie Knee, Ankle and Toe). I would like to apply a stimulation parameter/threshold on the Toe position, where when the toe falls below threshold as shock is sent to the TA muscle. I am very new to Python and to DeepLabCut3. I’ve read as much I can but need everyone’s help.

  1. Can I use DeepLabCut3?
  2. Anyone have experience on potential lag between real-time frame processing and stim output generation?
  3. Anyone use Optitrack Prime 13 camera and DeepLabCut?

Thank you