| With the development of our country’s economy and society,people’s demand for highquality meat has grown rapidly.Therefore,our country’s pig breeding industry has ushered in an industrial upgrade,and large-scale,intensive,and factory-based breeding pattern have become the mainstream.Large-scale farms have automated environmental control equipment,but most of the small and medium-sized farms still keep the traditional breeding mode due to lack of funds and technologies for upgrading breeding house.The monitoring and control of pig house environment and pig condition is relatively backward,which restricts the process of agricultural modernization in China.In this paper,combined with the Internet of Things and artificial intelligence technology,a set of pig house monitoring system with high integration,complete functions and easy to use is designed.The research contents include the following aspects:First of all,combined with the system requirements,we designed a combination of server,microprocessor,cloud platform and mobile APP,designed system functions,and built system hardware terminals.Then we carry out the terminal program design,which can monitor the light intensity,temperature and humidity,ammonia gas concentration,flame,raindrops and human body sensing data in the pig house and each data is displayed on the LCD screen.Two control modes named automatic-mode and manual-mode,are designed to control the operation of electrified equipment and maintain the stable environment of the pig house.Secondly,combined with ESP8266 WIFI module and Gizwits cloud platform we achieve the function of data communication.we can use the Jiguang push platform to push alarms when flames detected and sent text messages or emails when pedestrians are detected t.Based on the SDK library file of Gizwits,we have designed a mobile APP,through which breeders can know about the pig house environment and pig information,switch working modes,and remotely control the operation of equipment working in the pig house.Finally,the pig detection algorithm based on computer vision is applied.The YOLOv4 algorithm is used to detect the pigs in the pig-house,and the Kalman filter and the Hungarian matching method are used to realize the accurate tracking of pig trajectories and segmentation.The algorithm is able to obtain the number of pigs,movement trajectories,and segmentation mask,whose information(only text data)is transmitted through the cloud platform,laying a technical foundation for further pig health analysis.The paper expounds the significance of the development of the pig house monitoring system,and the preset functions are successfully completed.Through the experimental verification of various functions,the system can ensure that pigs grow in a suitable environment and promote growth;it can improve the efficiency of pig house breeders,reduce work intensity of breeder,and meet the design requirements. |