Developing new methods to detect biomass information on freshwater fish in farm conditions enables the creation of decision bases for precision feeding. In this study, an approach based on Keypoints R-CNN is presented to identify species and measure length automatically using an underwater stereo vision system. To enhance the model’s robustness, stochastic enhancement is performed on image datasets. For further promotion of the features extraction capability of the backbone network, an attention module is integrated into the ResNeXt50 network. Concurrently, the feature pyramid network (FPN) is replaced by an improved path aggregation network (I-PANet) to achieve a greater fusion of effective feature maps. Compared to the original model, the mAP of the improved one in object and key point detection tasks increases by 4.55% and 2.38%, respectively, with a small increase in the number of model parameters. In addition, a new algorithm is introduced for matching the detection results of neural networks. On the foundation of the above contents, coordinates of head and tail points in stereo images as well as fish species can be obtained rapidly and accurately. A 3D reconstruction of the fish head and tail points is performed utilizing the calibration parameters and projection matrix of the stereo camera. The estimated length of the fish is acquired by calculating the Euclidean distance between two points. Finally, the precision of the proposed approach proved to be acceptable for five kinds of common freshwater fish. The accuracy of species identification exceeds 94%, and the relative errors of length measurement are less than 10%. In summary, this method can be utilized to help aquaculture farmers efficiently collect real-time information about fish length.
In this paper, a portable electronic nose, that was independently developed, was employed to detect and classify a fish meal of different qualities. SPME-GC-MS (solid phase microextraction gas chromatography mass spectrometry) analysis of fish meal was presented. Due to the large amount of data of the original features detected by the electronic nose, a reasonable selection of the original features was necessary before processing, so as to reduce the dimension. The integral value, wavelet energy value, maximum gradient value, average differential value, relation steady-state response average value and variance value were selected as six different characteristic parameters, to study fish meal samples with different storage time grades. Principal Component Analysis (PCA) and Linear Discriminant Analysis (LDA), and five recognition modes, which included the multilayer perceptron neural network classification method, random forest classification method, k nearest neighbor algorithm, support vector machine algorithm, and Bayesian classification method, were employed for the classification. The result showed that the RF classification method had the highest accuracy rate for the classification algorithm. The highest accuracy rate for distinguishing fish meal samples with different qualities was achieved using the integral value, stable value, and average differential value. The lowest accuracy rate for distinguishing fish meal samples with different qualities was achieved using the maximum gradient value. This finding shows that the electronic nose can identify fish meal samples with different storage times.
Internal body temperature is the gold standard for the fever of pigs, however non-contact infrared imaging technology (IRT) can only measure the skin temperature of regions of interest (ROI). Therefore, using IRT to detect the internal body temperature should be based on a correlation model between the ROI temperature and the internal temperature. When heat exchange between the ROI and the surroundings makes the ROI temperature more correlated with the environment, merely depending on the ROI to predict the internal temperature is unreliable. To ensure a high prediction accuracy, this paper investigated the influence of air temperature and humidity on ROI temperature, then built a prediction model incorporating them. The animal test includes 18 swine. IRT was employed to collect the temperatures of the backside, eye, vulva, and ear root ROIs; meanwhile, the air temperature and humidity were recorded. Body temperature prediction models incorporating environmental factors and the ROI temperature were constructed based on Back Propagate Neural Net (BPNN), Random Forest (RF), and Support Vector Regression (SVR). All three models yielded better results regarding the maximum error, minimum error, and mean square error (MSE) when the environmental factors were considered. When environmental factors were incorporated, SVR produced the best outcome, with the maximum error at 0.478 °C, the minimum error at 0.124 °C, and the MSE at 0.159 °C. The result demonstrated the accuracy and applicability of SVR as a prediction model of pigs′ internal body temperature.
15 February 2025 in Computers and Electronics in Agriculture
Backfat thickness (BF) is closely related to the service life and reproductive performance of sows. The dynamic monitoring of sows’ BF is a critical part of the production process in large-scale pig farms. This study proposed the application of a hybrid CNN-ViT (Vision Transformer, ViT) model for measuring sows’ BF to address the problems of high measurement intensity caused by the traditional contact measurement of sows’ BF and the low efficiency of existing non-contact models for measuring sows’ BF. The CNN-ViT introduced depth-separable convolution and lightweight self-attention, mainly consisting of a Pre-local Unit (PLU), a Lightweight ViT (LViT) and an Inverted Residual Unit (IRU). This model could extract local and global features of images, making it more suitable for small datasets. The model was tested on 106 pregnant sows with seven randomly divided datasets. The results showed that the CNN-ViT had a Mean Absolute Error (MAE) of 0.83 mm, a Root Mean Square Error (RMSE) of 1.05 mm, a Mean Absolute Percentage Error (MAPE) of 4.87% and a coefficient of determination (R-Square, R2) of 0.74. Compared to LviT-IRU, PLU-IRU and PLU-LviT, the CNN-ViT’s MAE decreased by more than 12%, RMSE decreased by more than 15%, MAPE decreased by more than 15% and R² improved by more than 17%. Compared to the Resnet50 and ViT, the CNN-ViT’s MAE decreased by more than 7%, RMSE decreased by more than 13%, MAPE decreased by more than 7% and R2 improved by more than 15%. The method could better meet the demand for the non-contact automatic measurement of pregnant sows’ BF in actual production and provide technical support for the intelligent management of pregnant sows.