Fuzzy chicken image reconstruction method, device, equipment and medium

By optimizing the super-resolution model for free-range chicken scenarios through regional semantic classification and multi-process degradation processing, the problem of insufficient low-resolution image restoration is solved, and the high-precision reconstruction and generalization capabilities are improved, supporting intelligent visual analysis tasks.

CN122453607APending Publication Date: 2026-07-24SICHUAN CHENGDU CENT AGRI UNIV MODERN AGRI IND RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN CHENGDU CENT AGRI UNIV MODERN AGRI IND RES INST
Filing Date
2026-04-03
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In free-range chicken scenarios, existing technologies cannot effectively recover detailed information from blurry low-resolution chicken images, which limits the accuracy of advanced vision tasks such as object detection and behavior analysis. Furthermore, existing super-resolution models have long training times and insufficient generalization ability.

Method used

By identifying the target and background regions of chickens through regional semantic classification, optimizing the regional distribution, and combining multi-process random combination degradation processing, training samples are generated to build a super-resolution reconstruction model and improve model adaptability.

Benefits of technology

Shorten the training cycle, improve the model's reconstruction accuracy and generalization ability in real-world scenarios, provide high-quality image input support, and enhance the accuracy of subsequent intelligent visual analysis tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122453607A_ABST
    Figure CN122453607A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, and provides a fuzzy chicken image reconstruction method, device, equipment and medium, which comprises the following steps: inputting a fuzzy chicken image into a super-resolution reconstruction model to obtain a super-resolution reconstruction image; wherein the super-resolution reconstruction model is obtained by training based on high-resolution chicken image samples and degraded image samples thereof; the degraded image samples are obtained by the following method: performing regional semantic classification processing on the image, performing regional distribution optimization on the image based on the regional distribution result, and then performing multi-process random combination degradation processing on the optimized image to obtain the degraded image samples. The fuzzy chicken image reconstruction method provided by the application uses the training sample generation logic of regional semantic classification, regional distribution optimization and multi-process random degradation, which can not only reduce the training computing power consumption caused by redundant background, but also fully match the degradation characteristics of a real scene, so that the generalization capability of the super-resolution reconstruction model is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device and medium for reconstructing fuzzy chicken images. Background Technology

[0002] With the development of intelligent poultry farming technology, computer vision-based tasks such as behavior recognition, health monitoring, and population statistics for free-range chickens have become core technologies for improving the efficiency of free-range farming and ensuring animal welfare. In actual free-range chicken scenarios, the farming area is large and the camera deployment points cover a wide range. The collected monitoring images often suffer from problems such as a small proportion of chicken targets at medium to long distances, blurred textures, and low resolution. Low-quality, blurry chicken images cannot provide effective feature input for subsequent advanced vision tasks such as target detection, key point localization, and behavior analysis.

[0003] Image super-resolution reconstruction is a mainstream technique for improving the quality of low-resolution images, but its application, especially in free-range poultry scenarios, still has shortcomings. Images of free-range chickens often contain background regions that account for more than half of the pixels. This means that degradation methods, when randomly selecting degradation regions, are likely to select background rather than the target area itself. Consequently, super-resolution models require extensive training to fully learn the recovery process of the target region. Completely removing the background region using segmentation algorithms leads to a loss of generalization ability and distortion of the background region in the reconstructed image. Furthermore, existing image degradation methods neglect their importance in real-world super-resolution scenarios and the generalization ability of the models. Summary of the Invention

[0004] This application provides a method, apparatus, device, and medium for reconstructing blurry chicken images, in order to solve the problems in the prior art where the degradation process does not take into account the real scene, redundant background information prolongs the training time, and is not conducive to generalization.

[0005] In a first aspect, this application provides a method for reconstructing a blurry chicken image, comprising: Obtain a blurry image of a chicken; The blurred chicken image is input into the super-resolution reconstruction model to obtain the super-resolution reconstructed image output by the super-resolution reconstruction model; The super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples. The degraded image samples were obtained in the following way: The high-resolution chicken image samples are subjected to region semantic classification processing to obtain region distribution results; the region distribution results include chicken target regions and non-target background regions. The goal of region distribution optimization is to increase the proportion of the target chicken region in the high-resolution chicken image samples. Based on the region distribution results, the region distribution of the high-resolution chicken image samples is optimized to obtain optimized chicken image samples. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples.

[0006] In one embodiment, the super-resolution reconstruction model is determined in the following manner: Construct high-resolution chicken image samples; The high-resolution chicken image samples are subjected to block-by-block semantic classification to obtain the region semantic classification results of each image block in the high-resolution chicken image samples. Based on the region semantic classification results, the target chicken region and non-target background region in the high-resolution chicken image samples are determined. Based on the target chicken region, the non-target background region is adaptively replaced to obtain an optimized chicken image sample with optimized region distribution. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples; Based on the high-resolution chicken image samples and their degraded image samples, a preset model is trained to obtain a super-resolution reconstruction model.

[0007] In one embodiment, constructing high-resolution chicken image samples includes: Obtain chicken image samples that meet the preset resolution requirements; Based on the comparison between the resolution of the chicken image sample and the target resolution, an adaptive size adjustment strategy is determined; the adaptive size adjustment strategy includes local cropping of the original image, pixel region stitching, or a combination of both operations. According to the adaptive size adjustment strategy, the resolution of the chicken image sample is adjusted to the target resolution to obtain a high-resolution chicken image sample.

[0008] In one embodiment, the step of performing block-by-block semantic classification on the high-resolution chicken image sample to obtain the region semantic classification result of each image block in the high-resolution chicken image sample, and determining the target chicken region and non-target background region in the high-resolution chicken image sample based on the region semantic classification results, includes: The high-resolution chicken image samples are input into the image patch semantic discrimination model to obtain the region semantic classification results of each image patch in the high-resolution chicken image samples output by the image patch semantic discrimination model; the image patch semantic discrimination model is obtained by training the model based on chicken images and their region semantic category labels, and the region semantic category labels are composed of the region semantic categories of each image patch in the chicken image; Image blocks whose semantic classification result is chicken target category are identified as chicken target regions, and image blocks whose semantic classification result is non-target background category are identified as non-target background regions.

[0009] In one embodiment, the image patch semantic discrimination model is used for: The high-resolution chicken image samples are downsampled and features are extracted to obtain feature maps; The feature map is subjected to dense connection processing to obtain an image patch feature sequence; the image patch feature sequence includes the feature vector of each image patch in the high-resolution chicken image sample; Regional semantic discrimination is performed on the feature vectors of each image patch to obtain the regional semantic classification results of each image patch.

[0010] In one embodiment, the step of adaptively replacing the non-target background region based on the target chicken region to obtain an optimized chicken image sample with optimized region distribution includes: Determine the largest connected region in the non-target background region, and determine the window based on the bounding box of the largest connected region; A sliding window is used to traverse all regions in the high-resolution chicken image sample to determine the matching degree between the chicken target region within the window and the maximum connected region; the matching degree is the maximum number of image blocks whose relative positions overlap between the chicken target region within the window and the maximum connected region. Replace the maximum connected region with the adaptation region corresponding to the window position with the highest matching degree, update the non-target background region, and iteratively execute the steps of determining the maximum connected region in the non-target background region and determining the window based on the bounding box of the maximum connected region until there is no connected region in the non-target background region, thus obtaining the optimized chicken image sample with optimized region distribution.

[0011] In one embodiment, the step of performing multi-process random combination degradation processing on the optimized chicken image samples to obtain degraded image samples includes: The execution order of blurring, noise addition, and downsampling operations is randomly shuffled to obtain a variety of random combinations of degradation processing flows. Among them, the blurring operation uses a combination of isotropic and anisotropic Gaussian kernels, the noise addition operation randomly selects from Gaussian noise, JPEG compression noise, and camera sensor noise, and the downsampling operation randomly selects from bicubic downsampling, bilinear downsampling, nearest neighbor interpolation downsampling, and downsampling followed by upsampling. According to the degradation processing procedure with multiple random combinations, the optimized chicken image samples are degraded to obtain degraded image samples.

[0012] Secondly, this application also provides a device for reconstructing a blurred chicken image, comprising: The acquisition module is used to acquire blurry images of chickens; The super-resolution image reconstruction module is used to input the blurred chicken image into the super-resolution reconstruction model to obtain the super-resolution reconstructed image output by the super-resolution reconstruction model. The super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples. The degraded image samples were obtained in the following way: The high-resolution chicken image samples are subjected to region semantic classification processing to obtain region distribution results; the region distribution results include chicken target regions and non-target background regions. The goal of region distribution optimization is to increase the proportion of the target chicken region in the high-resolution chicken image samples. Based on the region distribution results, the region distribution of the high-resolution chicken image samples is optimized to obtain optimized chicken image samples. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples.

[0013] Thirdly, this application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of any of the above-described methods for reconstructing blurred chicken images.

[0014] Fourthly, this application also provides a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described methods for reconstructing fuzzy chicken images.

[0015] The method, apparatus, device, and medium for reconstructing fuzzy chicken images provided in this application achieve accurate identification of the target chicken region and non-target background region in high-resolution samples through region semantic classification. Then, based on the classification results, the region distribution is optimized to increase the proportion of the target chicken region without losing scene context information. This directly reduces the ineffective computational consumption of redundant background in the training process and shortens the training cycle. At the same time, it avoids the problem of reduced model generalization ability caused by full background removal. Then, training samples are generated through multi-process random combination degradation, which can fully cover various real degradation features of free-range chicken scenes. This significantly improves the adaptability of the trained super-resolution reconstruction model to the real scene, and finally achieves high-precision reconstruction of low-resolution chicken images, providing high-quality image input support for subsequent intelligent visual analysis tasks of free-range chicken scenes. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the method for reconstructing blurry chicken images provided in this application.

[0018] Figure 2 This is a schematic diagram of the high-resolution image provided in this application.

[0019] Figure 3 This is a schematic diagram of the improved degradation model framework provided in this application.

[0020] Figure 4 This is a schematic diagram showing the content of the dataset provided in this application.

[0021] Figure 5 This is a schematic diagram illustrating the image unification processing flow and the effects at different resolutions after processing provided in this application.

