An activity pattern describes variations in activities over time. The objectives of this study are to automatically predict sow activity from computer vision over 11 days peripartum and estimate how sow behavior influences piglet's performance during early lactation. The analysis of video images used the convolutional neural network (CNN) YOLO for sow detection and posture classification of 21 Large White and 22 Meishan primiparous sows housed in individual farrowing pens. A longitudinal analysis and a clustering method were combined to identify groups of sows with a similar activity pattern. Traits under study are as follows: (i) the distribution of time spent daily in different postures and (ii) different activities while standing. Six postures were included along with three classes of standing activities, i.e., eating, drinking, and other, which can be in motion or not and root-pawing or not. They correspond to a postural budget and a standing-activity budget. Groups of sows with similar changes in their budget over the period (D-3 to D-1; D0 and D1–D7) were identified with the k-means clustering method. Next, behavioral traits (time spent daily in each posture, frequency of postural changes) were used as explanatory variables in the Cox proportional hazards model for survival and in the linear model for growth. Piglet survival was influenced by sow behavior on D-1 and during the period D1–D7. Piglets born from sows that were standing and doing an activity other than drinking and eating on D-1 had a 26% lower risk of dying than other piglets. Those born from sows that changed posture more frequently on D1–D7 had a 44% lower risk of dying. The number of postural changes, which illustrate sow restlessness, influenced piglet growth in the three periods. The average daily gain of piglets born from sows that were more restless on D1–D7 and that changed posture more frequently to hide their udder on D0 decreased by 22 and 45 g/d, respectively. Conversely, those born from sows that changed posture more frequently to hide their udder during the period of D1–D7 grew faster (+71 g/d) than the other piglets. Sow restlessness at different time periods influenced piglet performance.