Introduction: Attack behavior is common in intensive pig breeding, where the hard conditions of the piggery can lead to illness or even death for the pigs. High labor expenses will result from manually observing and recognizing pig attack behaviors in intensive porcine breeding operations. Objective: This study aims to employ deep learning techniques to identify and classify various aggressive behaviors in pigs, enhancing monitoring efficiency in breeding facilities. Methods: A novel ladybug beetle-optimized adaptive convolutional neural network (LBO-ACNN) was proposed to recognizepig behavior in pig breeding. Pigs' object detection dataset was gathered for this investigation. The data preprocessed using discrete wavelet transform (DWT) eliminates noise from each frequency component by breaking down the image into its elements. The proposed method is implemented using Python software. The proposed method is compared to other algorithms. Result:The investigational outcome shows that the suggestedstrategy accurately identifies pig behaviors, achieving a high F1-score (93.31%), recall (92.51%), precision (94.17%), and accuracy (94.78%) demonstrating its effectiveness in monitoring and classifying behaviors in breeding facilities