Excessive weight variation among slaughtered fattening pigs has posed a practical challenge on the economic benefits of pig farm in recent years. Therefore, live weight homogeneity of pig batches during fattening has drawn great interest in the pig industry. In this study, an automatic sorting system was developed for the growing and fattening pigs, using the machine vision technology and Convolutional Neural Network (CNN) framework, in order to reduce the weight variation among pigs, and further to save labor in the subsequent process. A CNN model in the system was used to estimate the weight of pigs, instead of ground scale. This arrangement can effectively avoid the influence of manure on the surface corrosion and the accuracy of facilities. The back images (200×100 pixels) of pigs served as the input data in the model, thereby to estimate the weight of pigs ranging from 25 to 102 kg with the accuracy of 93%, and the average estimated time of 0.16 s. In view of changing every day, the standard value of sorting was set as the 30th percentile of pigs weight from the previous day in an ascending order. The pigs that heavier than the baseline were considered as the fast-growing pigs (FP), otherwise, they were supposed as the slow-growing pigs (SP). The modelling system was performed on the LabVIEW software development platform and internet of things, where the average time for each pig to pass through the system was 6.2 s. Field experiments were carried out to verify the application effect of the system at a commercial pig farm in Shandong province in March, 2019. The experimental pig house was divided into 12 pens, four of which were merged and installed with the sorting system. The experimental pen (EP) consisted of the feeding area for FP, feeding area for SP, and lying area. The pigs fed in EP were treated as the experimental group. Specifically, the pigs first passed through the sorting system before feeding, and then entered the corresponding feeding area after being marked as SP or FP. Therefore, two groups each time, including SP and FP, were categorized after the pigs were fed. The pigs in other four unmodified pens were regarded as the control group, in which the pigs were fed and sorted by traditionally manual method. At the beginning of the experiment, the initial average weights of the pigs in the experimental and control group were 32.21 and 31.76 kg, with the values of standard deviation (SD) of 2.61 and 2.49 kg, respectively. At the end of experiment, the average weights of the pigs in the experimental and control group were 57.68 and 57.41 kg, where the values of SD were 5.26 and 5.51 kg, and the total feed-to-meat ratios were 2.31 and 2.34 kg, respectively. The number of pigs in the weight range of 45-50 kg in the experimental group was less than that of control group. There was no significant difference in the average weight, SD, and total feed-to-meat ratio between the two groups during the experiment. In the early stage of the experiment, the weight variance of the experimental group increased faster than that of the control group, for the reason that the grouping system was not activated, and then the change was slower than that of the control group. The results indicated that the proposed system can be equivalent to the manual adjustment for the group feeding of pigs, while, the sorting system can be used for group feeding to save labor. The findings can also provide a sound theoretical reference for the development of intelligent pig feeding equipment, such as sow feeding and breeding station in the pig industry. [ABSTRACT FROM AUTHOR]