The experimental work was conducted at Furture Artificial Intelligence Tech, Jeonbuk National University during the period from January 2025 to December 2025.
Data set
The data used in this study was taken from Zenodo, an open source for studying poultry feces
(Machuve et al., 2021). The data consists of a total of 8,420 high resolution poultry feces images. Samples were classified into four classes: Coccidiosis, Newcastle Disease, Salmonella and Normal. In the model proposed in this study, all images went through a standardized preprocessing pipeline, including resizing and normalization, as shown in Fig 1, to enhance the feature extraction capability and allow the model to focus on key pathological indicators.
Fig 1 shows the process of converting raw data into model input data through data cleaning, resizing and feature-specific normalization to ensure the stability and accuracy of the Fecal-DANet model. This pipeline is intended to enable the deep learning model to learn representative pathological characteristics of poultry rather than noise such as background noise or lighting changes in the data.
Original image acquisition
The fecal images used in this study were obtained from Zenodo, an open academic data source. This image data includes various backgrounds, noise and environmental elements of the location where the image was obtained. Additionally, when obtaining images with a camera, problems related to the environment, such as light intensity and illumination, are also included. These noises are disadvantageous factors in classifying diseases.
Data cleaning
The raw data taken at the farm is mixed with shadows due to changes in light brightness, blurred colors and surrounding environments such as feces on the floor, resulting in lower recognition rates. To solve this problem, a high resolution fecal image must be created through a purification process.
Consistent size adjustment
Fine traces of blood or mucus in the image of poultry will reduce the recognition rate. To solve this, we adjust the image to 224*224 pixels, which is the size with the best recognition rate.
Normalization
As the neural network layers of deep learning become deeper, the distribution of input data changes. Regularization is necessary to ensure that the proposed model training can reach a steady state.
The data refined through this process is used as high-resolution input data in the feature extraction or classification stage.
The data set in Table 1 is classified into normal, Newcastle disease, salmonellosis and cocidiasis and has a total of 8,420 pages. Classification was done in a balanced manner to avoid focusing on one disease. In other words, when evaluating the proposed model, it was designed so that the results did not favor only certain diseases. In addition, overfitting, where the model becomes too familiar with only the training data and reduces recognition performance for new data, was prevented. The data set ratio was 80% for training, 10% for validation and 10% for testing, which is ideal for deep learning. Through this distribution, Fecal-DANet can learn the color and morphological changes of feces for all infected diseases.
Fig 2 shows the feces for each disease used in this study.
(1) Normal: The feces are hard, brown and mixed with clear white urate.
(2) Cocidosis: It has red, hemorrhagic mucus and a watery texture.
(3) Newcastle disease: It has a green bile color and contains a lot of moisture.
(4) Salmonellosis: Yellow mucoid excrement mixed with cream-colored excrement.
Since feces are not clearly distinguished, this study used a mixture of separate group attention (DGA) and multi-kernel group convolution (MKGC) to learn the characteristics of various colors and shapes in order to better recognize these fine details. Disjoint group attention (DGA) is a technique that independently and precisely extracts fine features of color or shape through an attention mechanism separated by group. Multi kernel group convolution (MKGC) is a technology that effectively recognizes lesions of various sizes (mucus, blood stains,
etc.) at the same time by grouping and calculating kernels of various sizes.
Fecal-DANet
Fecal-DANet is engineered to enhance the recognition rate of minute pathological indicators in poultry feces. As illustrated in Fig 3, the architecture follows an encoder-decoder framework.
Encoder (Feature extraction)
The encoder extracts complex fecal characteristics using Multi-Kernel Group Convolution (MKGC) blocks instead of standard layers. By processing 3 *3 and 5 * 5 kernels in parallel, the model simultaneously identifies obscure bleeding and diverse fecal discolorations. Group Normalization ensures training reliability by maintaining consistent neural network performance.
Decoupled group attention (DGA)
Positioned at the core of Fecal-DANet, the DGA module redefines encoded high-dimensional feature maps from a pathological perspective. DGA utilizes a decoupled structure that calculates channel and spatial attention through independent paths to suppress inter-channel interference. Channel attention amplifies disease-specific features, while spatial attention focuses on localized lesions. This mechanism enables the model to exclude environmental noise, such as contaminants or lighting, ensuring focused inference on fine fecal textures.
Decoder and skip connection
The decoder reconstructs compressed feature maps for optimal classification. Skip connections are applied to preserve high-resolution spatial information potentially lost during down-sampling. By bypassing detailed features directly to the decoder, the model distinguishes subtle texture differences without information loss.
Classification head
Data is summarized into feature vectors through Global Average Pooling (GAP). Finally, a Softmax activation function yields probability values for four categories: coccidiosis, Newcastle disease, salmonellosis and normal, outputting the highest probability as the final diagnosis.
Multi kernel group convolution (MKGC)
MKGC divides kernels into groups to capture features at various scales. Unlike standard convolutions, MKGC operates dual kernels (3 *3 and 5 *5) as shown in Fig 4(a). This allows the filter to identify both local details, such as minute blood spots and broader elements like overall fecal shape or color distribution. Group convolution enhances computational efficiency and prevents overfitting by limiting model complexity, distinguishing this approach from previous CNN-based studies.
Detachable group attention (DGA)
As shown in Fig 4(b), the DGA module separates spatial and channel information to refine feature maps. Given that poultry diseases present independent features-such as chromaticity (bile or blood) and morphology (mucus or wateriness)-DGA processes them through independent heads. The texture attention head recognizes fecal structures (hardness, wateriness), while the color attention head identifies specific pathological colors. This separation allows the model to diagnose diseases with high precision.
In the Fig 4(a), the generated feature maps are concatenated and then compressed using 1 * 1 convolutional layers to produce a unified representation.
Fig 4(b) is the structure of the DGA module. This module contains two independent attention branches that process texture related information and color related information separately. This separation strategy allows the model to highlight disease related visual indicators more effectively, ultimately improving the reliability of the classification results.
Experimental setup and training
In this section, we detail the computational environment and specific learning settings to ensure the reproducibility and technical validity of the results.
The proposed Fecal-DANet is implemented using the TensorFlow/Keras framework on the NVIDIA GPU environment, which provides the required parallel processing power for multi-kernel group convolution operations. One of the drawbacks of deep learning models is that they fall into local minima. Therefore, in order to optimize this Fecal-DANet, the learning rate is 0.0001 and a pathfinding algorithm that controls direction and speed was used. This is called Adam Optimizer.
In this study, Categorical Cross-entropy was adopted as the loss function to optimize multi-class classification performance. This led the model to learn the probability distribution for the four disease categories closer to the correct label.
In order to evaluate whether the learning model proposed in this study is a reliable model, an experimental evaluation was conducted by setting the training data at 80%, the verification data set at 10% and the test data set at 10% out of a total of 8,420 pieces of data. And if the learning does not work properly even after learning it 5 times, it is a waste of time and the performance does not improve, so we set it to stop learning at that time.
Table 2 shows the hyperparameters used when learning this model. The learning rate was optimized to 0.0001. These hyperparameters are generally known to be very effective against overfitting in deep learning, so they were also used in this model. This optimized learning rate ensures that the multi kernel group convolution does not exceed the global minimum of the loss function, enabling accurate learning and recognition of microscopic diseases such as mucus from salmonellosis in poultry and bleeding traces from cocidiosis.
To enhance generalization ability and mitigate the risk of overfitting, we incorporated a dropout rate of 0.25 in fully connected layers (dense layers).
Moreover, in a deep learning model, if the image is too large, learning will be slow and if the image is too small, fine evidence such as traces of blood or mucus will be lost, so the balance of image resolution is very important. Therefore, this study used 224*224 resolution. As a result of experimental evaluation using these data, the final test result was 98.89%.