CN115266752A - Method and device for judging white stripe grade of chicken breast - Google Patents

Method and device for judging white stripe grade of chicken breast Download PDF

Info

Publication number
CN115266752A
CN115266752A CN202210848846.5A CN202210848846A CN115266752A CN 115266752 A CN115266752 A CN 115266752A CN 202210848846 A CN202210848846 A CN 202210848846A CN 115266752 A CN115266752 A CN 115266752A
Authority
CN
China
Prior art keywords
chicken breast
image
white
white stripe
grade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210848846.5A
Other languages
Chinese (zh)
Inventor
孙啸
柏钰
周梦月
张续博
邓涛
张永捷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chuzhou University
Original Assignee
Chuzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chuzhou University filed Critical Chuzhou University
Priority to CN202210848846.5A priority Critical patent/CN115266752A/en
Publication of CN115266752A publication Critical patent/CN115266752A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/28Measuring arrangements characterised by the use of optical techniques for measuring areas
    • G01B11/285Measuring arrangements characterised by the use of optical techniques for measuring areas using photoelectric detection means
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/36Applying a local operator, i.e. means to operate on image points situated in the vicinity of a given point; Non-linear local filtering operations, e.g. median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/68Food, e.g. fruit or vegetables
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8854Grading and classifying of flaws
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8854Grading and classifying of flaws
    • G01N2021/8874Taking dimensions of defect into account
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Chemical & Material Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Nonlinear Science (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for judging the white stripe grade of chicken breast, which consists of a hardware module, an image characteristic information extraction module and a chicken breast quality grading module; the hardware module comprises a detection module, a conveying belt, a motor and a conveying belt baffle, wherein the detection module comprises a sensor, an LED lamp and a CCD industrial camera; the image characteristic information extraction module consists of a CCD industrial camera for collecting images and an industrial personal computer terminal for image processing, wherein the CCD industrial camera collects overlook chicken breast images and transmits the overlook chicken breast images to the industrial personal computer terminal, and the industrial personal computer terminal processes the original chicken breast images and extracts characteristic information; the chicken breast quality grading module is mainly used for outputting the chicken breast grade by a classification model controlled by an industrial control machine. The invention realizes the detection and judgment of the white stripe grade of the chicken breast, reduces the product loss for poultry slaughter enterprises, develops a novel poultry detection technical method and realizes the online nondestructive detection of the quality grade of the chicken breast.

Description

Method and device for judging white stripe grade of chicken breast
Technical Field
The invention relates to the technical field of poultry meat quality monitoring and detection, in particular to a method and a device for judging white stripe grade of chicken breast.
Background
In order to meet the increasing demand, broiler breeders have selected broilers with rapid growth and high breast muscle content through genes in the past decades. The growth speed of the broiler chickens is improved by nearly 3 times in nearly 50 years, wherein the breast meat of the broiler chickens accounts for about 20 percent of the carcass of the broiler chickens. However, with the popularization and development of fast-growing and high-meat-yield broiler varieties in the poultry market, a series of broiler breast muscle diseases and quality defect problems are successively exposed. Such as white textured chicken, "PSE" like meat, and deep chest muscle disease and woody meat. At present, studies of scholars on the pathogenic mechanism of the xylem, such as gene expression, nutrition regulation, animal welfare and other fields do not reveal the direct reason of the generation of the xylem, the regulation production and processing mode also cannot prevent the generation of the xylem, and the quality problem of the chicken breast meat cannot be fundamentally solved, so that the white stripe problem of the chicken breast meat exists all the time in a short period, the quality division of the chicken breast meat still needs manual evaluation, and the cost is greatly improved.
Therefore, in order to reduce labor cost, intensive research and study on quality classification of chicken breast are urgently needed, and efforts are made to develop a chicken breast quality detection system and a classification method using four parameters, such as the number of white stripes, the area ratio of the white stripes, the maximum value of the area of the horizontal white stripes, the maximum outline width of the white stripes and the like, as characteristic parameters, so as to reduce labor detection cost and realize quality classification of live chicken breast detection.
Disclosure of Invention
The invention aims to provide a method and a device for judging the white stripe grade of chicken breast meat, which solve the problems in the quality grading process of the chicken breast meat.
In order to solve the above problems, the present invention provides the following technical solutions:
a chicken breast white stripe grade judging system comprises a hardware module, an image characteristic information extraction module and a chicken breast quality grading module, wherein the hardware module, the image characteristic information extraction module and the chicken breast quality grading module are controlled by an industrial personal computer; the hardware module comprises a detection module, a conveying belt, a motor and a conveying belt baffle; the detection module consists of a sensor, an LED lamp and a CCD industrial camera; the sensor is arranged on the baffle plate of the conveying belt and is 50mm away from the conveying belt, and the CCD industrial camera is arranged in the middle of the top of the fixed bracket of the conveying belt and is controlled by an industrial control machine; the detection module, the image characteristic information extraction module and the chicken breast quality grading module are electrically connected in sequence;
the image characteristic information extraction module consists of an industrial personal computer terminal for processing images; the CCD industrial camera collects overlook chicken breast images and transmits the overlook chicken breast images to the industrial personal computer terminal, and the industrial personal computer terminal processes the original chicken breast images and extracts characteristic information;
the chicken breast quality grading module is used for receiving the characteristic information extracted by the image characteristic information extraction module and outputting the chicken breast grade after processing.
Preferably, the baffle of the conveying belt is made of 304 food-grade stainless steel materials, and the sensor adopts low-frequency electric signal transmission.
Preferably, the chicken breast quality grading module is composed of an XG-Boost classification model, and specifically comprises the following steps: firstly establishing a first tree, gradually iterating, adding one tree in each iteration process, endowing higher weight to data with wrong prediction in the previous tree in each iteration process, sending the data to the current tree for training, gradually forming a strong evaluator integrated by numerous decision tree models, and finally testing and verifying the fitting effect of the models.
Preferably, the chicken breast meat quality grading module performs gray processing on a chicken breast meat overlook image obtained by the image characteristic information extraction module, performs smooth noise reduction by using median filtering, performs binarization processing by using an adaptive threshold segmentation algorithm (Otsu), performs masking processing on the processed image to obtain a mask image, and performs a histogram equalization image enhancement algorithm on the mask image to increase the gray contrast of white stripes and muscle parts. And finally, carrying out binarization processing on the image after image enhancement, extracting four parameters of the number of white stripe closed outlines, calculating a white stripe area ratio, calculating a maximum value of a transverse white stripe area, calculating a maximum white stripe outline width and the like as characteristic parameters, and carrying out prediction classification on the obtained characteristic parameters.
A method for judging the grade of white stripes of chicken breast comprises the following specific steps:
step 1, after detecting chicken breast meat, a sensor transmits information to an industrial personal computer, the industrial personal computer controls a conveyor belt to stop, controls a CCD industrial camera to take overlook shooting, then transmits shot images to the industrial personal computer, and transmits collected overlook images of the chicken breast meat to a terminal of the industrial personal computer;
step 2, image preprocessing: firstly, gray level image processing is carried out on the collected image, and in order to reduce image noise pollution, the noise of the image background is removed by utilizing median filtering, so that a final gray level image is obtained. And then extracting a target region by using an adaptive threshold segmentation algorithm (Otsu) according to the characteristic that the gray scale difference between the background and the current region is large, and obtaining a binary image. Secondly, scanning the binary image pixels point by point, and setting the gray value of the pixel at the point as the same gray value as the position of the original gray image point when the pixel is 255; when the pixel is 0, setting the gray value of the pixel at the point as 0, and outputting a mask image when the position is the same as the original gray value image;
step 3, extracting image characteristic information: for the image after image preprocessing, firstly extracting the area S of a target region (namely the area of a non-black background region), then utilizing the characteristic that the gray contrast of white stripes and muscle parts is obvious, carrying out image segmentation by using an Otsu algorithm to obtain a white stripe image of chicken breast, and calculating the area S of the white stripes (namely the total number of white pixels) at the moment1Finally, S is1The ratio of S to S is taken as a first characteristic parameter, namely the area occupation ratio of the white stripes; establishing a 5-pixel-by-5-pixel square template, scanning closed white stripe outlines line by line from left to right, calculating the area of white pixels (namely the total number of white pixels) in each outline, putting the area into an established list, and extracting the maximum value in the list as a second characteristic parameter, namely the maximum value of the area of the transverse white stripe; extracting the number of closed outlines of the white stripes in the chicken breast image, drawing the obtained outlines in an original image and taking the outlines as a third characteristic parameter; drawing an external rectangular frame of each closed contour of the white stripe image of the chicken breast, calculating the rectangular width of the closed contour, storing the rectangular width into a list, and extracting the maximum value of the list as a fourth characteristic parameter, namely the maximum white stripe contour width;
step 4, establishing a white stripe grade classification database of the chicken breast: repeating the steps, continuously collecting characteristic parameters under different chicken breast qualities, and establishing a white stripe grading classification database of the chicken breast, wherein the established database is prepared for establishing a subsequent multi-characteristic integrated learning model;
step 5, establishing an XG-Boost multi-feature ensemble learning classification model: taking 80% of data in the established white stripe grade classification database of the chicken breast as a training set, establishing a white stripe grade classification model of the chicken breast, and taking 20% of data as a test set for testing the accuracy of the model;
and 6, in order to verify the practicability of the model on the production line, placing chicken breast meat which is not subjected to manual grading in the center of a conveying belt, sending a corresponding sensor signal when the chicken breast meat is conveyed to a CCD industrial camera by the conveying belt, controlling the conveying belt to stop after the chicken breast meat is received by an industrial personal computer terminal, simultaneously carrying out image acquisition on the chicken breast meat by the CCD industrial camera, transmitting the image to the industrial personal computer terminal for image preprocessing and characteristic information acquisition, and finally carrying out chicken breast meat grade evaluation by using the established model.
Preferably, the chicken breast meat grade determination rule in step 6 is:
the output value of the XG-Boost classification model is 0, and the chicken breast is normal;
the output value of the XG-Boost classification model is 1, and the chicken is moderate chicken breast;
and the output value of the XG-Boost classification model is 2, and the chicken is severe chicken breast.
The invention has the advantages that:
the invention realizes the detection and identification of the white stripe grade of the chicken breast, reduces the cost of manpower and material resources for detecting the chicken breast quality, reduces the product loss for poultry slaughter enterprises, develops a novel poultry detection technical method and further realizes the detection of the quality grade of the live chicken breast.
The device model and advantages used in the hardware module of the invention. A photoelectric sensor: the model HJ-J18-D50N1 is adopted, an induction chip is arranged in the LED working signal lamp, the detection frequency response is fast, the anti-jamming capability is strong, and the working condition of the LED working signal lamp is judged in real time by the external LED working signal lamp; CCD industry camera: the model SNR2000-05GCP is adopted, the high-definition industrial camera supports POE power supply, 2000 ten thousand high pixels are enough to finish acquisition of a chicken breast overlook image, and meanwhile, the high-definition image is cached and transmitted by having enough memory capacity. LED lamp: by adopting the model GD17, the adjustable spotlight has the advantages that the area of the high-brightness lens is wide, the lighting effect is well exerted, the requirement on the size of chicken breast meat can be met, and the lamp body is antioxidant, safe and reliable.
When the types of the photoelectric sensor, the CCD industrial camera and the LED lamp are basically consistent, the XG-Boost classification model established in the invention can directly input the obtained data into the XG-Boost classification model without any modification, and can be suitable for the chicken breast meat quality classification detection of different scales.
The prediction model can be adjusted according to different application scenes, and can be established and adjusted by adding other characteristic parameters for preprocessing and then performing deep learning under the condition of being used for industrial continuous processing detection in the future so as to meet more poultry meat quality detection requirements.
Because the white stripes in the mask image are darker and the muscle parts are lighter, the further processing is not facilitated, a histogram equalization image enhancement algorithm is used, the contrast of the white stripes and the muscle parts is increased, and the target area is successfully extracted from the background.
Drawings
FIG. 1 is a schematic diagram of a modeling process of an XG-Boost classification model.
FIG. 2 is a schematic diagram of chicken breast image processing: wherein the reference numerals of fig. 2 illustrate: a is an original chicken breast image; b is a binary image; c is a mask image; d is an image enhancement image; e is a white stripe image of the chicken breast; f is an image contour extraction image.
FIG. 3 chicken breast white stripe feature parameter extraction grading algorithm
FIG. 4 is a flow chart of the chicken breast quality classification system;
FIG. 5 overall equipment schematic: wherein the reference numerals of fig. 2 illustrate: the device comprises a CCD industrial camera 1, an LED lamp 2, a fixed support 3, a photoelectric sensor 4, a chicken breast sample 5, a motor 6 and an industrial personal computer 7.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.
Example 1: a method and a device for judging the white stripe grade of chicken breast meat are disclosed, wherein the overall work flow chart is shown in figure 4, and the method comprises a hardware module, an image characteristic information extraction module and a chicken breast meat quality grading module; wherein the hardware module mainly comprises the image acquisition device of industrial control unit control, image acquisition device includes: CCD industrial camera 1, LED lamp 2, fixing support 3, photoelectric sensor 4, motor 6, industrial computer 7. The image acquisition device is connected as follows: the CCD industrial camera 1 is arranged in the middle of the top of the fixed support 4 so as to shoot a chicken breast sample 5 in a better overlooking manner; the LED lamps 2 are respectively arranged at the left side and the right side of the top of the fixed support 3 and provide sufficient light sources for the CCD industrial camera; the fixed support 3 is arranged on the conveyer belt as shown in figure 5; the photoelectric sensor is arranged on the fixed support 4 and is 50mm away from the conveying belt, so that the position of the chicken breast sample 5 can be accurately detected; the image extraction device transmits the overlook image of the chicken breast sample 5 collected by the CCD industrial camera to the industrial personal computer 7; the industrial personal computer 7 collects four characteristic parameters of the white stripes by receiving the number of the closed outlines of the white stripes, the area ratio of the white stripes, the maximum value of the area of the transverse white stripes and the width of the outline of the maximum white stripe, which are transmitted by the image characteristic information extraction module.
The industrial personal computer 7 controls the image characteristic information extraction module to output characteristic parameter indexes, the motor 6 and the power supply provide power for the image characteristic information extraction module, firstly, the industrial personal computer 7 controls the conveyer belt to convey the chicken breast 5 to a specified position, the photoelectric sensor 4 transmits a signal to the industrial personal computer 7 to control the conveyer belt to stop after sensing the signal, and the CCD industrial camera 1 is controlled to collect the overlook chicken breast 5 image and transmit the overlook chicken breast 5 image to the industrial personal computer 7. The industrial personal computer 7 processes the original chicken breast 5 image and extracts characteristic information, firstly performs gray processing on the chicken breast 5 and performs smooth noise reduction by using median filtering. And secondly, performing binarization processing by using an adaptive threshold segmentation algorithm Otsu, and performing masking processing on the processed image to obtain a mask image. And then carrying out a histogram equalization image enhancement algorithm on the mask image to increase the gray contrast of the white stripe and the muscle part. And finally, carrying out binarization processing on the image after image enhancement, extracting four parameters of the number of closed outlines of the white stripes, calculating the area ratio of the white stripes, calculating the maximum value of the area of the transverse white stripes, calculating the width of the outline of the maximum white stripe and the like as characteristic parameters, and uploading the obtained characteristic parameters to a chicken breast white stripe quality classification module for quality judgment.
The chicken breast white stripe quality classification module consists of an XG-Boost multi-feature learning classification model, and a schematic diagram of a modeling process is shown in FIG. 1. Firstly, dividing original data into a training set and a test set, wherein the proportion of the training set to the test set is 8:2, the data volume proportion of the normal chicken breast, the moderate chicken breast and the severe chicken breast in any set is 7:2:1, the original data set contains 1200 pieces of data. Then, training an XG-Boost classification model according to three grades of normal, moderate and severe, wherein the modeling process is roughly as follows: the first tree is established at first, and then iteration is performed gradually, one tree is added in each iteration process, and each iteration process gives higher weight to data with wrong prediction in the previous tree and sends the data to the current tree for training, so that a strong evaluator integrated by numerous decision tree models is formed gradually. And finally, testing the model to verify the fitting effect of the model.
The XG-Boost multi-feature learning classification model takes the white stripe area ratio, the transverse maximum white stripe area, the number of white stripe closed outlines and the maximum white stripe outline width as the model input, and takes the chicken breast meat quality as the model output. In order to prevent the overfitting phenomenon of the model and prevent the waste of computing resources, the hyper-parameter K is set to be 80, namely the number of the established decision trees is 80. In order to improve the accuracy, the generalization and the operation speed of model prediction, a parameter subsample is set to be 0.8, namely, the data extraction of the training set of each tree is replaced samples, the samples which are more prone to early prediction errors are used as the training set in the subsequently-built decision tree, and the weight value w is given to be 0.6 each time. In order to establish each tree as an optimal decision tree, a gradient descent method is introduced to carry out iterative computation to find a minimum loss function, wherein a minimum loss descent parameter gamma is set to be 0.3, a learning rate parameter eta is 0.2, a minimum leaf weight value mc is 1, and the loss function is set as a logarithmic loss function. In order to prevent each tree from overgrowing, a tree depth parameter, namely max-depth, is set to be 3. And (3) selecting a cross verification method, and verifying that the proportion of the optimal training set to the test set is 8:2, and taking the test accuracy as an evaluation standard. The final results are shown in table 1, when the training set and the test set are 8:2, the model test accuracy rate is 96.13%, and the required requirements are met.
In order to further highlight the advantages of the XG-Boost multi-feature integrated learning classification model, multi-feature learning classification algorithms such as a Random Forest (RF), a Support Vector Machine (SVM), a BP neural network (BP-NN) and the like are selected for comparison, common AUC, test accuracy, F1-score, overall accuracy OA, quantity inconsistency QD, distribution inconsistency AD and the like of the classification model are selected as indexes to evaluate the performance effect of the model, wherein the training set and the test set are both 8:2. the predicted results of each algorithm are shown in table 2. According to the table 2, the AUC and the test accuracy of the XG-Boost model are 0.9762 and 96.13%, which are superior to other algorithms, and the established XG-Boost model has obvious advantages in predicting chicken breast meat with different qualities.
Table 1 prediction results of three different qualities of chicken breast in XG-Boost model
Figure BDA0003752485970000061
TABLE 2 test results of different models
Figure BDA0003752485970000062
Example 2: a method for grading chicken breast by using the system for judging the white stripe grade of the chicken breast comprises the following steps:
(1) Manually judging the quality of the breast meat of the chicken and classifying: firstly, after a sample chicken breast is detected by the method and the device for judging the grade of the white stripes of the chicken breast, researchers or workers who are trained professionally and have certain judging experience grade the chicken breast and divide the chicken breast into normal chicken breast, moderate chicken breast and severe chicken breast; then carrying out image analysis processing on the overlook image of the chicken breast obtained by detection,
step 1: the image characteristic information extraction module consists of a CCD industrial camera for collecting images and an industrial personal computer terminal for processing the images. The CCD industrial camera collects overlook chicken breast images and transmits the overlook chicken breast images to the industrial personal computer terminal, and the industrial personal computer terminal processes the original chicken breast images and extracts characteristic information.
(1) Image preprocessing: firstly, gray level image processing is carried out on the collected image, and in order to reduce image noise pollution, the noise of the image background is removed by utilizing median filtering, so that a final gray level image is obtained. And then extracting a target region by using an adaptive threshold segmentation algorithm (Otsu) according to the characteristic that the gray scale difference between the background and the current region is large, and obtaining a binary image. Secondly, scanning binary image pixels point by point, and setting the gray value of the pixel at the point as the same gray value as the position of the original gray map point when the pixel is 255; when the pixel is 0, the gray value of the pixel at the point is set as 0, and the position is the same as the original gray map, and the mask image is output at the moment. Finally, the white stripes in the mask image are dark, the muscle part is bright, further processing is not facilitated, a histogram equalization image enhancement algorithm is used, and the contrast ratio of the white stripes to the muscle part is increased. The target area is successfully extracted from the background.
(2) Extracting image characteristic information: for the image after image preprocessing, firstly extracting the area S of a target region (namely the area of a non-black background region), then utilizing the characteristic that the gray contrast of white stripes and muscle parts is obvious, carrying out image segmentation by using an Otsu algorithm to obtain a white stripe image of chicken breast, and calculating the area S of the white stripes (namely the total number of white pixels) at the moment1Finally, S is1The ratio of S to S is taken as a first characteristic parameter, namely the area occupation ratio of the white stripes; establishing a square template with 5 pixels multiplied by 5 pixels, scanning closed white stripe outlines line by line from left to right, calculating the area of white pixels (namely the total number of white pixels) in each outline, putting the area into an established list, and extracting the maximum value in the list as a second characteristic parameter, namely the maximum value of the area of the transverse white stripe; and extracting the number of closed outlines of the white stripes in the chicken breast image, drawing the obtained outlines in the original image and taking the outlines as a third characteristic parameter. Drawing an external rectangular frame of each closed contour of the white stripe image of the chicken breast, calculating the rectangular width of the frame, storing the rectangular width into a list, and extracting the maximum value of the list as a fourth feature parameterNumber is the maximum white stripe profile width.
Step 2: establishing a white stripe grade classification database of chicken breast meat. And repeating the steps, and continuously collecting characteristic parameters under different chicken breast qualities to establish a white stripe grade classification database of the chicken breast. The established database is prepared for the establishment of a subsequent multi-feature integrated learning model.
And step 3: and establishing an XG-Boost multi-feature ensemble learning classification model. And taking 80% of data in the established white stripe grade classification database of the chicken breast as a training set, establishing a white stripe grade classification model of the chicken breast, and taking 20% of data as a test set for testing the accuracy of the model.
And 4, step 4: in order to verify the practicability of the model on the production line, chicken breasts which are not subjected to manual rating are placed in the center of the conveying belt, corresponding sensor signals are sent out when the chicken breasts are conveyed to the position below the CCD industrial camera by the conveying belt, the conveying belt is controlled to stop after the signals are received by the industrial personal computer terminal, meanwhile, the CCD industrial camera carries out image acquisition on the chicken breasts, the images are transmitted to the industrial personal computer terminal to carry out image preprocessing and characteristic information acquisition, and finally, the established model is utilized to carry out chicken breast grade assessment.
In addition, the XG-Boost multi-feature ensemble learning classification model is used for chicken breast meat grade assessment, and the assessment rule is as follows:
if the output value of the classifier model is 0, the chicken is normal chicken breast;
if the output value of the classifier model is 1, the chicken is moderate chicken breast;
and if the output value of the classifier model is 2, the chicken is severe breast.
The foregoing is a detailed description of the invention with reference to specific embodiments, and the practice of the invention is not to be construed as limited thereto. For those skilled in the art to which the invention relates, several simple deductions or substitutions may be made without departing from the spirit of the invention, which should be construed as belonging to the scope of the invention.

Claims (6)

1. The utility model provides a chicken breast white stripe grade decision system which characterized in that: the chicken breast meat quality grading system is characterized by comprising a hardware module, an image characteristic information extraction module and a chicken breast meat quality grading module, wherein the hardware module, the image characteristic information extraction module and the chicken breast meat quality grading module are all controlled by an industrial personal computer; the hardware module comprises a detection module, a conveying belt, a motor and a conveying belt baffle; the detection module consists of a sensor, an LED lamp and a CCD industrial camera; the sensor is arranged on the baffle plate of the conveying belt and is 50mm away from the conveying belt, and the CCD industrial camera is arranged in the middle of the top of the fixed bracket of the conveying belt and is controlled by an industrial control machine; the detection module, the image characteristic information extraction module and the chicken breast quality grading module are electrically connected in sequence;
the image characteristic information extraction module consists of an industrial personal computer terminal for processing images; the CCD industrial camera collects overlook chicken breast images and transmits the overlook chicken breast images to the industrial personal computer terminal, and the industrial personal computer terminal processes the original chicken breast images and extracts characteristic information;
the chicken breast quality grading module is used for receiving the characteristic information extracted by the image characteristic information extraction module and outputting the chicken breast grade after processing.
2. The system for determining the white streak level of chicken breast according to claim 1, wherein: the baffle of the conveying belt is made of 304 food-grade stainless steel materials, and the sensor adopts low-frequency electrical signal transmission.
3. The system for determining the white streak level of chicken breast according to claim 1, wherein: the chicken breast meat quality grading module is composed of an XG-Boost classification model, and specifically comprises the following steps: firstly establishing a first tree, gradually iterating, adding one tree in each iteration process, endowing higher weight to data with wrong prediction in the previous tree in each iteration process, sending the data to the current tree for training, gradually forming a strong evaluator integrated by numerous decision tree models, and finally testing and verifying the fitting effect of the models.
4. The system for determining the white streak level of chicken breast according to claim 1, wherein: the chicken breast meat quality grading module performs gray processing on a chicken breast meat overlook image obtained by the image characteristic information extraction module, performs smooth noise reduction by using median filtering, performs binarization processing by using an adaptive threshold segmentation algorithm (Otsu), performs masking processing on the processed image to obtain a mask image, performs histogram equalization image enhancement algorithm on the mask image to increase the gray contrast ratio of white stripes and muscle parts, performs binarization processing on the image after image enhancement, extracts the number of white stripe closed outlines, calculates the white stripe area ratio, calculates the maximum value of the transverse white stripe area, calculates the maximum white stripe outline width and other four parameters as characteristic parameters, and performs prediction grading on the obtained characteristic parameters.
5. A method for judging the white stripe grade of chicken breast is characterized by comprising the following specific steps:
step 1, after detecting chicken breast meat, a sensor transmits information to an industrial personal computer, the industrial personal computer controls a conveyor belt to stop, controls a CCD industrial camera to take overlook shooting, then transmits shot images to the industrial personal computer, and transmits collected overlook images of the chicken breast meat to a terminal of the industrial personal computer;
step 2, image preprocessing: firstly, carrying out gray level image processing on an acquired image, and removing noise of an image background by using median filtering to reduce image noise pollution so as to obtain a final gray level image; then, according to the characteristic that the gray difference between the background and the current region is large, extracting a target region by using an adaptive threshold segmentation algorithm (Otsu) to obtain a binary image, scanning pixels of the binary image point by point, and setting the gray value of the pixel at the point as the same gray value as the position of the original gray map point when the pixel is 255; when the pixel is 0, setting the gray value of the pixel at the point as 0, and outputting a mask image when the position is the same as the original gray map;
step 3, extracting image characteristic information: aiming at the image after image preprocessing, firstly extracting the area S of the target area, and then utilizing the white stripes and the muscle part of the imageUsing Otsu algorithm to carry out image segmentation on the characteristic with obvious gray contrast to obtain white stripe image of chicken breast, and calculating the area S of the white stripe at the moment1Finally, S is1The ratio of S to S is taken as a first characteristic parameter, namely the area occupation ratio of the white stripes; establishing a square template with 5 pixels multiplied by 5 pixels, scanning closed white stripe outlines line by line from left to right, calculating the area of the white pixels in each outline, putting the area into an established list, and extracting the maximum value in the list as a second characteristic parameter, namely the maximum value of the area of the transverse white stripe; extracting the number of closed outlines of the white stripes in the chicken breast image, drawing the obtained outlines in an original image and taking the outlines as a third characteristic parameter; drawing an external rectangular frame of each closed contour of the white stripe image of the chicken breast, calculating the rectangular width of the external rectangular frame, storing the rectangular width into a list, and extracting the maximum value of the list as a fourth characteristic parameter, namely the maximum white stripe contour width; the target region area S is the area of a non-black background region, and the area S of the white stripe1The area of the white pixels in each contour is the total number of the white pixels in each contour;
step 4, establishing a white stripe grade classification database of chicken breast: repeating the steps, continuously collecting characteristic parameters under different chicken breast qualities, establishing a white stripe grade classification database of the chicken breast, and preparing the established database for establishing a subsequent multi-characteristic integrated learning model;
step 5, establishing an XG-Boost multi-feature ensemble learning classification model: taking 80% of data in the established white stripe grade classification database of the chicken breast as a training set, establishing a white stripe grade classification model of the chicken breast, and taking 20% of data as a test set for testing the accuracy of the model;
and 6, in order to verify the practicability of the model on the production line, placing chicken breast meat which is not subjected to manual grading in the center of a conveying belt, sending a corresponding sensor signal when the chicken breast meat is conveyed to a CCD industrial camera by the conveying belt, controlling the conveying belt to stop after the chicken breast meat is received by an industrial personal computer terminal, simultaneously carrying out image acquisition on the chicken breast meat by the CCD industrial camera, transmitting the image to the industrial personal computer terminal for image preprocessing and characteristic information acquisition, and finally carrying out chicken breast meat grade evaluation by using the established model.
6. The method for determining the white streak level of chicken breast according to claim 5, wherein: the chicken breast meat grade determination rule in the step 6 is as follows:
the output value of the XG-Boost classification model is 0, and the chicken breast is normal;
the output value of the XG-Boost classification model is 1, and the chicken breast is moderate;
and if the output value of the XG-Boost classification model is 2, the chicken breast is severe.
CN202210848846.5A 2022-07-19 2022-07-19 Method and device for judging white stripe grade of chicken breast Pending CN115266752A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210848846.5A CN115266752A (en) 2022-07-19 2022-07-19 Method and device for judging white stripe grade of chicken breast

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210848846.5A CN115266752A (en) 2022-07-19 2022-07-19 Method and device for judging white stripe grade of chicken breast

Publications (1)

Publication Number Publication Date
CN115266752A true CN115266752A (en) 2022-11-01

Family

ID=83767381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210848846.5A Pending CN115266752A (en) 2022-07-19 2022-07-19 Method and device for judging white stripe grade of chicken breast

Country Status (1)

Country Link
CN (1) CN115266752A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116912887A (en) * 2023-09-05 2023-10-20 广东省农业科学院动物科学研究所 Broiler chicken breeding management method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116912887A (en) * 2023-09-05 2023-10-20 广东省农业科学院动物科学研究所 Broiler chicken breeding management method and system
CN116912887B (en) * 2023-09-05 2023-12-15 广东省农业科学院动物科学研究所 Broiler chicken breeding management method and system

Similar Documents

Publication Publication Date Title
CN108287010B (en) Crab multi-index grading device and method
Liming et al. Automated strawberry grading system based on image processing
US20230281265A1 (en) Method for estimating body size and weight of pig based on deep learning
CN104535588B (en) Egg freshness nondestructive testing system based on Android system and egg freshness nondestructive testing method
CN110705655A (en) Tobacco leaf classification method based on coupling of spectrum and machine vision
CN105651776A (en) Device and method for automatically grading beef carcass meat yield based on computer vision
CN108719424A (en) A kind of aquatic products sorting technique and system based on machine vision
CN110956212A (en) Threshing quality detection method based on visual feature fusion
CN107993203B (en) Poultry carcass image grading method and grading system thereof
Descamps et al. Automatic flamingo detection using a multiple birth and death process
CN116843628B (en) Lotus root zone nondestructive testing and grading method based on machine learning composite optimization
CN115266752A (en) Method and device for judging white stripe grade of chicken breast
Thinh et al. Mango classification system based on machine vision and artificial intelligence
CN113869251A (en) Improved ResNet-based wheat imperfect grain online detection method
CN113820325A (en) Corn grain direct-harvest impurity-containing rate and breakage rate online detection system and method
CN208059993U (en) A kind of crab multi objective grading plant
Setiawan et al. Shrimp body weight estimation in aquaculture ponds using morphometric features based on underwater image analysis and machine learning approach
Uttaro et al. An image analysis approach to identification and measurement of marbling in the intact pork loin
Thong et al. Mango sorting mechanical system combines image processing
CN116797575A (en) Intelligent detection method for broken rice rate based on machine vision
Wang et al. Research on the evaluation method of eggshell dark spots based on machine vision
Ji et al. Apple color automatic grading method based on machine vision
Agustin et al. Automatic milled rice quality analysis
Wu et al. Automatic sorting system of large yellow croaker based on machine vision
CN111325241A (en) Fruit and vegetable classification method and device, intelligent sensor and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination