Abstract:Automatic recognition of newborn piglets has encountered several challenges such as small targets, ambient light variation, piglet adhesive behavior and object occlusion. A onestage DCNNs method was proposed to automatically and accurately recognize newborn piglets at high computation speed. The method merged classification and localization into one task and took the whole picture as the ROI of feature extraction, then using FPN algorithm to locate and identify piglets, which showed good generalization ability for natural multiinterference scenes. The effects of different channel number data sets and different iterations on the effectiveness of the model were compared. Support for batch image processing, and realtime detection of video and surveillance videos, with multiple storage of detection results. The recognition result of newborn piglets was output into three forms: video, picture and text file. The contents of the text included the number of piglets, the recognition confidence degree and the piglet coordinate. The combination of different output results could identify the state and behavior of piglets. The results showed that when the total amount of the data set was the same, the data set containing both night single channel and daytime three channel was close to the optimal value of the model at 20000 iterations. The precision of the model on the verification set and the test set were 95.76% and 93.84%, respectively, and the recall rates were 95.47% and 94.88%, respectively. The detection speed of the images with a resolution of 500 pixels×375 pixels was 53.19f/s. The video detection speed of 720P was 22f/s. The proposed system can meet the requirement of real time detection of piglets in a farrowing pen.