[0022] Figure 6 This is a schematic diagram illustrating the actual dataset provided in this application.

[0023] Figure 7 This is a schematic diagram of the visual interactive window for patch category annotation provided in this application.

[0024] Figure 8 This is a schematic diagram of the VIT framework provided in this application.

[0025] Figure 9 This is a schematic diagram of the Pw-VIT algorithm framework provided in this application.

[0026] Figure 10 This is a schematic diagram of the basic components of the MDRestNet module provided in this application.

[0027] Figure 11 This is a schematic diagram of the basic components of the DCVIT module provided in this application.

[0028] Figure 12 This is a schematic diagram of the SMART-R algorithm framework provided in this application.

[0029] Figure 13 This is a flowchart illustrating the improved RSMD algorithm provided in this application.

[0030] Figure 14 This is a schematic diagram of the loss and index changes on the validation set of the Pw-VIT ablation experiment training process provided in this application.

[0031] Figure 15 This is a schematic diagram showing the comparison of images at different stages in the Degradation-10 dataset when using the Type1 loss function for 2x super-resolution, as provided in this application.

[0032] Figure 16 This is a schematic diagram showing the comparison of images at different stages in the Degradation-10 dataset when using the Type2 loss function for 2x super-resolution, as provided in this application.

[0033] Figure 17 This is a schematic diagram showing the comparison of images at different stages in the Real-8 dataset when using the Type1 loss function for 2x super-resolution, as provided in this application.

[0034] Figure 18 This is a schematic diagram showing the comparison of images at different stages in the Real-8 dataset when using the Type2 loss function for 2x super-resolution, as provided in this application.

[0035] Figure 19 This is a schematic diagram showing the comparison of images at different stages in the Real-8 dataset when using the Type1 loss function for 4x super-resolution, as provided in this application.

[0036] Figure 20 This is a schematic diagram showing the comparison of images at different stages in the Real-8 dataset when using the Type2 loss function for 4x super-resolution, as provided in this application.

[0037] Figure 21 This is a schematic diagram of the structure of the blurry chicken image reconstruction device provided in this application.

[0038] Figure 22 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0040] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein.

[0041] The following is combined with Figures 1-22 This application describes the method, apparatus, equipment, and medium for reconstructing blurry chicken images.

[0042] With the progress of the times, people's dietary needs have shifted from simply satisfying basic needs to focusing on nutrition, food safety, and their impact on long-term health. Compared to large-scale intensive farming, free-range chicken farms place greater emphasis on ecological environmental protection and improving animal welfare. Moreover, free-range chickens are superior to caged chickens in terms of meat quality and health, resulting in higher market demand and economic value.

[0043] In actual free-range chicken farms, visual perception devices such as cameras are typically used to monitor the activities of the chickens to ensure efficient management of the breeding process. However, due to the large area of ​​the farm, complex environmental conditions, and limited resolution of the cameras used, the acquired monitoring images have low clarity. This is especially true when capturing distant targets, which occupy a very small percentage of the overall image pixels. Such low-resolution images have significant deficiencies in detail rendering, resulting in insufficient representation of texture details when performing advanced visual tasks such as object detection and behavior recognition.

[0044] In recent years, significant progress has been made in the application of advanced vision tasks in free-range chicken farming scenarios. Examples include sick chicken detection, sex classification, behavior analysis, and target detection and tracking. These studies have driven the development of intelligent farming in free-range chicken farms, but there is still a gap between these advancements and real-world applications, as the datasets used do not accommodate mid- to long-range targets similar to those captured by cameras.

[0045] While current deep learning methods have achieved considerable success in multi-scale classification and detection tasks in free-range chicken farms, low-resolution images remain a significant factor limiting their accuracy, especially for tasks that demand higher levels of texture and structural detail, such as keypoint detection, pose estimation, behavior analysis, and phenotypic analysis. Therefore, acquiring high-quality images from complex free-range environments, particularly by restoring more detail and increasing resolution, has become crucial for further improving the performance of these algorithms.

[0046] Image super-resolution technology offers an effective solution to this problem as a low-level visual task. It can recover more details from low-resolution images, improving image quality and providing clearer, higher-quality input for subsequent high-level visual tasks such as object detection, pose estimation, and behavior analysis. SRCNN was the first super-resolution deep learning network, and subsequent introductions of perceptual loss, residual structures, GAN strategies, and attention mechanisms have marked the gradual maturation of super-resolution work. In recent years, the introduction of Transformer into super-resolution research has demonstrated its superior performance compared to Convolutional Neural Networks (CNNs) in image restoration. Subsequent works such as SwinIR, HAT, and DRCT have solidified Transformer's mainstream position in the super-resolution field. In agriculture, super-resolution has been applied in many scenarios, such as super-resolution reconstruction of soil computed tomography images based on generative adversarial networks, super-resolution of diseased leaves based on ESRGAN, work on suppressing artifacts during super-resolution, and underwater image restoration. However, there is not much work on super-resolution for poultry. Before detecting free-range chickens, the Real-ESRGAN algorithm was used to perform super-resolution reconstruction of the images, which improved the detection accuracy of the YOLO series models to a certain extent.

[0047] Single-image super-resolution work relies on pairwise training with high-quality and low-quality images, where the low-quality images are typically generated from the high-quality images through degradation methods. Based on known information or assumptions about image degradation, super-resolution can be categorized into non-blind super-resolution, blind super-resolution, and true super-resolution. The transition from blind super-resolution to true super-resolution can be viewed as a process where the hypothetical degradation model gradually approaches the real degradation model. Their detailed distinctions and applications are shown in Table 1.

[0048] Table 1

[0049] The complexity of real-world scenarios places higher demands on degradation models, requiring the design of methods that can better simulate the degradation process in real-world scenarios in order to improve the generalization ability and recovery performance of super-resolution models.

[0050] Most current super-resolution dataset generation processes employ degradation algorithms that are typically based on pre-defined downsampling and noise models. The degradation process can be modeled using the following formula: Where x represents the input image, Represents the fuzzy kernel convolution operation. This represents the downsampling operation, where n represents the added noise. This represents a degraded image. However, most blind super-resolution methods are based on degradation methods that differ significantly from the actual degradation process, and the blur kernels they use... Additional noise n and downsampling operation There is a significant discrepancy between the actual degradation process and the real degradation process (as shown in Table 2), which leads to a decline in the performance of blind super-resolution models, especially for low-resolution real-world images, particularly in free-range chicken farm scenarios where environmental factors such as lighting variations, motion blur, and background complexity significantly impact image quality. To address this issue, studies such as Real-ESRGAN, Real-SR, and BSRGAN have proposed higher-order degradation models with several assumptions to approximate the real degradation process as closely as possible.

[0051] Table 2

[0052] Currently, most studies, especially in free-range poultry scenarios, neglect the importance of image degradation methods in real-world super-resolution tasks and the generalization ability of the models. Furthermore, images often contain background regions comprising more than half of the pixels, meaning that degradation methods, when randomly selecting degradation regions, are likely to select background rather than the target itself. This results in super-resolution models requiring long training times to fully learn the target region restoration process. Completely removing the background region using segmentation algorithms leads to a loss of generalization ability and distortion of the background region in the super-reconstructed image. Therefore, this application not only focuses on degradation region selection strategies to reduce the requirements of super-resolution models on datasets and training time, but also examines the detection capabilities of super-resolution models in unknown scenarios. In addition, this application discusses the application effects of representative real-world super-resolution algorithms and degradation methods in free-range chicken scenarios, providing a reference for future researchers to introduce super-resolution into visual tasks in poultry farming.

[0053] The fuzzy chicken image reconstruction method provided in this application can be implemented based on a fuzzy chicken image reconstruction device. Therefore, this application uses a fuzzy chicken image reconstruction device as the execution subject to describe the fuzzy chicken image reconstruction method. It should be noted that the specific data values ​​described in this application are merely examples and do not represent that the method provided in this application has only one set of values. These values ​​can be flexibly adjusted according to actual application conditions.

[0054] Figure 1 This is a flowchart illustrating the method for reconstructing blurry chicken images provided in this application.

[0055] like Figure 1 As shown, the method for reconstructing blurry chicken images includes the following steps: Step 101: Obtain a blurry image of a chicken; Step 102: Input the blurred chicken image into the super-resolution reconstruction model to obtain the super-resolution reconstructed image output by the super-resolution reconstruction model; The super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples. The degraded image samples were obtained in the following way: The high-resolution chicken image samples are subjected to region semantic classification processing to obtain region distribution results; the region distribution results include chicken target regions and non-target background regions. The goal of region distribution optimization is to increase the proportion of the target chicken region in the high-resolution chicken image samples. Based on the region distribution results, the region distribution of the high-resolution chicken image samples is optimized to obtain optimized chicken image samples. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples.

[0056] Specifically, blurry chicken images can be acquired through ordinary surveillance cameras deployed in the breeding scene, or through ordinary imaging equipment carried by inspection robots in the breeding park. Whether it is daily collection from fixed monitoring points or random shooting during mobile inspections, the resulting images may have image blurring due to uneven lighting in the breeding scene, fast movement of chickens, insufficient camera focusing accuracy, or limited hardware resolution of the equipment itself. The final output of chicken images with varying degrees of blur will result in a decrease in accuracy when directly used for subsequent chicken identification, health status detection, weight estimation, etc., due to the lack of detailed information.

[0057] After obtaining the blurry chicken image, no complicated preprocessing is required. Simply adjust the image size according to the input size required by the super-resolution reconstruction model, and then input it directly into the model to complete the reconstruction process and obtain the super-resolution reconstructed image.

[0058] The super-resolution reconstruction model is built on a deep learning framework and is trained using paired high-resolution chicken image samples and corresponding degraded image samples.

[0059] In the process of acquiring degraded image samples, to address the problems caused by the large proportion of background regions and random region degradation in the degradation algorithm, an adaptive background region removal degradation method is adopted. First, region semantic classification processing is performed on high-resolution chicken image samples, which can accurately identify the chicken outline and background regions in the image, and obtain accurate binary region distribution results, namely the chicken target region and non-target background regions.

