Method and system for rapidly detecting eye muscle area based on deep learning technology
Through deep learning technology, the ocular muscle segmentation model is constructed, which solves the problem of cumbersome and susceptible errors in the sulfuric acid paper method, and realizes rapid and automated detection of the pig eye muscle area, improves detection efficiency and accuracy, and is suitable for industrial breeding work.
Patent Information
- Application Number
- CN202411114275.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-10
AI Technical Summary
The "sulphate paper method" used in the prior art to measure the area of pig eye muscles is cumbersome, slow, and susceptible to subjective errors of the measuring personnel, and cannot achieve rapid automated and standardized batch detection.
Using a deep learning technology method, we use the method to collect and label the pig eye muscle area images to build an eye muscle segmentation model, and use the deep learning model to identify the target eye muscle area and calculate its area to achieve rapid, automated and standardized detection.
It realizes rapid, automated and standardized detection of pig eye muscle area, improves detection efficiency and accuracy, meets the needs of industrial breeding work, reduces the amount of parameters and enhances the performance of the model in complex environments.
Smart Images

Figure CN119107352A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rapid nondestructive detection and monitoring of agricultural products, and in particular to a method and system for rapid detection of eye muscle area based on deep learning technology. Background Art
[0002] Pork quality traits are one of the most important economic traits. The improvement of meat quality traits is of great significance to the selection of genetic breeding and the improvement of economic benefits. The size of pig eye muscle area is highly correlated with the lean meat rate of pig carcass and directly related to the lean meat growth rate of pigs. It is one of the important indicators for improving pig production performance. Most studies on pig meat production performance require the measurement of eye muscle area. The measurement results are related to the final effect of livestock and poultry genetic improvement. There are many methods for its measurement. In pig breeding, the current industry standard (NY / T 825-2004) stipulates that the "sulfuric acid paper method" is used as the gold standard for measuring eye muscle area.
[0003] At present, many genes related to pig eye muscle area have been discovered, but the phenotypic variance explained by the existing significant sites only accounts for a part of the heritability, and there is still a large amount of genetic variation that cannot be explained. Large-sample GWAS analysis (Genome-Wide Association Studies) can analyze many minor variant sites and is also one of the important strategies for analyzing missing heritability. However, in the actual process of pig breeding, the "sulfuric acid paper method" used to measure the eye muscle area of pigs is often criticized as a speed-limiting step because it requires cutting sulfuric acid paper, manually tracing muscle contours, scanning and other operations. In addition, in the link of "manually tracing muscle contours", it is easily affected by the subjective measurement errors of different measurement personnel.
[0004] In response to the problems of the prior art, the present invention provides a method and system for quickly detecting eye muscle area based on deep learning technology. Summary of the invention
[0005] In view of the problems of the current existing technology, the purpose of the present invention is to provide a standardized, rapid and automated method for batch detection of eye muscle area based on deep learning technology.
[0006] The present invention provides a method for quickly detecting eye muscle area based on deep learning technology, the method comprising:
[0007] Acquire an eye muscle area image of the object to be detected;
[0008] Inputting the eye muscle region image into an eye muscle segmentation model to identify a target eye muscle region;
[0009] Based on the target eye muscle area, the eye muscle area of the object to be detected is calculated.
[0010] According to one embodiment of the present invention, the eye muscle segmentation model is constructed by the following steps:
[0011] preparing an eye muscle sample of a subject to be tested;
[0012] Collecting the original digital image of the eye muscle sample;
[0013] The original digital image is processed based on deep learning technology to obtain the eye muscle segmentation model.
[0014] According to one embodiment of the present invention, the eye muscle sample is prepared by the following steps:
[0015] Slaughtering a plurality of objects to be tested of the same species in the same feeding environment, the same feeding standard and the same feeding time to obtain carcasses;
[0016] The carcass is subjected to acid removal and segmentation processing, and the longissimus dorsi muscle is sampled to obtain the eye muscle sample.
[0017] According to one embodiment of the present invention, the original digital image is acquired by the following steps: in the same acquisition environment, the original digital image of the eye muscle sample is acquired by an image acquisition system, wherein:
[0018] The image acquisition system includes but is not limited to:
[0019] A dark box with a reflective material formed on the inner wall and a ring-shaped light strip installed on the top, wherein a circular hole is opened on the top of the dark box;
[0020] A photographing device, wherein the lens of the photographing device is directed toward the circular hole of the dark box;
[0021] A solid color background plate, which is formed based on the bottom plate inside the dark box and is used for placing the eye muscle sample and reference mark;
[0022] The reference mark has a color different from that of the solid color background plate.
[0023] According to one embodiment of the present invention, the original digital image is processed based on deep learning technology through the following steps:
[0024] Annotating the eye muscle area in the original digital image to obtain annotated data;
[0025] Combining the original digital image and the annotated data as training data, and dividing the training data into a training set and a validation set;
[0026] For the deep learning model, the training set and the validation set are used to perform model training and validation to obtain the eye muscle segmentation model.
[0027] According to one embodiment of the present invention, the deep learning model consists of a first layer combination, a skeleton network, and a second layer combination, wherein: the first layer combination and the second layer combination adopt ConvBNSiLU.
[0028] According to one embodiment of the present invention, the skeleton network is composed of a plurality of block units, wherein:
[0029] Each of the block units comprises a first depthwise separable convolutional layer, a plurality of fully connected layers connected by star operations, an attention mechanism layer, and a second depthwise separable convolutional layer connected in sequence, wherein:
[0030] The attention mechanism layer includes an average pooling layer, a first convolutional layer, a third depth-separable convolutional layer, a fourth depth-separable convolutional layer, a second convolutional layer, and an activation function, which are connected in sequence.
[0031] According to one embodiment of the present invention, the eye muscle area of the object to be detected is calculated by the following expression:
[0032]
[0033] Among them: S1 represents the eye muscle area of the object to be tested; S0 represents the area of the reference area; p1 represents the number of pixels in the target eye muscle area of the object to be tested; p0 represents the number of pixels in the reference area.
[0034] According to another aspect of the present invention, a storage medium is provided, which contains instructions for executing any of the above methods.
[0035] According to another aspect of the present invention, there is also provided a system for quickly detecting eye muscle area based on deep learning technology, which executes the method described in any one of the above items, and the system comprises:
[0036] A digital image acquisition device, which is used to acquire the image of the eye muscle area of the object to be detected;
[0037] A target eye muscle segmentation module, which is used to input the eye muscle area image into an eye muscle segmentation model to identify the target eye muscle area;
[0038] The eye muscle area calculation module is used to calculate the eye muscle area of the object to be detected based on the target eye muscle area.
[0039] The present invention provides a method and system for quickly detecting eye muscle area based on deep learning technology, which has the following advantages over the prior art:
[0040] 1) Compared with the traditional "sulfuric acid paper method" for measuring eye muscle area, the method of the present invention is simple, efficient and stable, and can achieve standardization, rapid automation and batch processing, which fully meets the needs of collecting huge phenotypic data in industrial breeding work.
[0041] 2) The deep learning model provided by the present invention is improved on the basis of YOLOv8n-seg, and uses block units for feature extraction, which effectively reduces the amount of parameters and improves the performance of the model.
[0042] 3) The block unit provided by the present invention is improved on the basis of Star-Net, and an attention mechanism layer is inserted at the position of the fully connected layer, which can effectively enhance the model's ability to capture remote context information.
[0043] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0045] Figure 1 A flowchart showing the steps of a method for quickly detecting eye muscle area based on deep learning technology according to an embodiment of the present invention is shown;
[0046] Figure 2 A structural diagram of a deep learning model according to an embodiment of the present invention is shown.
[0047] Figure 3 A workflow diagram of a method for quickly detecting eye muscle area based on deep learning technology according to an embodiment of the present invention is shown;
[0048] Figure 4 A schematic diagram showing the processing of a digital image using a deep learning technique according to an embodiment of the present invention is shown;
[0049] Figure 5 A correlation analysis diagram between the "sulfuric acid paper method" according to an embodiment of the present invention and the method of the present invention is shown.
[0050] In the accompanying drawings, the same reference numerals are used for the same components. In addition, the accompanying drawings are not drawn according to the actual scale. DETAILED DESCRIPTION
[0051] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
[0052] Prior art (CN117974757A) discloses a method and system for detecting eye muscle area of livestock and poultry, including: obtaining eye muscle samples of livestock and poultry groups to be tested, and collecting original images of eye muscle samples to be tested, the original images containing eye muscle samples to be tested and reference marks; performing morphological transformation processing on the original images, identifying muscle areas and reference mark areas in the images; calculating the muscle area of the current eye muscle sample according to the number of pixels in the muscle area and the reference mark area, combined with the actual area of the reference mark. However, the prior art detects and identifies the eye muscle area through computer vision technology, and does not involve rapid detection of eye muscle area through deep learning technology, and the technical route is different from that of the present application.
[0053] Existing technology (Qian Qinqin. Research on the evaluation method of intramuscular fat in living pigs based on deep learning CT radiomics [D]. Jiangnan University, 2022. DOI: 10.27169 / d.cnki.gwqgu.2022.001124.) proposes a method based on a deep neural network framework to predict the IMF content in different rib eye muscle parts of live pigs.
[0054] Existing technology (Chen Hongling. Detection of fat content in pig B-ultrasound images based on deep learning [D]. Chongqing University of Technology, 2020. DOI: 10.27753 / d.cnki.gcqgx.2020.000196.) uses 135 groups of pig eye muscle B-ultrasound images and physical and chemical test data as experimental samples, and uses deep learning technology to study the non-destructive detection method of fat content detection in pig eye muscle B-ultrasound images. The research goal is to establish a convolutional network prediction model to predict the intramuscular fat content of pig eye muscle area from pig B-ultrasound images.
[0055] The existing technology (Zhang Meng, Zhong Nan. Application of radial basis function neural network in the prediction of lean meat rate of pig carcasses [J]. Agricultural Mechanization Research, 2017, 39(06): 188-192+197. DOI: 10.13427 / j.cnki.njyi.2017.06.037.) uses MatLab toolbox as a research tool, and uses three different neural networks such as BP, Elman and RBF to establish a prediction model, and then conducts comparative analysis after statistics.
[0056] The prior art (CN114663359A) provides a method for detecting the intramuscular fat content of pigs and related products thereof, the method comprising: determining the bottom layer back fat curve in the image to be detected based on a collected image to be detected containing the pig's eye muscle area; based on the bottom layer back fat curve, intercepting a target area image in the image to be detected; and detecting the target area image using a detection model based on a deep neural network to determine the intramuscular fat content of the pig.
[0057] The prior art (CN116823920A) discloses a non-destructive determination method for the backfat thickness, eye muscle area and intramuscular fat content of a pig. First, a B-ultrasound image of the pig is obtained; the B-ultrasound image of the pig is optimized and data enhanced, and input into an image segmentation model to be segmented into a backfat area mask, an eye muscle area mask and a backfat and eye muscle area; the backfat area mask area and perimeter, and the eye muscle area are calculated using the Green's formula, and the backfat thickness of the pig is determined according to the backfat area mask area and perimeter; the backfat area image is removed from the backfat and eye muscle area image to obtain the eye muscle area image; the eye muscle area image is subjected to color histogram equalization to extract grayscale-gradient co-occurrence matrix parameters; the backfat thickness, eye muscle area and grayscale-gradient co-occurrence matrix parameters of the pig are input into a recurrent neural network prediction model for prediction to obtain the intramuscular fat content.
[0058] The prior art (CN117426796A) is a method and device for measuring the thickness of animal back fat and eye muscles based on machine learning, which locates the collection points of the back curve of an animal object to obtain the positioning coordinate values of the collection points of the back curve of the animal object; sends the positioning coordinate values of the collection points of the back curve of the animal object to a robotic arm equipped with an ultrasound probe, and the robotic arm tracks the collection points according to the positioning coordinate values, and after dipping the coupling agent from a coupling agent container, the ultrasound probe is attached to the collection points of the back curve of the animal object; the ultrasound probe is controlled to collect ultrasound video images of the collection points, and a ultrasound video file of the collection points is generated; a preset number of ultrasound image frames are extracted from the ultrasound video file, and the acquired preset number of ultrasound image frames are converted into grayscale to measure the back fat and eye muscle thickness of the animal object.
[0059] In summary, the above six prior arts measure the specific shape of animals through neural networks, but cannot achieve standardized, rapid and automated segmentation and selection of the target area of the pig's eye muscles.
[0060] The rapid development of deep learning technology has provided great opportunities for the phenotyping of agricultural animals. The application of deep learning technology in this field provides agricultural production with accurate, efficient, and contactless visual analysis and evaluation methods. The reason why this technology can be widely used in a short period of time is that after the manually annotated digital images are trained and verified, the trained deep learning model can accurately segment the target area like a human after learning, without being disturbed by factors such as fat, connective tissue, and irrelevant areas of similar color in the original image, so that the assessment of eye muscle area is not affected by confounding factors. Compared with traditional computer vision technology, these technologies have better uniformity, accuracy and speed.
[0061] Based on this, the present invention uses computer vision technology and deep learning methods to construct a corresponding pig phenotypic trait data set, and proposes a method for automatically measuring the pig eye muscle area. In view of the problems of multiple steps, slow speed, instability, etc. in the traditional "sulfuric acid paper method" used for measuring eye muscle area in the current breeding phenotypic data collection link of breeding pigs, the present invention has specially developed a method and system for detecting eye muscle area based on deep learning technology. The present invention annotates the collected original digital images, inputs the original digital images and the corresponding annotation files into the deep learning model for model training and verification, so that it learns the characteristics of the eye muscle area. After the digital images to be tested are batch-inputted into the trained eye muscle segmentation model, the standardized, fast, automated, accurate segmentation and selection of the eye muscle area can be achieved, and batch processing can be realized, which realizes the improvement of the efficiency of phenotypic determination and provides technical reserves for the establishment of an industrialized process for livestock and poultry breeding.
[0062] Figure 1 A flowchart of the steps of a method for quickly detecting eye muscle area based on deep learning technology according to an embodiment of the present invention is shown.
[0063] like Figure 1 As shown, in step S101, an eye muscle area image of an object to be detected is collected. Specifically, the object to be detected is livestock and poultry. Further, the object to be detected is a pig. In practical application, the present invention can be applied to a fully automatic slaughtering line, and an eye muscle area image of a pig is collected by a digital image acquisition device.
[0064] like Figure 1 As shown, in step S102, the eye muscle region image is input into the eye muscle segmentation model to identify the target eye muscle region. Specifically, the eye muscle segmentation model is constructed by the following steps: preparing an eye muscle sample of the object to be detected; collecting the original digital image of the eye muscle sample; processing the original digital image based on deep learning technology to obtain the eye muscle segmentation model.
[0065] In one embodiment, the eye muscle sample is prepared by the following steps: a plurality of objects to be detected of the same variety under the same feeding environment, the same feeding standard and the same feeding time are uniformly slaughtered to obtain a carcass; the carcass is subjected to acid removal and segmentation treatment, and the longissimus dorsi muscle part is sampled respectively to obtain an eye muscle sample. Specifically, in order to effectively reduce the batch effect and group stratification phenomenon that may occur in the later image acquisition and data processing process, it is required that the phenotype object group to be detected is raised to a consistent market age under a unified environment and feeding standard before being slaughtered. In order to achieve batch processing and reduce the impact of environmental factors, after the group of objects to be detected is slaughtered, the carcass is uniformly acid-removed in a cold storage at 0 to 4°C for 24 hours, and then it is segmented, and the longissimus dorsi muscle (eye muscle) at 5 to 6 ribs of the left half of the carcass is uniformly sampled as an eye muscle sample.
[0066] In one embodiment, the original digital image is acquired through the following steps: Under the same acquisition environment, the original digital image of the eye muscle sample is acquired through an image acquisition system.
[0067] Specifically, the image acquisition system includes but is not limited to: a dark box, a camera, a solid color background plate, and a reference mark. Among them: the inner wall of the dark box is formed with a reflective material and a ring light strip is installed on the top, and a circular hole is opened on the top of the dark box; the lens of the camera is facing the circular hole of the dark box; the solid color background plate is formed based on the bottom plate inside the dark box, and is used to place the eye muscle sample and the reference mark; the color of the reference mark is different from the color of the solid color background plate.
[0068] In one embodiment, the original digital image is processed based on deep learning technology through the following steps: the eye muscle area in the original digital image is labeled to obtain labeled data; the original digital image and the labeled data are combined as training data, and the training data is divided into a training set and a verification set; for a deep learning model, the training set and the verification set are used to perform model training and verification to obtain an eye muscle segmentation model.
[0069] like Figure 1 As shown, in step S103, based on the target eye muscle area, the eye muscle area of the object to be detected is calculated. Specifically, the eye muscle area of the object to be detected is calculated by the following expression:
[0070]
[0071] Among them: S1 represents the eye muscle area of the object to be tested; S0 represents the area of the reference area; p1 represents the number of pixels in the target eye muscle area of the object to be tested; p0 represents the number of pixels in the reference area.
[0072] In practical application, the present invention can be applied to a fully automatic slaughtering line, that is, a reference area is set on the fully automatic slaughtering line, and the image of the pig's eye muscle area (including the reference area) is collected by a digital image acquisition device. It should be noted that the reference area can be a reference object of any color, any material, and any shape, and the present invention does not limit the setting and form of the reference area.
[0073] Based on deep learning technology, the present invention labels the collected muscle samples, and inputs the original digital image and the corresponding annotation file into the deep learning model for model training and verification, so that the model can learn the characteristics of the eye muscle area, and the trained eye muscle segmentation model can realize the standardized, rapid and automated segmentation and selection of the muscle target area.
[0074] Figure 2 A structural diagram of a deep learning model according to an embodiment of the present invention is shown.
[0075] like Figure 2 As shown in the figure, the deep learning model (C2f-SCA) consists of the first layer combination, the skeleton network, and the second layer combination, where the first layer combination and the second layer combination use ConvBNSiLU. Specifically, ConvBNSiLU is a layer combination in the deep learning model, combining the convolution layer (Convolution Layer), the batch normalization layer (Batch Normalization Layer) and the activation function (SiLU, Sigmoid Linear Unit). The functions are: extracting local features from the input data; accelerating the training process, improving the stability of the model, and introducing nonlinearity, so that the model can better fit complex data patterns.
[0076] like Figure 2 As shown, the first layer combination is connected to the skeleton network through the Split operation. Specifically, the Split operation divides the input data or feature map into multiple parts for independent processing, which is used to improve computational efficiency or achieve multi-scale processing.
[0077] like Figure 2 As shown, the skeleton network is connected to the second layer combination through the Concat operation. Specifically, the Concat operation is used to merge multiple processed feature maps or data together. Furthermore, the Concat operation is applied when the deep learning model needs to process multi-scale features or multiple processing branches.
[0078] like Figure 2As shown in the figure, the skeleton network consists of multiple block units (Star Block) connected in series, wherein: each block unit includes a first depth-separable convolutional layer (DW-Conv 7×7) connected in sequence, multiple fully connected layers (Fully Connected, FC) connected by star operations, an attention mechanism layer (Context Anchor Attention, CAA), and a second depth-separable convolutional layer (DW-Conv 7×7), wherein: the attention mechanism layer includes an average pooling layer (AvgPool), a first convolutional layer (Conv 1×1), a third depth-separable convolutional layer (DW-Conv 1×11), a fourth depth-separable convolutional layer (DW-Conv 11×1), a second convolutional layer (Conv 1×1), and an activation function (Sigmoid) connected in sequence.
[0079] like Figure 2 As shown in the figure, the output of the fully connected layer passes through ReLU6. Specifically, ReLU6 refers to the Rectified Linear Unit, also known as the rectified linear unit.
[0080] like Figure 2 As shown in the figure, multiple fully connected layers are connected by star operations (*). Specifically, the star operation (element-wise mul. (star)) refers to the element-wise multiplication of two matrices or tensors. In neural networks, element-wise multiplication is used in attention mechanisms or weight modulation. By element-wise multiplication, feature maps can be weighted to enhance or suppress certain features.
[0081] With the development of science and technology, the automated pig slaughtering line has become more and more perfect, and it has become possible to collect phenotypic traits on the automated slaughtering line. In recent years, computer vision technology has been widely used in various detection tasks in the agricultural field, and with the introduction of deep learning, the processing speed and efficiency have also achieved a qualitative leap.
[0082] In order to automatically collect the phenotypic trait of pig eye muscle area on the fully automatic slaughtering line and cope with the challenges of limited equipment resources and complex detection background on the slaughtering line, the present invention selects the YOLOv8n-seg model (target detection and segmentation model) as the baseline network for the segmentation of eye muscle area and makes a number of improvements.
[0083] First, the present invention introduces Star-Net to replace the backbone network of the YOLOv8n-seg model; Star-Net is a super-strong and lightweight Backbone (network skeleton) proposed by Microsoft, which can achieve high performance without complex design or carefully selected hyperparameters, surpassing many efficient designs. It integrates Star Operation, a method of fusing different subspace features through element-level multiplication, into the neural network and stacks multiple layers, each layer exponentially increasing the complexity of the implicit dimension. This efficient feature fusion method enables Star Operation to achieve nearly infinite dimensions in a compact feature space, thereby greatly improving the representation ability and performance of the model.
[0084] It should be noted that Star-Net comes from the existing technology (Ma X, Dai X, Bai Y, et al. Rewrite the Stars [C] / / Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2024: 5694-5703.).
[0085] Secondly, the present invention designs a residual feature learning module C2F-SCA based on CAA and Star-Net. The goal of CAA (Context Anchor Attention) is to grasp the contextual interdependence between distant pixels while enhancing the central features. In each StarBlock, a star operation is applied to merge features from two different branches.
[0086] like Figure 2 As shown, the residual learning module C2f-SCA is a deep learning model constructed by the present invention. Specifically, compared with the previous YOLO series, YOLOv8 adopts the C2f structure and provides a richer gradient flow. The present invention first replaces the Bottleneck in the C2f module of YOLOv8 with the StarBlock in Star-Net for feature extraction, which effectively reduces the amount of parameters and improves the performance of the model. And the present invention inserts the CAA attention mechanism layer at the fully connected layer in the StarBlock module, which can effectively enhance the model's ability to capture remote contextual information. The CAA attention mechanism layer is strategically positioned in the neck network to enhance the model's ability to capture and extract feature information of the eye muscle area in a complex environment.
[0087] Figure 3 A workflow diagram of a method for quickly detecting eye muscle area based on deep learning technology according to an embodiment of the present invention is shown.
[0088] like Figure 3 As shown, the present invention constructs an eye muscle segmentation model that can realize automatic segmentation of the eye muscle area through a deep learning algorithm, and can perform batch processing on the collected muscle digital images.
[0089] Step S301: uniform feeding of the group of objects to be tested and uniform slaughter and muscle sample collection of the group of objects to be tested. Specifically, in order to obtain the eye muscle samples to be tested, the group of objects to be tested needs to be raised in a uniform environment and feeding standards until the market age (about 200 days old) and then slaughtered. The slaughtered carcasses are placed in a cold storage at 0-4°C for 24 hours to remove acid, and then the carcasses are divided and the longissimus dorsi muscle at the 5th to 6th ribs of the left half of the carcass is sampled.
[0090] Step S302: Digital image acquisition of the eye muscle sample to be tested. Specifically, the eye muscle sample is placed in the image acquisition system, and the original digital image of the longissimus dorsi muscle (eye muscle) is captured. Furthermore, a complete (digital) image acquisition system includes: a dark box, a light source, a background plate, a camera, a computer and other parts. Furthermore, in order to avoid the influence of factors such as the environment and the acquisition equipment on the collected original pork image during the image acquisition process, it is necessary to ensure that the equipment is highly sealed, the light intensity of the light source is consistent, and the lighting is uniform, which is conducive to the subsequent image feature analysis and extraction.
[0091] Step S303: Annotate the collected original digital image, input the original digital image and the corresponding annotation file into the deep learning model for model training and verification, so that the model can learn the characteristics of the eye muscle area. Specifically, the high-definition original digital image collected in step S202 includes a solid color background plate, a sample label (for clarifying the sample number), an internal reference (reference mark), and the longissimus dorsi muscle (eye muscle). At the same time, fascia, excess adipose tissue, and irrelevant areas of similar color may be attached around the muscle. In addition, there may be water stains, reflective spots and other uncertain factors, that is, not all of the collected original digital images are target areas, so manual annotation is required to mark the target area and input it into the deep learning model to make it learn the characteristics of the target area, i.e., the eye muscle area, and then build an automatic segmentation model for the eye muscle area.
[0092] Step S304: Batch input digital images into the trained eye muscle region segmentation model to achieve automatic eye muscle region separation and calculate its area. Specifically, after batch input of digital images, the trained eye muscle region segmentation model will automatically separate the target area (muscle area) and calculate the muscle area based on the ratio of the number of pixels in the target area to the number of pixels in the internal reference area.
[0093] The present invention is achieved by Figure 3The step-by-step process shown in the figure constructs an eye muscle segmentation model, which can overcome the problems of traditional eye muscle area measurement methods, such as being time-consuming, labor-intensive, and susceptible to subjective influences from different measurement personnel, and provide technical support for the standardized, rapid, and automated collection of phenotypes in livestock and poultry breeding.
[0094] In one embodiment, in order to verify the actual effect of the method proposed by the present invention, the specific implementation steps are as follows:
[0095] 1. Preparation of eye muscle samples
[0096] The 3,105 samples involved in this case were obtained from slaughtering at a pig breeding company in Nanchang, China. All the individuals were Landrace or Landrace breeds. They were uniformly slaughtered after intensive feeding for 200 days under a unified feeding environment and feed standard. The carcasses were placed in a cold storage at 0-4°C for 24 hours to remove acid, and then the carcasses were cut and the longissimus dorsi muscle at the 5th to 6th ribs of the left half of the carcass was sampled and measured.
[0097] 2. Build a high-definition digital image capture system
[0098] When using digital image processing technology to collect pork samples, it is necessary to first establish a complete image information collection system, mainly including a dark box, light source, camera, lens, computer, etc. (such as Figure 3 ). In order to avoid the influence of factors such as the environment and acquisition equipment on the collected original pork images during the image acquisition process, it is necessary to ensure that the equipment is highly sealed, the light source has consistent light intensity, and the lighting is uniform, which is conducive to the subsequent image feature analysis and extraction.
[0099] The image acquisition system consists of a Nikon D5200 digital camera (image format is Jpg, image resolution is 6000px × 4000px), a lighting room, a pure black background plate (pure color background plate), a pure white internal reference (reference mark) and a light source (ring LED light strip). Figure 3 As shown in the figure, the illumination room is a 40*40*40cm dark box with a reflective inner wall and a ring-shaped LED light strip on the top with a total power of 30W, which can form a uniform lighting environment. A circular hole with a radius of 7cm is opened on the top of the dark box to place the digital camera lens for picture shooting. During the shooting process, a 2cm thick pork sample is naturally placed on the pure black background board at the bottom, and a pure white internal reference block of 2cm*2cm is placed next to the sample for subsequent area calculation. The collected images are transferred to the PC using an SD card, and the collected images are processed using deep learning technology based on python software.
[0100] 3. Processing original digital images based on deep learning technology
[0101] After collecting the high-definition original digital image of the pork eye muscle sample, the original digital image needs to be annotated, and the original digital image and the corresponding annotation file need to be input into the deep learning model so that the model can learn the characteristics of the eye muscle area, thereby realizing the standardized, rapid and automated segmentation of the eye muscle area.
[0102] First, the original digital image is labeled with the eye muscle area, and LabelMe software can be used. Secondly, the original digital image and the labeled file are divided according to the ratio of training set: verification set = 8:2, and stored in a specific folder. The deep learning model will read all the original images and corresponding labeled files in the target folder path for model training and verification. Finally, the eye muscle area image to be tested is stored in a custom selected folder, and the folder path is input into the eye muscle segmentation model; the eye muscle segmentation model will automatically read all images in the target folder path and perform standardized, fast and automated segmentation of the eye muscle area.
[0103] Figure 4 A schematic diagram of digital image processing using deep learning technology according to an embodiment of the present invention is shown.
[0104] like Figure 4 The actual segmentation effect is demonstrated. First, the eye muscle area in the original digital image is manually annotated; secondly, the original digital image and the corresponding annotation file are input into the deep learning model for model training and verification; finally, the eye muscle area images to be tested are input into the model for batch eye muscle segmentation. The eye muscle segmentation model can standardize and quickly and automatically segment the eye muscle area. After the above steps, the target eye muscle area has been segmented and selected in batches. At the same time, the area of the internal reference block is known to be 4 cm 2 , then the final eye muscle area is: 4 / number of internal reference pixels*number of eye muscle pixels.
[0105] Figure 5 A correlation analysis diagram between the "sulfuric acid paper method" according to an embodiment of the present invention and the method of the present invention is shown.
[0106] like Figure 5 According to the industry standard (NY / T 825-2004), the sample eye muscle area was measured using the "sulfuric acid paper method", and the eye muscle area measured by the gold standard "sulfuric acid paper method" was correlated with the results of the deep learning technology method proposed in the present invention. The results show that ( Figure 5 ), the correlation coefficient R of the two methods 2 As high as 0.97, it proves that the results measured by the patented method of the present invention have good reliability.
[0107] In summary, the method and system for standardizing and rapidly automating the eye muscle area based on deep learning technology of the present invention are feasible, and have the characteristics of being fast, convenient, and stable. The measurement results also show that this is a very promising method for measuring the eye muscle area.
[0108] The method and system for quickly detecting eye muscle area based on deep learning technology provided by the present invention can also be used in conjunction with a computer-readable storage medium, on which a computer program is stored, and the computer program is executed to run a method for quickly detecting eye muscle area based on deep learning technology. The computer program can run computer instructions, which include computer program code, and the computer program code can be in source code form, object code form, executable file, or some intermediate form, etc.
[0109] Computer-readable storage media may include: any entity or device that can carry computer program code, recording media, USB flash drives, mobile hard disks, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0110] It should be noted that the content contained in computer-readable storage media can be appropriately increased or decreased based on the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, based on legislation and patent practices, computer-readable storage media do not include electrical carrier signals and telecommunications signals.
[0111] According to another aspect of the present invention, a system for quickly detecting eye muscle area based on deep learning technology is provided, which implements a method for quickly detecting eye muscle area based on deep learning technology. The system includes: a digital image acquisition device, a target eye muscle segmentation module, and an eye muscle area calculation module.
[0112] Specifically, the digital image acquisition device is used to acquire the eye muscle area image of the object to be detected; the target eye muscle segmentation module is used to input the eye muscle area image into the eye muscle segmentation model to identify the target eye muscle area; the eye muscle area calculation module is used to calculate the eye muscle area of the object to be detected based on the target eye muscle area.
[0113] In practical applications, the digital image acquisition device can be set up on a fully automatic slaughtering line to automatically acquire digital images of the pig eye muscle area. The target eye muscle segmentation module and the eye muscle area calculation module can be integrated into the host computer to perform eye muscle area recognition and eye muscle area calculation on the digital images acquired by the digital image acquisition device.
[0114] In summary, the present invention provides a method and system for quickly detecting eye muscle area based on deep learning technology, which has the following advantages over the prior art:
[0115] 1) Compared with the traditional "sulfuric acid paper method" for measuring eye muscle area, the method of the present invention is simple, efficient and stable, and can achieve standardization, rapid automation and batch processing, which fully meets the needs of collecting huge phenotypic data in industrial breeding work.
[0116] 2) The deep learning model provided by the present invention is improved on the basis of YOLOv8n-seg, and uses block units for feature extraction, which effectively reduces the amount of parameters and improves the performance of the model.
[0117] 3) The block unit provided by the present invention is improved on the basis of Star-Net, and an attention mechanism layer is inserted at the position of the fully connected layer, which can effectively enhance the model's ability to capture remote context information.
[0118] It should be understood that the embodiments disclosed in the present invention are not limited to the specific structures, processing steps or materials disclosed herein, but should be extended to equivalent substitutions of these features understood by ordinary technicians in the relevant field. It should also be understood that the terms used herein are only used for the purpose of describing specific embodiments and are not meant to be limiting.
[0119] In the description of the present invention, unless otherwise specified, "plurality" means two or more than two; the orientations or positional relationships indicated by the terms "upper", "lower", "left", "right", "inner", "outer", "front end", "rear end", "head", "tail", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0120] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0121] Certain terms are used throughout this application document to indicate specific system components. As those skilled in the art will recognize, different names can usually be used to indicate the same components, so this application document is not intended to distinguish those components that are only different in name but not in function. In this application document, the terms "comprise", "include" and "have" are used in an open form, and therefore should be interpreted as meaning "including but not limited to...". In addition, the terms "substantially", "substantially" or "approximately" that may be used in this article relate to the tolerances of the corresponding terms accepted by the industry. The term "coupling" as may be used in this article includes direct coupling and indirect coupling via other components, elements, circuits, or modules, wherein for indirect coupling, the components, elements, circuits, or modules between them do not change the information of the signal but can adjust its current level, voltage level, and / or power level. Inferred coupling (for example, one of the elements is coupled to another element by inference) includes direct and indirect coupling between two elements in the same way as "coupling".
[0122] The "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" appearing in various places throughout the specification do not necessarily refer to the same embodiment.
[0123] The embodiments of the present invention are given for the purpose of illustration and description, and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.
[0124] Although the embodiments disclosed in the present invention are as above, the contents described are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.
Claims
1. A method for rapid detection of eye muscle area based on deep learning technology. It is characterized in that The method comprises: Acquire an eye muscle area image of the object to be detected; Inputting the eye muscle region image into an eye muscle segmentation model to identify a target eye muscle region; Based on the target eye muscle area, the eye muscle area of the object to be detected is calculated.
2. A method for rapidly detecting eye muscle area based on deep learning technology as claimed in claim 1, It is characterized in that The eye muscle segmentation model is constructed by the following steps: preparing an eye muscle sample of a subject to be tested; Acquiring an original digital image of the eye muscle sample; The original digital image is processed based on deep learning technology to obtain the eye muscle segmentation model.
3. A method for rapidly detecting eye muscle area based on deep learning technology as claimed in claim 2, It is characterized in that The eye muscle samples were prepared by the following steps: Slaughtering a plurality of objects to be tested of the same species in the same feeding environment, the same feeding standard and the same feeding time to obtain carcasses; The carcass is subjected to acid removal and segmentation processing, and the longissimus dorsi muscle is sampled to obtain the eye muscle sample.
4. A method for rapidly detecting eye muscle area based on deep learning technology as claimed in claim 2 or 3, It is characterized in that The original digital image is acquired by the following steps: Under the same acquisition environment, the original digital image of the eye muscle sample is acquired by an image acquisition system, wherein: The image acquisition system includes but is not limited to: A dark box with a reflective material formed on the inner wall and a ring-shaped light strip installed on the top, wherein a circular hole is opened on the top of the dark box; A photographing device, wherein the lens of the photographing device is directed toward the circular hole of the dark box; A solid color background plate, which is formed based on the bottom plate inside the dark box and is used for placing the eye muscle sample and reference mark; The reference mark has a color different from that of the solid color background plate.
5. A method for quickly detecting eye muscle area based on deep learning technology according to any one of claims 2 to 4, It is characterized in that The original digital image is processed based on deep learning technology through the following steps: Annotating the eye muscle area in the original digital image to obtain annotated data; Combining the original digital image and the annotated data as training data, and dividing the training data into a training set and a validation set; For the deep learning model, the training set and the validation set are used to perform model training and validation to obtain the eye muscle segmentation model.
6. A method for rapidly detecting eye muscle area based on deep learning technology as claimed in claim 5, It is characterized in that The deep learning model consists of a first layer combination, a skeleton network, and a second layer combination, wherein: the first layer combination and the second layer combination adopt ConvBNSiLU.
7. A method for rapidly detecting eye muscle area based on deep learning technology as claimed in claim 6, It is characterized in that The skeleton network is composed of multiple block units, where: Each of the block units comprises a first depthwise separable convolutional layer, a plurality of fully connected layers connected by star operations, an attention mechanism layer, and a second depthwise separable convolutional layer connected in sequence, wherein: The attention mechanism layer includes an average pooling layer, a first convolutional layer, a third depth-separable convolutional layer, a fourth depth-separable convolutional layer, a second convolutional layer, and an activation function, which are connected in sequence.
8. A method for quickly detecting eye muscle area based on deep learning technology according to any one of claims 1 to 7, It is characterized in that The eye muscle area of the object to be tested is calculated by the following expression: Where: S 1 Indicates the eye muscle area of the object to be tested; S 0 represents the area of the reference region; p 1 Indicates the number of pixels in the target eye muscle area of the object to be tested; p 0 Represents the number of pixels in the reference area.
9. A storage medium, It is characterized in that It contains instructions for executing the method as claimed in any one of claims 1-8.
10. A system for rapid detection of eye muscle area based on deep learning technology. It is characterized in that The method according to any one of claims 1 to 8 is performed, wherein the system comprises: A digital image acquisition device, which is used to acquire the image of the eye muscle area of the object to be detected; A target eye muscle segmentation module, which is used to input the eye muscle area image into an eye muscle segmentation model to identify the target eye muscle area; The eye muscle area calculation module is used to calculate the eye muscle area of the object to be detected based on the target eye muscle area.
Citation Information
Cited By
Non-contact in-vivo pig eye muscle area determination method based on point cloud and deep learning
CN120807615A
