Fig. 2: Computer vision can capture struggling bouts during restraint stress and show that bout number increases with rimonabant.

a Pipeline schematic. Head-attached fiber (blue dot) and the tail tip (red dot) were tracked. b Example output from 30-min restraint test. Head movement speed (dark blue) and tail movement speed (dark red). Shading colors: full body (purple), head (light blue), and tail (light red). c–f Data from 136 trials (30-min each) with a total of 60,456 bouts. Each point represents the average number of bouts from one 30-min trial. Purple: full body movements. Light blue: head only movements. Light red: tail only movements. c Movement bouts by type. One-way ANOVA F(2, 397) = 200.3, P < 0.0001; Bonferroni post hoc analysis: **P = 0.0014 for full body vs. head only; ****P < 0.0001 for full body vs. tail only; ****P < 0.0001 for head only vs. tail only. d Total time spent in each bout type. One-way ANOVA F(2, 397) = 587.2, P < 0.0001; Bonferroni post hoc analysis: ****P < 0.0001 for full body vs. head only; ****P < 0.0001 for full body vs. tail only; ****P < 0.0001 for head only vs. tail only. e Length of each bout type. One-way ANOVA F(2, 397) = 335.6, P < 0.0001; Bonferroni post hoc analysis: ****P < 0.0001 for full body vs. head only; ****P < 0.0001 for full body vs. tail only; P = 0.47 for head only vs. tail only. f Percent of trial spent on each bout type. Light gray: immobile. g Schematic. h Mean number of detected full body, overlapping head and tail movement bouts, (purple bars from b) by day. (n = 14 mice). Mixed-effects model Dunnett’s multiple comparisons test ***P = 0.0002 for day 1 vs. day 5; *P = 0.0288 for day 2 vs. day 5; **P = 0.0025 for day 3 vs. day 5; **P = 0.0048 for day 4 vs. day 5; P = 0.1138 for day 6 vs. day 5. Colors: i.p. saline (blue) or rimonabant (peach). c–e, h Distribution indicated with split violin normalized to width. Median, quartiles, and 1.5 × the interquartile range are indicated with the associated box plot.