[0060] After obtaining the regional distribution results, the optimization reference index was used to increase the proportion of the chicken target area in the entire image pixel area. The image content was adjusted through operations such as background cropping and filling, adaptive target migration and stitching, target replication enhancement optimization, and target enlargement and filling to optimize the regional distribution in the image, resulting in optimized chicken image samples. In the optimized chicken image samples, the chicken target occupies most of the image area, thus avoiding the model training focusing on background feature learning due to the target's small proportion, and improving the model's ability to reconstruct the details of the chicken itself.

[0061] After obtaining optimized chicken image samples, these samples undergo degradation processing. Compared to the traditional method of uniformly degrading high-resolution samples using a fixed blur kernel and a fixed downsampling ratio to obtain training samples, a multi-process random combination degradation processing method is adopted. This involves randomly shuffling the fixed sequence of degradation operations before performing the degradation processing. This method better reflects the causes of blurriness in chicken images in actual farming scenarios. In real farming scenarios, the degradation process of blurry chicken images is itself caused by a random combination of multiple factors. This could be motion blur caused by slight shaking of the chicken during shooting, Gaussian noise from the device's sensor itself, or further reduction in sharpness due to compression loss during transmission. Training samples obtained through fixed-pattern degradation processing cannot cover these random combinations, and the reconstructing effect of the trained model on real-world images is often poor. Multi-process random combination degradation can randomly combine these degradation operations into a variety of different degradation processes, making them more suitable for the real causes of blurry chicken images in actual breeding scenarios. The training samples obtained in this way can also enable the subsequent reconstruction model to learn blurry features that are more in line with the actual scene, ultimately improving the model's reconstruction effect on real blurry chicken images.

[0062] The fuzzy chicken image reconstruction method provided in this application achieves accurate identification of the target chicken region and non-target background region in high-resolution samples through region semantic classification. Then, based on the classification results, the region distribution is optimized to increase the proportion of the target chicken region without losing scene context information. This directly reduces the ineffective computational consumption of redundant background in the training process and shortens the training cycle. At the same time, it avoids the problem of reduced model generalization ability caused by full background removal. Then, training samples are generated by random combination of multiple processes to fully cover various real degradation features of free-range chicken scenes. This significantly improves the adaptability of the trained super-resolution reconstruction model to the real scene, and finally achieves high-precision reconstruction of low-resolution chicken images, providing high-quality image input support for subsequent intelligent visual analysis tasks of free-range chicken scenes.

[0063] In one embodiment, the super-resolution reconstruction model is determined in the following manner: Construct high-resolution chicken image samples; The high-resolution chicken image samples are subjected to block-by-block semantic classification to obtain the region semantic classification results of each image block in the high-resolution chicken image samples. Based on the region semantic classification results, the target chicken region and non-target background region in the high-resolution chicken image samples are determined. Based on the target chicken region, the non-target background region is adaptively replaced to obtain an optimized chicken image sample with optimized region distribution. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples; Based on the high-resolution chicken image samples and their degraded image samples, a preset model is trained to obtain a super-resolution reconstruction model.

[0064] Specifically, to address the lack of high-resolution datasets of free-range chicken scenes in super-resolution tasks, chicken image data was collected through public datasets, online images, and field photography. Based on the collected chicken image data, a unified preprocessing method was used to select high-resolution images, which were then adaptively adjusted to the target size. The resulting high-resolution chicken image samples met the model input requirements.

[0065] Training super-resolution reconstruction models places high demands on data quality, computational resources, and training time. However, the complexity of the farming environment and the randomness of actual model degradation further increase the difficulty and time cost of training, leading to the following challenges in super-resolution work in free-range chicken scenarios: (1) First, the training of the super-resolution model is based on a high-resolution image (2048×2048 pixels), from which a small region (256×256 pixels or 128×128 pixels) is cropped and degraded to form HR-LR image pairs as training data. Figure 2 This is a schematic diagram of the high-resolution image provided in this application, such as... Figure 2 As shown, the area in the left box is a randomly cropped area used for degradation and training. The yellow box represents the negative sample area (i.e., the background area), and the red box represents the positive sample area (i.e., the target area). It can be seen that the background occupies most of the area. Random sampling will result in the training dataset containing a large amount of background area. However, what we actually want to focus on is the chicken target itself, which will make the model spend a long time learning the target recovery process.

[0066] (2) such as Figure 2 As shown in the right figure, the yellow area is the background area. If the background part is completely removed (for example, by segmentation method), so that the training set does not contain background information, it may cause the background area to be distorted after super-resolution. (3) The area where the background is removed should be filled and the local integrity of the replacement area should be ensured.

[0067] As the above issues indicate, background regions significantly impact training time and generalization ability in super-resolution reconstruction model training. Excessive background information interferes with target region learning, leading to low training efficiency; while completely removing the background may cause background distortion during inference. A reasonable solution is to replace non-target background regions with chicken target regions, optimizing the ratio of chicken target regions to non-target background regions to ensure that training data is primarily composed of chicken target regions, while appropriately retaining background information to enhance the model's generalization ability. The removed background region should be a self-adaptive piece selected from the target region for replacement. Therefore, an improvement was made based on the Multi-Process Combined Degradation Method (RSMD), adding two pre-processing modules: Patch-wise Vision Transformer (Pw-VIT) and Sliding Matching and Adaptive Region Replacement (SMART-R). The Pw-VIT module classifies each patch of the image to determine whether the main information in each patch is background or chicken target. The SMART-R module uses a sliding window-based adaptive region replacement method (SMART-R) to replace background regions with coherent target regions. RSMD is used to perform multi-step random combination degradation processing on images with optimized region distribution, generating degraded images. Finally, a high-resolution-low-resolution image pair dataset is constructed for training the super-resolution reconstruction model. Figure 3 As shown, Figure 3This is a schematic diagram of the improved degradation model framework provided in this application.

[0068] During the execution of the Pw-VIT module, high-resolution chicken image samples undergo block-by-block semantic classification. This involves binary classification of each image patch to determine whether it belongs to a target chicken region containing key information such as chicken outlines, feather textures, and limb features, or a non-target background region containing background elements like ground, vegetation, and fences. The classification results are stored as a 0-1 mask, with target chicken regions marked as 1 and non-target background regions marked as 0. This fine-grained image patch segmentation allows for more accurate location of the chicken target's boundary regions, avoiding common target edge recognition errors in whole-image segmentation and providing a reliable segmentation basis for subsequent region distribution optimization steps.

[0069] During the execution of the SMART-R module, all patch content that corresponds to the chicken target region is retained. Utilizing the chicken target region and the sliding window principle, adaptive continuous background region replacement is achieved, resulting in optimized chicken image samples. This region distribution optimization method removes most of the background information and replaces the background to be removed with the most suitable target region, enhancing the target feature information in the image. This avoids overfitting during model training due to excessive invalid background information, allowing the model to focus more on learning the characteristics of the chicken itself.

[0070] After obtaining optimized chicken image samples, a multi-process random combination degradation method is used to generate corresponding low-resolution degraded image samples. Unlike the traditional fixed-parameter downsampling degradation method, this method randomly combines multiple degradation operations such as blurring, downsampling, and noise addition. The parameters of each degradation operation are also randomly selected within a reasonable range. This results in degraded image samples that are more in line with the real degradation of blurry images collected in actual breeding scenarios, enabling the trained super-resolution reconstruction model to better adapt to actual application scenarios.

[0071] A training dataset was constructed based on high-resolution chicken image samples and their degraded image samples. The training dataset was then input into a pre-set model for pre-training to obtain a super-resolution reconstruction model.

[0072] This application's embodiments accurately separate the chicken target from the redundant background through block-by-block semantic classification, and then improve the proportion of the target region in the sample through adaptive background replacement. This can effectively reduce the computational waste caused by background redundancy during training. Combined with the multi-process random combination degradation sample generation logic, it can fully fit the image degradation features under real breeding scenarios. It can build a training dataset covering multiple scenarios without large-scale collection of real low-quality chicken images. The model trained in the end has a stronger generalization ability and reconstruction accuracy for low-quality chicken images taken in real scenarios.

[0073] In one embodiment, constructing high-resolution chicken image samples includes: Obtain chicken image samples that meet the preset resolution requirements; Based on the comparison between the resolution of the chicken image sample and the target resolution, an adaptive size adjustment strategy is determined; the adaptive size adjustment strategy includes local cropping of the original image, pixel region stitching, or a combination of both operations. According to the adaptive size adjustment strategy, the resolution of the chicken image sample is adjusted to the target resolution to obtain a high-resolution chicken image sample.

[0074] Specifically, low-resolution images are generated by degrading high-resolution images; therefore, the collected high-resolution images should contain more pixels to preserve target details. This application constructed an initial dataset using publicly available datasets, image websites, social media, and field photography, including 1977 high-resolution images and 20 videos of ecological farms, such as... Figure 4 As shown, Figure 4 This is a schematic diagram showing the content of the dataset provided in this application. Figure 4 (a) comes from a public dataset. Figure 4 (b) Data sets collected from the internet and social media platforms. Figure 4 (c) The dataset taken from free-range farms, the specific composition of which is shown in Table 3.

[0075] Table 3

[0076] The video of the ecological farm was filmed at the Wuxian Animal Farm in a certain region, using an Ezviz HB8 outdoor pan-tilt camera. 1977 high-resolution images were processed for image degradation to construct a super-resolution dataset. Simultaneously, blurry chicken images were extracted from the ecological farm video and included as part of a real low-resolution dataset to test the effectiveness of the algorithm and its generalization ability in unknown scenarios.

[0077] This application involves four datasets: HR-dataset, Degradation-10, Real-8, and PC-dataset.

[0078] Mainstream methods typically resize images of different resolutions to a uniform size to meet model input requirements, but this can lead to image content distortion. To address this, we designed an Image Adaptive Size Uniformity and Augmentation Method (IASUA) that stitches and crops high-quality images into two sizes: 1024×1024 and 2048×2048. This method mainly consists of two stages: image resolution classification and adaptive stitching and cropping. It eliminates low-quality images and achieves image enhancement while unifying the size.

