Abstract In modern swine production, most of the sows are housed in a cage system in the farrowing unit. Although this system is intended to reduce preweaning mortality, the welfare of the sow might be compromised as it greatly restricts their natural behavior. Free farrowing systems allow sows to move around in the farrowing pen, which might stimulate their nesting behavior, shorten the farrowing duration and improve locomotion score, therefore, optimizing the longevity of the sows. However, the risk of increased preweaning mortality in free farrowing systems is greater compared with cage systems. Previous studies suggested that sow behavior, also known as mothering ability, can influence preweaning mortality as an increased level of posture changes could lead to increased mortality. With grunts, a sow could initiate the suckling of the piglets but also terminate it by hiding her udder from the piglets. However, there is conflicting evidence on what characteristics of maternal ability are correlated with piglet mortality, and most studies relied on limited manual observations, which might be biased. Using computer vision algorithms, the behavior and the movement pattern of a large number of sows could be monitored at a high density and on a continuous basis. Hence, this study intended to investigate the mothering ability of sows in free farrowing systems based on large quantities and unbiased observations using computer vision. Forty cameras were installed above free farrowing pens to observe the behavior of the sow. The dataset is continuously growing and will add data of 8 sows every week, totaling 416 sows on a yearly basis. The performance of the sows and their piglets are recorded, including body weight (BW), backfat, total number born, number weaned, birth weight, and weaning weight. Computer vision algorithms (YOLO) will be trained to estimate the contour and posture of the sow and the position of the piglets. Preliminary results based on a small subset of animals showed that the algorithm is able to detect the sows and their postures accurately, and it is now being extended to detect piglet locations. This will allow us to find beneficial behavior of sow and piglets, estimate genetic parameters for potential implementation in breeding programs, and eventually improve sow performance in a welfare-friendly free farrowing system.