## 1 Introduction  
China has a high rate of pork consumption, and with the growth in its population, the country's demand for pork is increasing. In 2021, the Ministry of Agriculture and Rural Development issued the \"14 th Five-Year Plan\" National Animal Husbandry and Veterinary Industry Development Plan, which predicts that by 2025, the output value of the national hog farming industry will reach CNY 1.5 trillion. However, the country is not a breeding power, and there are many problems in China's hog farming, such as high costs, a low degree of automation, and a weak breeding capacity of sows [1]. In particular, the weak breeding capacity of sows is the key problem that restricts large-scale breeding in the hog industry. To realize large-scale pig breeding, how to improve the breeding capacity of sows is an urgent problem. However, sows fertility is affected by many factors, of which sows backfat is significant. Sow backfat is the soft fatty tissue on the back of the sow, and its thickness affects the animal's service life, culling rate, reproductive performance, the performance of its piglets, and intestinal health [2; 3]. Different backfat thicknesses have different effects on sow reproductive performance [4]. The feeding program in production is based on the backfat thickness of sows. Therefore, dynamic detection of sow backfat thickness is an important means to improve sow reproductive performance and production capacity, and it is a powerful guarantee for the economic efficiency of pig farms and the realization of large-scale breeding. Visual inspection is the original method of sow backfat detection, supplemented by pressing, which is subjective, causes stress in sows, and makes it difficult to achieve accurate and real-time measurement [5]. In addition to the visual method, there is also the carcass method, which uses vernier calipers to measure the backfat of the carcass. The measurement results are accurate, but they do not apply to the detection of live pigs, and the workload is large and cumbersome [6; 7]. In 1945, [PERSON] invented the probe method, which opened a new chapter in live measurement and improved the accuracy compared to the visual method. However, the probe method requires piercing into the skin of the pig, causing a strong stress reaction in pigs, which is not conducive to pig production. In the 1950s, [PERSON] applied ultrasonic technology for the first time in the detection of biological tissues, and since then, the ultrasonic method has gradually become the best method for measuring the backfat thickness of live pigs that does not subject them to mechanical damage. Currently, the main method for measuring backfat thickness in live pigs is ultrasound, which requires professionals to draw the backfat position on an ultrasound image according to specialized theories to calculate the backfat thickness. This method reduces the accuracy of the measurement results, is time-consuming and relatively ineffective, is subject to the constraints of the equipment and the influence of the measuring personnel, and is not able to achieve real-time, low-cost contactless measurement of backfat thickness. With the development of deep learning, deep learning-based computer vision technology has been very successful in detecting the behavior, individual weight, and body size of pigs [8; 9; 10; 11; 12]. With great success, it has detection advantages, such as being contactless, real time, automatic, and objective, and it has become possible to establish a model for the contactless measurement of sow backfat thickness using computer vision technology. [PERSON] et al. applied fully convolutional networks (FCNs) to determine pig backfat thickness in ultrasound images. The results showed that the correlation coefficient between the segmentation results and the actual measurement of backfat thickness reached 0.92, and the determination of backfat thickness in the ultrasound images of pigs segmented by FCN had high accuracy [13]. [PERSON] et al.