[0079] Image sizes are determined by their maximum dimensions. If an image is smaller than a preset threshold, it is discarded. If the image size is greater than or equal to the preset threshold, its size is compared with the target resolution (1024 pixels or 2048 pixels). Based on the comparison, an adaptive resizing strategy is generated, employing pixel region stitching, image cropping, or a combination of random cropping. Then, the image resolution is adjusted to the target resolution according to the adaptive resizing strategy, resulting in a high-resolution image suitable for training. Furthermore, for large images (e.g., those longer or wider than 4096 pixels), multiple sub-images are generated using multiple random cropping or unidirectional stitching followed by cropping. This ensures that each processed image meets the requirements while preserving the target content.

[0080] Figure 5 This is a schematic diagram illustrating the image unification processing flow and the effects at different resolutions after processing provided in this application. Figure 5 (a) illustrates the processing flow for images at different resolutions. Figure 5 (b) demonstrates the processing effect on an image close to 1024×1024 pixels. Figure 5 (c) demonstrates the processing effect on images approaching 2048×2048 pixels. Through the above operations, a high-resolution dataset HR-dataset (High Resolution Dataset) containing 1985 images was obtained, of which 1970 images were used for training the super-resolution reconstruction model, 5 images were degraded and used to verify the model training process, and 10 degraded images were used to construct the dataset Degradation-10 for experimental evaluation.

[0081] Five images from different scenes were selected from the filtered low-resolution images, and three images from different locations were extracted from the captured free-range scene video, for a total of eight images to construct the Real-8 dataset. This dataset will be used for subsequent experimental evaluation on unknown real low-resolution images, such as... Figure 6 As shown, Figure 6This is a schematic diagram illustrating the real dataset provided in this application. The low-resolution images come from different scenes or different locations within scenes, with significant differences in targets and backgrounds, effectively verifying the effectiveness and generalization of the algorithm in real-world scenarios.

[0082] The embodiments of this application employ image processing methods such as low-resolution image filtering and adaptive resizing to ensure that the image content is not distorted while also achieving data enhancement.

[0083] In one embodiment, the step of performing block-by-block semantic classification on the high-resolution chicken image sample to obtain the region semantic classification result of each image block in the high-resolution chicken image sample, and determining the chicken target region and non-target background region in the high-resolution chicken image sample based on the region semantic classification results, includes: The high-resolution chicken image samples are input into the image patch semantic discrimination model to obtain the region semantic classification results of each image patch in the high-resolution chicken image samples output by the image patch semantic discrimination model; the image patch semantic discrimination model is obtained by training the model based on chicken images and their region semantic category labels, and the region semantic category labels are composed of the region semantic categories of each image patch in the chicken image; Image blocks whose semantic classification result is chicken target category are identified as chicken target regions, and image blocks whose semantic classification result is non-target background category are identified as non-target background regions.

[0084] Specifically, high-resolution chicken image samples are input into an improved image patch semantic discrimination model for patch-level classification. This model classifies each patch after the image is divided into equal parts into background and target regions. Traditional image patch semantic discrimination models classify single images, and commonly used image annotation software cannot perform patch annotation. Therefore, a visual interactive window for patch category annotation was designed using Python. Figure 7 This is a schematic diagram of the visual interactive window for patch category annotation provided in this application. To adapt to the improved image patch semantic discrimination model, the image is divided into an average of 8×8 patches, with the size of a single patch corresponding to each image resolution being [size missing]. ,in, and These are the image's width and height dimensions. By clicking on patches containing the chicken target, they are marked as 1; unclicked areas are considered patches containing only the background and are marked as 0. A text file is generated to store the labeling information. Through these operations, the PC-dataset (patchClassification Dataset) is constructed for training, validating, and testing the improved image patch semantic discrimination model. This dataset contains 1000 images, with the training, validation, and test sets split in an 8:1:1 ratio.

[0085] like Figure 7 As shown, the left side shows the initial state of the image, which is divided into 8×8 blocks. The area containing chickens is selected by clicking. The red mask on the right side represents the selected target area of ​​chickens. The patch corresponding to the area will be marked as 1, and the other patches will be marked as 0.

[0086] This application embodiment achieves block-by-block classification of chicken images through a pre-trained image block semantic discrimination model. It can rely on the labeled category tags to ensure the accuracy of region division and greatly improve the efficiency of dividing chicken targets and background regions.

[0087] In one embodiment, the image patch semantic discrimination model is used for: The high-resolution chicken image samples are downsampled and features are extracted to obtain feature maps; The feature map is subjected to dense connection processing to obtain an image patch feature sequence; the image patch feature sequence includes the feature vector of each image patch in the high-resolution chicken image sample; Regional semantic discrimination is performed on the feature vectors of each image patch to obtain the regional semantic classification results of each image patch.

[0088] Specifically, when the image patch semantic discrimination model adopts the VIT (VisionTransformer) framework, VIT treats the image as a series of patches. Using Linear Projection of Flattened Patches, each patch is mapped to a fixed-dimensional vector through a linear transformation (usually through a linear layer). These patches are then fed as input to the Transformer Encoder for processing. Similar to the Transformer used for natural language processing, VIT uses a self-attention mechanism to capture the relationships between different regions in the image. Finally, a classification head (such as a Multilayer Perceptron (MLP)) is used to predict the [CLS] token (classification token) to obtain the final category label: chicken target region or non-target background region. Figure 8 As shown, Figure 8 This is a schematic diagram of the VIT framework provided in this application.

[0089] Furthermore, based on the characteristic of VIT (Virtual Interference Technology) to divide images into patches, an improved VIT model capable of classifying patches is proposed. This model can remove the background while reasonably preserving necessary background information. The proposed improved model architecture is as follows: Figure 9 As shown, Figure 9 This is a schematic diagram of the Pw-VIT algorithm framework provided in this application. The Pw-VIT algorithm framework mainly addresses the following difficulties: (1) Traditional scaling methods lack flexibility, and simple stretching or compression can easily lead to the loss of key information, which is unfair to each patch; (2) Compared with the classification of the whole image, the classification of patches requires more fine-grained information. Although VIT performs well in capturing global information, it is still not as good as the CNN architecture in capturing local features. Therefore, the backbone network design should fully consider the capture and transmission of features to improve the efficiency and accuracy of the model in handling the classification task of each patch; (3) The original VIT classification head is mainly used for the classification of the whole image, so how to achieve the classification at the patch level is crucial.

[0090] To support large-scale image input, the resize method in the original model was replaced by the Multi-DownsamplingResNet (MDResNet) module. MDResNet, through a combination of downsampling and different residual network structures, ensures that the image is resized to fit the model's dimensions and extracts key feature information, avoiding the potential loss of crucial image information that might occur with the resize method. A dense connection design was introduced into the VIT backbone network, densely connecting the blocks in the Encoder (Dense Connected Vision Transformer, DCVIT). This structure captures rich multi-layer feature information, significantly improving the model's performance in fine-grained classification tasks. In the VIT head, the traditional VIT function of classifying a single image was improved to classify each patch (Patch Classification Head, PC-Head).

[0091] Figure 10 This is a schematic diagram of the basic components of the MDRestNet module provided in this application. The following is in conjunction with... Figure 10 A detailed description of the MDRestNet module is provided.

[0092] Traditional image scaling input methods are unsuitable for processing large-sized free-range chicken images, especially when focusing on patch-level feature information. Properly designed convolution operations can often achieve downsampling and fairly convolve each pixel using kernels, thus ensuring fair processing of each patch. However, simple downsampling still cannot effectively extract key information. For example... Figure 9 As shown, the MDResNet module consists of three alternating 2x downsampling layers and three residual structures, as detailed in the following diagram. Figure 10 As shown.

[0093] Residual blocks (RBs) inherit from the classic ResNet architecture and are simple residual connection structures containing two convolutional layers. They use residual connections to mitigate the vanishing gradient problem. Meanwhile, Batch Normalization and Dropout layers improve the network's stability and generalization ability.

[0094] Enhanced Residual Blocks (ERBs) are an improved version of residual block design, featuring complex residual connection structures designed to better extract and utilize feature information, particularly for feature extraction within each patch rather than global feature extraction. By combining depthwise convolution (DWConv) with pointwise convolution (PWConv) to form separable convolutions, compared to ordinary convolutions, the number of parameters and computational complexity are significantly reduced, while also alleviating the computational pressure of downsampling replacing resizing. Furthermore, by convolving each channel independently and then integrating the information from different channels, this convolution method maintains high feature extraction capabilities. Dilated convolution (DConv) expands the receptive field of the convolution kernel without increasing the number of parameters. When processing high-resolution images, it can capture features over a larger spatial range, thus better extracting long-range relevant information before entering VIT. Considering the varying distances of objects in an image, leading to differences in pixel information within the same local patch, a feature fusion structure combining 3×3 and 5×5 convolutions is employed. 3×3 convolutions capture local features, while 5×5 convolutions capture features over a larger area. The combination of multi-scale convolutions enables the model to adapt to objects or structures of different sizes, thereby improving robustness. Employing a channel attention mechanism as the final feature extraction layer of the ERB, the SE module adaptively adjusts channel weights to enhance the network's focus on key features, helping to extract useful information more effectively and improving overall performance. The SE module is a good choice for adjusting channels.

[0095] The SE module extracts global feature information for each channel using Global Average Pooling (GAP). Then, through dimensionality reduction and dimensionality increase fully connected operations, it generates weight coefficients for each channel. These weights are then normalized using ReLU and Sigmoid activation functions, limiting the weight values ​​to between 0 and 1. Finally, these weights are multiplied channel-by-channel with the original feature map, thereby enhancing important features and suppressing irrelevant features, effectively improving the model's sensitivity to key information and its expressive power.

[0096] Images of 2048×2048 and 1024×1024 pixels are scaled down three times to 256×256 and 128×128 pixels respectively, meeting the input requirements of VIT. MDRestNet achieves efficient and flexible feature extraction while scaling images through three downsampling operations, combined with residual connections, attention mechanisms, multi-scale convolution, and dilated convolution. It's important to note that when the input image is 2048×2048 pixels, the first RB in the MDRestNet module becomes ineffective, preventing an explosive increase in training complexity.

[0097] Figure 11 This is a schematic diagram of the basic components of the DCVIT module provided in this application. The following is in conjunction with... Figure 11 The DCVIT module is described in detail.

[0098] The MDRestNet module design solves the problems of image scaling and feature extraction, but it suffers from the vanishing gradient problem when performing classification tasks for each patch and increasing network depth. Furthermore, the simple stacking of blocks in traditional encoders fails to adequately consider local details and global context. Therefore, a densely connected structure is introduced into the traditional VIT encoder. The block structure in the encoder is as follows: Figure 11 As shown, this includes LN, Attention, LN, MLP, and residual connections. The diagram details the construction of MLP and Attention. The output of each block is directly connected to all subsequent blocks, ensuring efficient gradient flow, mitigating the vanishing gradient problem, and enhancing feature reuse. This helps preserve local details and establish a global context during patch classification.

[0099] The PC-Head module is described in detail below.

[0100] In traditional VIT classification heads, the model aggregates the feature representations of all patches into a single global feature vector and maps it to the final class probability. This approach performs well in overall image classification tasks, but by fusing features from all patches into a single representation, it implicitly ignores the independent features between individual patches. This design falls short in tasks requiring independent classification of each patch because it fails to effectively preserve and utilize the local feature information of each patch. To address this issue, an improved classification head is adopted, specifically designed for patch-level classification tasks. This head directly outputs the classification result for each patch, thus more accurately meeting the classification requirements at the patch level and enhancing the model's ability to capture local information.

[0101] Specifically, the patch after processing by Transformer is represented as ,in Indicates the first Feature vectors of each patch Where D is the number of patches, and D is the feature dimension. This is achieved by processing each patch along the feature dimension. Perform a linear transformation: in: , These are the weight matrices of two linear layers. For the hidden layer dimension, Number of categories; and It is a two-layer bias term; It is the ReLU activation function; This represents the class prediction value for each patch. Through the above design, the feature vector of each patch is mapped to a scalar. .

[0102] Since the current task can be considered a binary classification task, the loss function adopted is BCEWithLogitsLoss, which combines binary cross-entropy loss (BCE) and the sigmoid activation function, making it more suitable for binary classification tasks and avoiding numerical instability issues. For a single sample, the formula for BCEWithLogitsLoss is as follows: in, It is the Sigmoid function. It is PC-Head output. It is the target label (0 or 1).

[0103] This application embodiment uses a logic of first downsampling to extract features and then performing dense connection processing, which can efficiently integrate the contextual features of each image patch, accurately capture the core features of the chicken target such as texture and contour, and at the same time perform semantic discrimination based on the independent feature vectors of each image patch, which can achieve fine-grained image patch classification, thereby achieving accurate differentiation between background and target areas.

[0104] In one embodiment, the step of adaptively replacing the non-target background region based on the chicken target region to obtain an optimized chicken image sample with optimized region distribution includes: Determine the largest connected region in the non-target background region, and determine the window based on the bounding box of the largest connected region; A sliding window is used to traverse all regions in the high-resolution chicken image sample to determine the matching degree between the chicken target region within the window and the maximum connected region; the matching degree is the maximum number of image blocks whose relative positions overlap between the chicken target region within the window and the maximum connected region. Replace the maximum connected region with the adaptation region corresponding to the window position with the highest matching degree, update the non-target background region, and iteratively execute the steps of determining the maximum connected region in the non-target background region and determining the window based on the bounding box of the maximum connected region until there is no connected region in the non-target background region, thus obtaining the optimized chicken image sample with optimized region distribution.

[0105] Combination Figure 12 , Figure 12 This is a schematic diagram of the SMART-R algorithm framework provided in this application.

[0106] Specifically, the improved VIT algorithm achieves patch-level classification of non-target background regions and chicken target regions, effectively replacing traditional segmentation algorithms and preserving the background regions where the target and background connect. However, how to properly handle background regions is crucial for subsequent degradation and super-resolution training.

[0107] To address this issue, a sliding window matching and adaptive region replacement strategy is employed. This strategy replaces non-target background regions that best match the target chicken region, thus preserving the overall structure while also augmenting the data. The method flow is as follows: Figure 12 As shown in (a).

[0108] The image is divided into 8×8 regions, each labeled either 0 (non-target background region) or 1 (target chicken region). For regions labeled 0, a breadth-first search algorithm is used to find the largest connected component. The window size is determined based on the bounding box (coordinates of the top-left and bottom-right corners) of the largest connected component.

[0109] Slide the window in the top left corner of the image, traversing all regions to find the position with the highest matching degree to the background region. The matching degree is defined as the maximum number of patches where the relative positions of the chicken target region and the non-target background region overlap within the window. This process can be defined by the following formula: in, , These are defined as the number of patches in the height and width directions within the window, respectively. Indicates the area to be replaced The location patch marker, Defined as the position coordinates of the top-leftmost patch, rather than pixel coordinates; Display window The location patch marker, Indicates the position of the top-left patch in the window; This indicates the number of patches in the original background area that have replaced the target chicken area within the current window; Indicates all during the window sliding process value; This indicates the most suitable window. Swap the 0 and 1 markers in the background area, and then... Multiplication makes the count of replaceable regions 1 and the count of non-replaceable regions 0.

[0110] After finding the window position with the highest matching degree, replace that region (region 1 within the window) with the position corresponding to the original region 0. Update the label matrix, marking the replaced region 0 as 1, indicating that the region has been replaced. Loop through the search for and process the largest connected component until no connected component exists.

[0111] In special cases, when the target chicken is located in the center of the image or other factors cause the window size defined by the maximum connected region to cover the entire image, the algorithm will fail. In this case, it is first necessary to find the maximum connected region of the target chicken, and then slide to replace the background region in the four directions (up, down, left, and right), before applying the SMART-R method, such as... Figure 12 As shown in (b).

[0112] This application embodiment first locates the largest connected region of the non-target background, and then iteratively replaces the connected background with the sliding window region with the highest matching degree. This can fully match the layout features of the original image when replacing redundant backgrounds, avoid the problem of harsh boundary between target and background caused by traditional background replacement, and ensure the quality of subsequent training samples.

[0113] In one embodiment, the step of performing multi-process random combination degradation processing on the optimized chicken image samples to obtain degraded image samples includes: The execution order of blurring, noise addition, and downsampling operations is randomly shuffled to obtain a variety of random combinations of degradation processing flows. Among them, the blurring operation uses a combination of isotropic and anisotropic Gaussian kernels, the noise addition operation randomly selects from Gaussian noise, JPEG compression noise, and camera sensor noise, and the downsampling operation randomly selects from bicubic downsampling, bilinear downsampling, nearest neighbor interpolation downsampling, and downsampling followed by upsampling. According to the degradation processing procedure with multiple random combinations, the optimized chicken image samples are degraded to obtain degraded image samples.

[0114] Combination Figure 13 , Figure 13 This is a flowchart illustrating the improved RSMD algorithm provided in this application.

[0115] Specifically, a practical degradation model was modeled, and based on its characteristics, it is called the Random Shuffled Multi-Process Combinatorial Degradation Method (RSMD). The method flow is as follows: Figure 13 As shown, sf is the scaling factor, prob is the random probability, random is the random selection method, and random order (1-7) represents the degenerate sequence of random permutation. Table 4 explains the basic components.

[0116] Table 4

[0117] The core ideas and improvements to the degradation process of RSMD are as follows: (1) The pipeline of the traditional degradation model of blurring → downsampling → noise addition is randomly shuffled to expand the degradation space; (2) In addition to the traditional degradation in the HR space, the fuzzing degradation part also applies fuzzing from the LR space. At the same time, the method of combining isotropic Gaussian kernels and anisotropic Gaussian kernels is used to further expand the degradation space and fuzzing scale. (3) In addition to using the traditional bicubic downsampling, the downsampling part also adds bilinear downsampling, nearest neighbor interpolation downsampling and the method of first downsampling and then upsampling. It is worth noting that the nearest neighbor interpolation has been improved. A 21×21 isotropic Gaussian kernel is used to move 0.5×s-1 pixels before convolution to avoid pixel shift after downsampling. (4) The noise section introduces JPEG compression noise and camera sensor noise, which are processes that should be considered in the actual degradation process.

[0118] This application embodiment models a practical degradation model, which not only expands the degradation space but also generates some degradation situations that rarely occur in real-world scenarios, improving the generalization ability of the blind super-resolution model. By changing the parameters, a variety of degradation models can be easily obtained.

[0119] Based on the above-mentioned method for reconstructing blurry chicken images, the method of this application is evaluated and experimental operation settings are configured.

[0120] The evaluation method consists of two stages. The first stage focuses on image degradation methods and is the core innovation of this application. In this stage, the Pw-VIT algorithm performs a binary classification task, using accuracy (AC) and F1 score (F1) as evaluation metrics. These metrics are widely used in image classification tasks to evaluate the model's performance. The calculation formulas for the metrics are shown below: TP, FP, TN, and FN represent true positive, false positive, true negative, and false negative, respectively.

[0121] The second stage uses super-resolution algorithms to verify the effectiveness of the proposed method. To quantify reconstruction performance and compare it with other methods, Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM) are commonly used reference metrics. The formulas are defined as follows: PSNR is measured in decibels (dB), with higher values ​​indicating a closer reconstructed image to the reference image. However, PSNR has low sensitivity to structural and texture information perceived by the human eye and cannot fully reflect the subjective quality of an image. PSNR is calculated based on mean squared error (MSE), where... For the pixel values ​​of the reference image, To reconstruct the pixel values ​​of the image, m and n represent the width and height of the image.

[0122] generally ,but: SSIM (Structural Similarity Index Metric) is a perceptual metric for measuring image quality. It primarily considers brightness, contrast, and structural information, focusing more on the structural similarity of images, thus better aligning with human visual perception. The SSIM value ranges from [0,1], with values ​​closer to 1 indicating better image quality. This is the brightness contrast item, among which, It is the average of the x and y values ​​of the image. It is a constant to prevent the denominator from being zero, usually , =0.01, where L is the dynamic range of pixel values ​​(e.g., 255). For contrast, where Let x and y be the standard deviations of the image. It is a constant to prevent the denominator from being zero, usually , =0.03. For structurally similar terms, where Represents the covariance of the x and y graphs. .

[0123] Since real-world low-resolution images lack corresponding high-resolution images for comparison, a no-reference image quality assessment algorithm is required. Three no-reference metrics—NIQE, NRQM, and PI—are used to evaluate the super-resolution performance of low-resolution images. Specifically, NIQE assesses the naturalness of the image, NRQM assesses local features (such as sharpness and texture), and PI assesses the perceptual quality, which better aligns with human subjective perception of image quality. These three no-reference metrics can be calculated using IQA-PyTorch.

[0124] This experiment was conducted on two sets of equipment, the configuration of which is detailed in Table 5. Configuration 1 was used for the image degradation stage experiment, and configuration 2 was used for super-resolution model training. The deep learning framework used in the experiment was PyTorch 1.11, the programming language was Python 3.8, and the CUDA version was 11.3.

[0125] Table 5

[0126] To evaluate the effectiveness of the proposed Pw-VIT in region classification, ablation experiments were conducted. The results of the Pw-VIT ablation experiments are shown in Table 6, which verifies that each module and its combination exhibits effectiveness to varying degrees. The optimal index is marked in bold.

[0127] During the experiment, a series of optimized parameters were designed for model training to ensure the stability and performance improvement of the training process. At the same time, all experiments in this stage used the same configuration as in Table 5.

[0128] Table 6

[0129] Table 6 shows the model ablation experiments with image inputs of 1024×1024 and 2048×2048 resolutions, denoted as E, respectively. 1024 and E 2048 The PC-Head implemented patch-level classification and retained it throughout the ablation experiments, without improving other parts. 1024 The baseline metrics were 82.4% accuracy and 84.0% F1 score, E 2048 The baseline metrics were 82.8% accuracy and 87.8% F1 score. After introducing DCVIT alone, the model achieved an accuracy of 82.8% and an F1 score of 87.8%. 1024 Compared to the baseline model, this improved accuracy by 7.2% and F1 score by 5.3%, in E 2048 The accuracy and F1 score were improved by 6.8% and 2.7% respectively. This indicates that DCVIT makes a significant contribution to model training in terms of feature reuse and contextual information supplementation. Meanwhile, dense connections alone did not significantly increase params and GFLOPs. Introducing MDResNet alone improved the model's accuracy in E... 1024 Compared to the baseline model, this improved accuracy by 8.7% and F1 score by 7%, in E 2048 The accuracy and F1 score were improved by 7.8% and 3.8% respectively. Compared with DCVIT, MDResNet improved E... 1024 and E 2048 The improvements were 1.5%, 1.7%, 1%, and 1.1%, respectively. This indicates that the feature extraction downsampling method significantly outperforms simple image scaling, and that basic feature extraction improves model performance better than feature reuse. However, the downsampling convolution and residual network design in MDResNet inevitably increases computational cost. To preserve the extracted features to the greatest extent, MDResNet expands the processed data channels to 64 (out of 3 channels when unused), which further increases computational cost. The complete combination of MDResNet+DCVIT+PC-Head achieves optimal results, with E... 1024 Accuracy improved by 11.4% in the middle range and F1 score improved by 10.2%; E 2048 The accuracy improved by 13.8%, and the F1 score improved by 8.8%. Compared to the model that only incorporates MDResNet, E 1024 and E 2048The improvements were 2.7%, 3.2%, and 5.4%, 5%, respectively. This indicates that while MDResNet contributes more to classification performance, DCVIT is equally indispensable. The optimal combination has the same number of parameters as MDResNet, suggesting that MDResNet is the main source of increased computational cost. 1024 and E 2048 In the complete combination experiment comparison, E 2048 The accuracy and F1 score were 2.2% and 2.4% higher, respectively. This is mainly because high-resolution images provide more detail, making feature extraction downsampling and feature reuse more efficient. However, higher-resolution images also increase the computational cost of the model.

[0130] Figure 14 This is a schematic diagram of the loss and index changes on the validation set of the Pw-VIT ablation experiment training process provided in this application. Figure 14 The training process of four models in the ablation experiment is shown, with E on the left. 1024 E is on the right. 2048 The changes in validation set loss, accuracy, and F1 score are shown from top to bottom. Compared to the baseline model, DCVIT's loss decreases more slowly but achieves higher metrics, which may be attributed to the advantages of dense connections in improving gradient flow, feature reuse, and regularization effects. Introducing MDResNet alone or in combination with the full module results in the fastest loss reduction and model fitting speed. This is mainly due to MDResNet's effective extraction of local, global, and multi-scale features from the input image through downsampling and the residual module, thus providing the network with sufficient prior knowledge. These high-quality prior features allow the network to learn basic features from scratch in the early stages of training, significantly accelerating the loss reduction. Simultaneously, through gradient optimization and feature preservation in the residual module, the network can more stably capture key information and reduce the invalid search space. Ultimately, the introduction of prior knowledge significantly improves the model's classification performance, and combined with DCVIT, it achieves higher levels in accuracy and F1 scores, demonstrating a synergistic optimization capability for feature representation and gradient flow.

[0131] According to research, there is limited research on super-resolution in free-range chicken scenarios, making it essential to explore the performance of various mainstream super-resolution methods in this context. Experiments were conducted using four representative methods: DRCT, SwinIR, Real-SR, and Real-ESRGAN. The image degradation algorithm uniformly employed bicubic downsampling, and experiments were performed at scales of X2 and X4. Since Real-SR does not provide an X2 super-resolution task, experiments were only conducted at X4. The L1 loss function was used, and training was performed for 300,000 steps, with other configurations consistent with the source code. Models trained using these four algorithms were tested on the Degradation-10 dataset, and the comparison results of different super-resolution algorithms are shown in Table 7. Table 7 shows that DRCT achieved the highest PSNR and SSIM values ​​at both Scale=2 and Scale=4. DRCT is a recent variant based on SwinIR, which solves the spatial information loss problem caused by increasing the number of network layers by integrating dense connections into the Swin Transformer's SISR model, achieving state-of-the-art performance while maintaining efficiency.

[0132] Table 7

[0133] The core of real-world super-resolution tasks lies in the selection of degradation models, with the mainstream goal being to design degradation models that best cover the real degradation process. Therefore, comparative experiments will be conducted on bicubic downsampling, the degradation model in Real-ESRGAN, and the degradation model in BSRGAN. In the comparison of super-resolution models in the previous section, both DRCT and SwinIR achieved excellent results. Since DRCT increases the number of parameters and reduces computational efficiency compared to SwinIR, subsequent experiments will use SwinIR to train the model for testing and evaluation of the degradation methods.

[0134] Three degradation methods were used in the experiments, with scaling factors of X2 and X4 respectively. The L1 loss function was employed, and the algorithm was trained for a uniform 300,000 steps, with other configurations consistent with the source code. Since the degradation methods are primarily used for real-world low-resolution image restoration, evaluations were conducted on both the Degradation-10 and Real-8 test sets. The comparison results of different degradation methods are shown in Table 8, with the highest performance indicators highlighted in bold. By employing more noise addition, blurring, downsampling types, and more combinations, the algorithm successfully simulated an effect closer to the real degradation process, achieving leading performance on both test sets. Therefore, this application improves the degradation algorithm based on this.

[0135] Table 8

[0136] Effectiveness experiments were conducted on the improved degradation algorithm using SwinIR. RSMD combines Pw-VIT and SMART-R components to remove most of the background and enhance the dataset. To verify the applicability of the improved degradation algorithm to super-resolution in free-range chicken scenes, comparative experiments were performed on the degradation algorithm before and after the improvement, based on the SwinIR super-resolution algorithm. In addition to experiments with scaling factors of X2 and X4, the performance under different combinations of loss functions was also compared to more comprehensively verify the effectiveness of the improvement. Eight types of super-resolution models were trained by combining different scaling factors and loss functions, and evaluated on the degradation image test dataset Degradation-10 and the real image test dataset Real-8, respectively.

[0137] The experiments employed two types of loss functions commonly used in mainstream super-resolution work: Type 1, the L1 loss function, primarily focuses on differences between pixels; and Type 2, L2 loss, VGG perceptual loss (taking the output between the fourth convolutional and fourth pooling layers of a pre-trained 19-layer VGG model to improve stability and prevent color shift issues), and least-squares PatchGAN loss based on the spectral norm, with weights of 1, 1, and 0.1, respectively. The discriminator uniformly used the L1 loss function. Compared to Type 1, Type 2 used a larger 72×72 LR patch instead of 64×64. This is because degenerate models may produce severely degraded LR images, and the training process of GAN loss is unstable. A larger patch helps the deep model capture more information, thus more effectively minimizing the loss function. Specific experimental parameter configuration details are shown in Table 9. To compare the superiority of the improved degradation algorithm in terms of super-resolution model fitting speed and restoration effect, four checkpoints were used for comparison: P1: 100,000 iters, P2: 200,000 iters, P3: 400,000 iters, and P4: 500,000 iters. Specifically, P4 was only involved in minimizing the Type 2 loss. Because the loss hardly changes at P3, the L1 loss function was modified to the L2 loss function, and training continued for 100,000 steps to evaluate the impact of the L2 loss compared to the L1 loss on image restoration.

[0138] Table 9

[0139] Table 10 shows the comparison results of training eight models at each stage on the Degradation-10 dataset, with the highest metrics highlighted in bold. It is evident that the improved degradation algorithm achieves better image restoration results in stages P1-P3, especially with Type 1 loss. The improved algorithm essentially achieves model fitting in stage P2, while the original degradation algorithm still shows significant improvement from P2 to P3. The improved method fails to achieve the aforementioned advantage over Type 1 loss with Type 2 loss, mainly due to the adversarial nature of GAN loss leading to significant loss fluctuations and training instability. However, the improved degradation algorithm still maintains its lead at each stage. In stage P4, all metrics decline significantly.

[0140] Table 10

[0141] Figure 15 This is a schematic diagram showing the comparison of images at different stages in the Degradation-10 dataset when using the Type1 loss function for 2x super-resolution, as provided in this application. Figure 15 The image restoration performance at each stage is shown under the Type 1 loss function and Scale=2 conditions. The images in the second row are from the improved method, with the highest index marked in bold. At each stage, the improved degradation algorithm exhibits higher quality detail restoration, and its performance in stage P2 reaches the level of the original degradation method in stage P3.

[0142] Figure 16 This is a schematic diagram showing the comparison of images at different stages in the Degradation-10 dataset when using the Type2 loss function for 2x super-resolution, as provided in this application. Figure 16 The image restoration performance at each stage is shown under the Type 2 loss function and Scale=2 conditions. The images in the second row are from the improved method, with the highest performance index highlighted in bold. In stages P1-P3, the improved degradation algorithm significantly outperforms the original algorithm, especially in optimizing the eye target. In stage P4, after modifying the L2 loss function, color changes occurred during image restoration, and color difference led to a significant decrease in the calculated reference index.

[0143] Table 11 shows the comparative experimental results on the Real-8 dataset. The test results show that the improved methods at each stage generally outperform the original degradation methods in terms of restoration performance on real-world datasets. Compared to Degradation-10, Type2 loss training outperforms Type1 in evaluation metrics and shows a stronger advantage for unknown real low-resolution images. This is mainly because NIQE and NRQM metrics focus on the naturalness of the image, while PI optimizes the perceptual quality of the generated image. The L1 loss function focuses on pixel-level differences, which may lead to a lack of naturalness and detail in the image, while VGG perceptual loss and GAN loss are more helpful in optimizing the structure, texture, and naturalness of the image, thus achieving better results in NIQE, NRQM, and PI metrics.

[0144] Table 11

[0145] Figure 17 This is a schematic diagram showing the comparison of images in the Real-8 dataset at different stages when using the Type1 loss function for 2x super-resolution, as provided in this application. The images in the second row are from the improved method, and the highest index is marked in bold. Figure 18 This is a schematic diagram showing the comparison of images in the Real-8 dataset at different stages when using the Type2 loss function for 2x super-resolution, as provided in this application. The images in the second row are from the improved method, and the highest index is marked in bold. Figure 17 and Figure 18 The results demonstrate the effectiveness of training with Type 1 and Type 2 loss functions at Scale=2. The improved method recovers feather texture details better at each stage. Figure 18 In the P2 stage, the improved method is more visually appealing, but the metrics are lower.

[0146] Figure 19 This is a schematic diagram showing the comparison of images in the Real-8 dataset at different stages when using the Type1 loss function for 4x super-resolution, as provided in this application. The images in the second row are from the improved method, and the highest index is marked in bold. Figure 20 This is a schematic diagram showing the comparison of images at different stages in the Real-8 dataset when using the Type2 loss function for 4x super-resolution, as provided in this application. The images in the second row are from the improved method, and the highest index is marked in bold. Figure 19 and Figure 20 The training performance of the two loss functions is shown at Scale=4. The improved method also demonstrates superiority. In all experiments at stage P4, the image colors darkened, further proving the inapplicability of the L2 loss function in real-world super-resolution tasks.

[0147] The experimental results above show that the improved degradation algorithm demonstrates significant advantages at all stages of image restoration, particularly in detail restoration, structural optimization, and texture detail. By appropriately selecting the loss function and optimization strategy, the naturalness and perceptual quality of image restoration can be further improved; however, the L2 loss function remains unsuitable for super-resolution tasks. Furthermore, no-reference evaluation metrics do not always perfectly align with visual perception results; therefore, in practical applications, multiple metrics need to be considered comprehensively to evaluate the algorithm's performance.

[0148] Previous algorithm research has often overlooked the importance of degradation methods in real-world super-resolution tasks and lacks a comprehensive evaluation of the application effects of current mainstream super-resolution algorithms. In high-resolution images, the background usually occupies most of the area, while super-resolution research focuses more on the structural and textural details of the target (such as a chicken). When the dataset contains a large amount of background information, it will prolong the training time of the super-resolution model in learning the target restoration process, placing high demands on the dataset and computing resources. On the other hand, the real environment is often highly variable, and excessive background information may not improve the model's generalization ability. Therefore, this application proposes an improved RSMD degradation method, introducing the Pw-VIT module and the SMART-R module. Pw-VIT is an improvement on VIT and achieves patch-level classification, while the SMART-R module achieves the overall replacement of the background region. Through these methods, the background can be reasonably removed while maintaining the integrity of the structure. In the improved RSMD method, ablation experiments demonstrate the effectiveness of the Pw-VIT module. With input images of 1024 pixels and 2048 pixels, the accuracy was improved by 11.4% and 13.8% respectively compared to the original model, and the F1 score was improved by 10.2% and 8.8% respectively. Regarding super-resolution algorithms, mainstream super-resolution algorithms were first evaluated. Experimental results show that the SwinIR series of super-resolution algorithms has a significant advantage in the super-resolution task of free-range chickens. Secondly, by comparing different degradation methods, it was found that RSMD, due to its wider degradation range, is more suitable for super-resolution tasks of real low-resolution images. Finally, by comparing the performance of models trained with different scaling factors (X2, X4) and loss functions (L1, L1+GAN+perceptual loss) on degraded datasets and real datasets, the results demonstrate that reasonably removing part of the background region and increasing the target region can significantly reduce the model training time, while exhibiting excellent generalization ability on real data in different environments.

[0149] Overall, this application analyzes the application effects of mainstream super-resolution algorithms and degradation methods in free-range chicken scenarios, and effectively alleviates the dependence of super-resolution model training on high-quality training sets and long training time by improving the degradation method, thus providing a reference for the subsequent application of super-resolution in free-range chicken scenarios.

[0150] Although this application improves the degradation algorithm, the high parameter count and long inference time of the super-resolution reconstruction model pose challenges for deployment on edge devices. Furthermore, this application does not combine advanced vision tasks in free-range chicken farms (such as chicken detection and tracking, pose estimation, and phenotypic detection) to evaluate the application effectiveness of the super-resolution algorithm. Future research should focus on lightweighting super-resolution work while conducting more research on advanced vision tasks to more effectively evaluate the performance of super-resolution work.

[0151] Figure 21 This is a schematic diagram of the structure of the blurry chicken image reconstruction device provided in this application.

[0152] like Figure 21 As shown, the blurred chicken image reconstruction device includes: Module 2110 is used to acquire blurry chicken images; The super-resolution image reconstruction module 2120 is used to input the blurred chicken image into the super-resolution reconstruction model to obtain the super-resolution reconstructed image output by the super-resolution reconstruction model. The super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples. The degraded image samples were obtained in the following way: The high-resolution chicken image samples are subjected to region semantic classification processing to obtain region distribution results; the region distribution results include chicken target regions and non-target background regions. The goal of region distribution optimization is to increase the proportion of the target chicken region in the high-resolution chicken image samples. Based on the region distribution results, the region distribution of the high-resolution chicken image samples is optimized to obtain optimized chicken image samples. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples.

[0153] The fuzzy chicken image reconstruction device provided in this application achieves accurate identification of the target chicken region and non-target background region in high-resolution samples through region semantic classification. Then, based on the classification results, it optimizes the region distribution to increase the proportion of the target chicken region without losing scene context information. This directly reduces the ineffective computational consumption of redundant background in the training process and shortens the training cycle. At the same time, it avoids the problem of reduced model generalization ability caused by the complete removal of background. Then, it generates training samples through multi-process random combination degradation, which can fully cover various real degradation features of free-range chicken scenes. This significantly improves the adaptability of the trained super-resolution reconstruction model to the real scene, and finally achieves high-precision reconstruction of low-resolution chicken images, providing high-quality image input support for subsequent intelligent visual analysis tasks of free-range chicken scenes.

[0154] In one embodiment, the super-resolution reconstruction model is determined in the following manner: Construct high-resolution chicken image samples; The high-resolution chicken image samples are subjected to block-by-block semantic classification to obtain the region semantic classification results of each image block in the high-resolution chicken image samples. Based on the region semantic classification results, the target chicken region and non-target background region in the high-resolution chicken image samples are determined. Based on the target chicken region, the non-target background region is adaptively replaced to obtain an optimized chicken image sample with optimized region distribution. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples; Based on the high-resolution chicken image samples and their degraded image samples, a preset model is trained to obtain a super-resolution reconstruction model.

[0155] In one embodiment, constructing high-resolution chicken image samples includes: Obtain chicken image samples that meet the preset resolution requirements; Based on the comparison between the resolution of the chicken image sample and the target resolution, an adaptive size adjustment strategy is determined; the adaptive size adjustment strategy includes local cropping of the original image, pixel region stitching, or a combination of both operations. According to the adaptive size adjustment strategy, the resolution of the chicken image sample is adjusted to the target resolution to obtain a high-resolution chicken image sample.

[0156] In one embodiment, the step of performing block-by-block semantic classification on the high-resolution chicken image sample to obtain the region semantic classification result of each image block in the high-resolution chicken image sample, and determining the target chicken region and non-target background region in the high-resolution chicken image sample based on the region semantic classification results, includes: The high-resolution chicken image samples are input into the image patch semantic discrimination model to obtain the region semantic classification results of each image patch in the high-resolution chicken image samples output by the image patch semantic discrimination model; the image patch semantic discrimination model is obtained by training the model based on chicken images and their region semantic category labels, and the region semantic category labels are composed of the region semantic categories of each image patch in the chicken image; Image blocks whose semantic classification result is chicken target category are identified as chicken target regions, and image blocks whose semantic classification result is non-target background category are identified as non-target background regions.

[0157] In one embodiment, the image patch semantic discrimination model is used for: The high-resolution chicken image samples are downsampled and features are extracted to obtain feature maps; The feature map is subjected to dense connection processing to obtain an image patch feature sequence; the image patch feature sequence includes the feature vector of each image patch in the high-resolution chicken image sample; Regional semantic discrimination is performed on the feature vectors of each image patch to obtain the regional semantic classification results of each image patch.

[0158] In one embodiment, the step of adaptively replacing the non-target background region based on the target chicken region to obtain an optimized chicken image sample with optimized region distribution includes: Determine the largest connected region in the non-target background region, and determine the window based on the bounding box of the largest connected region; A sliding window is used to traverse all regions in the high-resolution chicken image sample to determine the matching degree between the chicken target region within the window and the maximum connected region; the matching degree is the maximum number of image blocks whose relative positions overlap between the chicken target region within the window and the maximum connected region. Replace the maximum connected region with the adaptation region corresponding to the window position with the highest matching degree, update the non-target background region, and iteratively execute the steps of determining the maximum connected region in the non-target background region and determining the window based on the bounding box of the maximum connected region until there is no connected region in the non-target background region, thus obtaining the optimized chicken image sample with optimized region distribution.

[0159] In one embodiment, the step of performing multi-process random combination degradation processing on the optimized chicken image samples to obtain degraded image samples includes: The execution order of blurring, noise addition, and downsampling operations is randomly shuffled to obtain a variety of random combinations of degradation processing flows. Among them, the blurring operation uses a combination of isotropic and anisotropic Gaussian kernels, the noise addition operation randomly selects from Gaussian noise, JPEG compression noise, and camera sensor noise, and the downsampling operation randomly selects from bicubic downsampling, bilinear downsampling, nearest neighbor interpolation downsampling, and downsampling followed by upsampling. According to the degradation processing procedure with multiple random combinations, the optimized chicken image samples are degraded to obtain degraded image samples.

[0160] It should be noted that the fuzzy chicken image reconstruction device provided in this application can execute the fuzzy chicken image reconstruction method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0161] Figure 22This is a schematic diagram of the structure of the electronic device provided in this application, such as... Figure 22 As shown, the electronic device may include: a processor 2210, a communications interface 2220, a memory 2230, and a communications bus 2240, wherein the processor 2210, the communications interface 2220, and the memory 2230 communicate with each other through the communications bus 2240. The processor 2210 can call logic instructions in the memory 2230 to execute a method for reconstructing a blurred chicken image. This method includes: acquiring a blurred chicken image; inputting the blurred chicken image into a super-resolution reconstruction model to obtain a super-resolution reconstructed image output by the super-resolution reconstruction model; wherein the super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples; the degraded image samples are obtained by: performing region semantic classification processing on the high-resolution chicken image samples to obtain region distribution results; the region distribution results include chicken target regions and non-target background regions; optimizing the region distribution based on the region distribution results, with the goal of increasing the proportion of the chicken target region in the high-resolution chicken image samples, to obtain optimized chicken image samples; and performing multi-process random combination degradation processing on the optimized chicken image samples to obtain degraded image samples.

[0162] Furthermore, the logical instructions in the aforementioned memory 2230 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0163] On the other hand, this application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the fuzzy chicken image reconstruction method provided in the above embodiments. The method includes: acquiring a fuzzy chicken image; inputting the fuzzy chicken image into a super-resolution reconstruction model to obtain a super-resolution reconstructed image output by the super-resolution reconstruction model; wherein the super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples; the degraded image samples are obtained by: performing regional semantic classification processing on the high-resolution chicken image samples to obtain regional distribution results; the regional distribution results include chicken target regions and non-target background regions; taking increasing the proportion of the chicken target regions in the high-resolution chicken image samples as the regional distribution optimization objective, and performing regional distribution optimization on the high-resolution chicken image samples based on the regional distribution results to obtain optimized chicken image samples; and performing multi-process random combination degradation processing on the optimized chicken image samples to obtain degraded image samples.

[0164] In another aspect, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to perform the blurry chicken image reconstruction method provided in the above embodiments. The method includes: acquiring a blurry chicken image; inputting the blurry chicken image into a super-resolution reconstruction model to obtain a super-resolution reconstructed image output by the super-resolution reconstruction model; wherein the super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples; the degraded image samples are obtained by: performing region semantic classification processing on the high-resolution chicken image samples to obtain region distribution results; the region distribution results include chicken target regions and non-target background regions; with increasing the proportion of the chicken target regions in the high-resolution chicken image samples as the region distribution optimization objective, and based on the region distribution results, performing region distribution optimization on the high-resolution chicken image samples to obtain optimized chicken image samples; and performing multi-process random combination degradation processing on the optimized chicken image samples to obtain degraded image samples.

[0165] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0166] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for reconstructing a blurry chicken image, characterized in that, The method for reconstructing the blurred chicken image includes: Obtain a blurry image of a chicken; The blurred chicken image is input into the super-resolution reconstruction model to obtain the super-resolution reconstructed image output by the super-resolution reconstruction model; The super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples. The degraded image samples were obtained in the following way: The high-resolution chicken image samples are subjected to region semantic classification processing to obtain region distribution results; the region distribution results include chicken target regions and non-target background regions. The goal of region distribution optimization is to increase the proportion of the target chicken region in the high-resolution chicken image samples. Based on the region distribution results, the region distribution of the high-resolution chicken image samples is optimized to obtain optimized chicken image samples. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples.

2. The method for reconstructing a fuzzy chicken image according to claim 1, characterized in that, The super-resolution reconstruction model was determined in the following way: Construct high-resolution chicken image samples; The high-resolution chicken image samples are subjected to block-by-block semantic classification to obtain the region semantic classification results of each image block in the high-resolution chicken image samples. Based on the region semantic classification results, the target chicken region and non-target background region in the high-resolution chicken image samples are determined. Based on the target chicken region, the non-target background region is adaptively replaced to obtain an optimized chicken image sample with optimized region distribution. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples; Based on the high-resolution chicken image samples and their degraded image samples, a preset model is trained to obtain a super-resolution reconstruction model.

3. The method for reconstructing a blurred chicken image according to claim 2, characterized in that, The construction of high-resolution chicken image samples includes: Obtain chicken image samples that meet the preset resolution requirements; Based on the comparison between the resolution of the chicken image sample and the target resolution, an adaptive size adjustment strategy is determined; the adaptive size adjustment strategy includes local cropping of the original image, pixel region stitching, or a combination of both operations. According to the adaptive size adjustment strategy, the resolution of the chicken image sample is adjusted to the target resolution to obtain a high-resolution chicken image sample.

4. The method for reconstructing a blurred chicken image according to claim 2, characterized in that, The step of performing block-by-block semantic classification on the high-resolution chicken image samples to obtain the region semantic classification results of each image block in the high-resolution chicken image samples, and determining the target chicken region and non-target background region in the high-resolution chicken image samples based on the region semantic classification results, includes: The high-resolution chicken image samples are input into the image patch semantic discrimination model to obtain the region semantic classification results of each image patch in the high-resolution chicken image samples output by the image patch semantic discrimination model; the image patch semantic discrimination model is obtained by training the model based on chicken images and their region semantic category labels, and the region semantic category labels are composed of the region semantic categories of each image patch in the chicken image; Image blocks whose semantic classification result is chicken target category are identified as chicken target regions, and image blocks whose semantic classification result is non-target background category are identified as non-target background regions.

5. The method for reconstructing a blurred chicken image according to claim 4, characterized in that, The image patch semantic discrimination model is used for: The high-resolution chicken image samples are downsampled and features are extracted to obtain feature maps; The feature map is subjected to dense connection processing to obtain an image patch feature sequence; the image patch feature sequence includes the feature vector of each image patch in the high-resolution chicken image sample; Regional semantic discrimination is performed on the feature vectors of each image patch to obtain the regional semantic classification results of each image patch.

6. The method for reconstructing a blurred chicken image according to claim 2, characterized in that, The step of adaptively replacing the non-target background region based on the target chicken region to obtain an optimized chicken image sample with optimized region distribution includes: Determine the largest connected region in the non-target background region, and determine the window based on the bounding box of the largest connected region; A sliding window is used to traverse all regions in the high-resolution chicken image sample to determine the matching degree between the chicken target region within the window and the maximum connected region; the matching degree is the maximum number of image blocks whose relative positions overlap between the chicken target region within the window and the maximum connected region. Replace the maximum connected region with the adaptation region corresponding to the window position with the highest matching degree, update the non-target background region, and iteratively execute the steps of determining the maximum connected region in the non-target background region and determining the window based on the bounding box of the maximum connected region until there is no connected region in the non-target background region, thus obtaining the optimized chicken image sample with optimized region distribution.

7. The method for reconstructing a fuzzy chicken image according to claim 2, characterized in that, The process of performing multi-step random combination degradation processing on the optimized chicken image samples to obtain degraded image samples includes: The execution order of blurring, noise addition, and downsampling operations is randomly shuffled to obtain a variety of random combinations of degradation processing flows. Among them, the blurring operation uses a combination of isotropic and anisotropic Gaussian kernels, the noise addition operation randomly selects from Gaussian noise, JPEG compression noise, and camera sensor noise, and the downsampling operation randomly selects from bicubic downsampling, bilinear downsampling, nearest neighbor interpolation downsampling, and downsampling followed by upsampling. According to the degradation processing procedure with multiple random combinations, the optimized chicken image samples are degraded to obtain degraded image samples.

8. A device for reconstructing a blurred chicken image, characterized in that, The blurred chicken image reconstruction device includes: The acquisition module is used to acquire blurry images of chickens; The super-resolution image reconstruction module is used to input the blurred chicken image into the super-resolution reconstruction model to obtain the super-resolution reconstructed image output by the super-resolution reconstruction model. The super-resolution reconstruction model is obtained by training a model based on high-resolution chicken image samples and their degraded image samples. The degraded image samples were obtained in the following way: The high-resolution chicken image samples are subjected to region semantic classification processing to obtain region distribution results; the region distribution results include chicken target regions and non-target background regions. The goal of region distribution optimization is to increase the proportion of the target chicken region in the high-resolution chicken image samples. Based on the region distribution results, the region distribution of the high-resolution chicken image samples is optimized to obtain optimized chicken image samples. The optimized chicken image samples are subjected to multi-process random combination degradation processing to obtain degraded image samples.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the blurry chicken image reconstruction method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, wherein a computer program is stored on the non-transitory computer-readable storage medium, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for reconstructing a blurred chicken image as described in any one of claims 1 to 7.