A method and system for classifying defect types of poultry carcasses

By training a detection network model of images from the body surface and inside the body, defects in poultry carcasses are identified, solving the problems of high cost and low accuracy caused by manual identification, and realizing efficient automated classification and pre-sorting in market channels.

CN116310527BActive Publication Date: 2026-02-17HUAZHI RICE BIO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310200251.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-03
Publication Date
2026-02-17
Estimated Expiration
2043-03-03

AI Technical Summary

Technical Problem

Current technologies rely on manual visual inspection for detecting defects in poultry carcasses, resulting in high production costs, low accuracy, and an inability to effectively prevent substandard poultry carcasses from entering the market.

Method used

First and second defect type detection network models were trained using surface images and internal penetrating images. These models were used to identify defect types in poultry carcasses and perform automated classification based on defect classification criteria.

Benefits of technology

It improves the accuracy and efficiency of poultry carcass defect detection, saves production costs, and enables automated classification and pre-sorting in market channels, adapting to the needs of different market scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116310527B_ABST
    Figure CN116310527B_ABST
Patent Text Reader

Abstract

The application discloses a kind of defect type classification method and system of poultry carcass, and its method includes: receiving the surface image and internal penetration image of poultry carcass to be detected;The surface image of poultry carcass to be detected is input to the first defect type detection network model of pre-set, and the first defect type detection result of first defect type detection network model output is obtained;Internal penetration image is input to the second defect type detection network model of pre-set, and the second defect type detection result of second defect type detection network model output is obtained;According to pre-set defect classification standard, first defect type detection result and second defect type detection result, the defect classification result of poultry carcass to be detected is judged;According to defect classification result, the sorting of poultry carcass to be detected is implemented.The application effectively improves the recognition accuracy of poultry carcass, and improves the classification efficiency of poultry carcass, provides great guarantee for the pre-selection of market channel.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, in particular to a defect type classification method and system for poultry carcasses. BACKGROUND

[0002] There are a large number of poultry carcasses that are automatically slaughtered in modern slaughter lines. At present, the detection of surface defects of poultry carcasses in slaughter lines of slaughterhouses in China basically relies on manual detection by the naked eye, and internal defects can only be identified by dissection of the poultry carcass, which increases the production cost of the slaughterhouse and also causes waste of human resources. Moreover, the accuracy of observation by the naked eye of a person will have deviations and cannot completely avoid the entry of poultry carcasses with defects, damage or other abnormalities into the market, nor can it guarantee that the products that meet the product quality requirements can be pre-selected for the market channel. SUMMARY

[0003] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application provides a defect type classification method and system for poultry carcasses, which can effectively identify the defect type of the poultry carcass and automatically classify the poultry carcass according to the defect type of the poultry carcass, thereby effectively improving the identification accuracy of the poultry carcass and improving the classification efficiency of the poultry carcass, thereby providing a guarantee for pre-selection of the market channel.

[0004] In a first aspect, an embodiment of the present application provides a defect type classification method for poultry carcasses, which comprises:

[0005] receiving a surface image and an internal penetration image of a poultry carcass to be detected;

[0006] inputting the surface image of the poultry carcass to be detected into a preset first defect type detection network model to obtain a first defect type detection result output by the first defect type detection network model;

[0007] inputting the internal penetration image into a preset second defect type detection network model to obtain a second defect type detection result output by the second defect type detection network model;

[0008] judging a defect classification result of the poultry carcass to be detected according to a preset defect classification standard, the first defect type detection result and the second defect type detection result;

[0009] implementing sorting of the poultry carcass to be detected according to the defect classification result.

[0010] The method according to the embodiment of the present application has at least the following beneficial effects:

[0011] The first defect type detection network model and the second defect type detection network model are trained through the surface images and the internal penetration images of the poultry carcasses, the first defect type detection network model and the second defect type detection network model solve the problem of missed detection of internal defects and external defects of the poultry carcasses, greatly improve the detection accuracy and detection efficiency, and are easy to migrate and simple to arrange, and have high detection efficiency, so that a large amount of production cost can be saved; the first defect type detection result and the second defect type detection result obtained through the first defect type detection network model and the second defect type detection network model are automatically classified through the preset defect classification standard, convenient pre-sorting of market channels is provided, and different standards of automatic classification can be performed according to different market channel scenes, so that the application scenarios are widened.

[0012] According to some embodiments of the present application, the first defect type detection network model is obtained by the following method:

[0013] Obtain surface images of a plurality of poultry carcasses;

[0014] Perform gray scale processing on the surface image of each poultry carcass to obtain a gray scale surface image of each poultry carcass;

[0015] Determine the boundary of each poultry carcass through the vertical gray scale projection curve of the gray scale surface image of each poultry carcass;

[0016] Remove other regions outside the boundary of the poultry carcass in the surface image of each poultry carcass to obtain a redundancy-removed surface image of each poultry carcass;

[0017] Color the gray scale region of a preset gray scale value in each redundancy-removed surface image through ROI Manager to obtain an ROI redundancy-removed surface image of each poultry carcass; wherein the ROI redundancy-removed surface image includes a colored ROI region;

[0018] Train the first defect type detection network model through all the ROI redundancy-removed surface images of the poultry carcasses.

[0019] According to some embodiments of the present application, the training of the first defect type detection network model through all the ROI redundancy-removed surface images of the poultry carcasses includes:

[0020] Calibrate the defect type of the ROI region in all the ROI redundancy-removed surface images of the poultry carcasses;

[0021] Generate a first training set and a first test set according to a preset proportion from all the calibrated ROI redundancy-removed surface images;

[0022] training the first defect type detection network model through the first training set, and testing a first accuracy of the first defect type detection network model through the first test set; if the first accuracy reaches a preset accuracy threshold or a first iteration training number of the first defect type detection network model exceeds a threshold, stopping training the first defect type detection network model.

[0023] According to some embodiments of the present application, the second defect type detection network model is obtained by the following way:

[0024] obtaining in-vivo penetration images of a plurality of poultry carcasses;

[0025] obtaining ROI in-vivo penetration images of all the poultry carcasses through the water filling algorithm;

[0026] labeling defect types of the ROI in-vivo penetration images of all the poultry carcasses;

[0027] generating a second training set and a second test set according to a preset proportion from the labeled ROI in-vivo penetration images of the poultry carcasses;

[0028] training the second defect type detection network model through the second training set, and testing a second accuracy of the second defect type detection network model through the second test set; if the second accuracy reaches a preset accuracy threshold or a second iteration training number of the second defect type detection network model exceeds a threshold, stopping training the second defect type detection network model.

[0029] According to some embodiments of the present application, the obtaining of the ROI in-vivo penetration images of all the poultry carcasses through the water filling algorithm comprises:

[0030] setting upper and lower limits of the connectable pixels of the in-vivo penetration images of the poultry carcasses;

[0031] performing water filling according to the upper and lower limits of the connectable pixels of the in-vivo penetration images of the poultry carcasses to obtain an ROI region mask of the in-vivo penetration images of the poultry carcasses;

[0032] extracting the in-vivo penetration images of all the poultry carcasses through the ROI region mask to obtain the ROI in-vivo penetration images of all the poultry carcasses.

[0033] According to some embodiments of the present application, the defect classification result includes: claw defect, skin defect of poultry carcass, internal bone defect of poultry carcass and internal tumor defect of poultry carcass, and the first defect type detection result and the second defect type detection result include claw deformation, claw blackening, claw bleeding, claw swelling, scale elevation, skin necrosis, blue-purple plaque, subcutaneous edema, scab, plaque, white spot or plaque on the crown, poultry bone deformity, poultry bone fracture and thoracic cyst.

[0034] According to some embodiments of the present application, the in vivo penetrating image includes X-ray planar perspective image, electronic computer tomography image, ultrasonic imaging image and magnetic resonance imaging image.

[0035] According to some embodiments of the present application, the first defect type detection network model or the second defect type detection network model is any one of the following network models: RFCN network, R-CNN network, FastR-CNN network, Faster R-CNN network, yolov2 network, yolov3 network and SSD network.

[0036] According to some embodiments of the present application, the defect type detection result of the to-be-detected poultry carcass is obtained by taking the union of the first defect type detection result and the second defect type detection result.

[0037] In a second aspect, embodiments of the present application provide a poultry carcass defect type classification system, which comprises:

[0038] An image receiving module is configured to receive the body surface image and the in vivo penetrating image of the to-be-detected poultry carcass.

[0039] A first defect type detection module is configured to input the body surface image of the to-be-detected poultry carcass into a preset first defect type detection network model to obtain a first defect type detection result output by the first defect type detection network model.

[0040] A second defect type detection module is configured to input the in vivo penetrating image into a preset second defect type detection network model to obtain a second defect type detection result output by the second defect type detection network model.

[0041] A defect classification module is configured to determine a defect classification result of the to-be-detected poultry carcass according to a preset defect classification standard, the first defect type detection result and the second defect type detection result.

[0042] A sorting module is configured to sort the to-be-detected poultry carcass according to the defect classification result.

[0043] It should be noted that the beneficial effects between the second aspect of the present application and the prior art are the same as those of the first aspect of the poultry carcass defect type classification method, which will not be described here.

[0044] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent from the description, or can be learned by practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0045] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, taken in conjunction with the accompanying drawings, in which:

[0046] Figure 1 is a flowchart of a poultry carcass defect type classification method provided by an embodiment of the present application;

[0047] Figure 2 is a flowchart of how to train the first defect type detection network model provided by an embodiment of the present application;

[0048] Figure 3 is a flowchart of how to train the first defect type detection network model by ROI de-redundant body surface image provided by an embodiment of the present application;

[0049] Figure 4 is a flowchart of how to train the second defect type detection network model provided by an embodiment of the present application;

[0050] Figure 5 is a flowchart of how to obtain all the ROI internal penetrating images of the poultry carcass by the flood fill algorithm provided by an embodiment of the present application;

[0051] Figure 6 is a structural diagram of a poultry carcass defect type classification system provided by an embodiment of the present application;

[0052] Figure 7 is a schematic diagram of the sorting equipment provided by an embodiment of the present application. DETAILED DESCRIPTION

[0053] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0054] In the description of this invention, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance, or implicitly indicating the number of technical features indicated, or implicitly indicating the order of the technical features indicated.

[0055] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the drawings and are only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0056] In the description of this invention, it should be noted that, unless otherwise explicitly defined, terms such as "setting," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0057] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are some embodiments of the present invention, not all embodiments.

[0058] Reference Figure 1 In some embodiments of the present invention, a method for classifying defect types in poultry carcasses is provided, including:

[0059] Step S100: Receive the surface image and internal penetration image of the poultry carcass to be detected.

[0060] Step S200: Input the surface image of the poultry carcass to be detected into the preset first defect type detection network model to obtain the first defect type detection result output by the first defect type detection network model.

[0061] Step S300: Input the in vivo penetration image into the preset second defect type detection network model to obtain the second defect type detection result output by the second defect type detection network model.

[0062] Step S400: Determine the defect classification result of the poultry carcass to be inspected based on the preset defect classification standard, the detection result of the first defect type, and the detection result of the second defect type.

[0063] Step S500: Sorting of poultry carcasses to be inspected based on the defect classification results.

[0064] The first defect type detection network model and the second defect type detection network model are trained through the surface images and the internal penetration images of the poultry carcasses, the first defect type detection network model and the second defect type detection network model solve the problem of missed detection of internal defects and external defects of the poultry carcasses, greatly improve the detection accuracy and detection efficiency; meanwhile, the first defect type detection network model and the second defect type detection network model are easy to migrate, simple to arrange and extremely high in detection efficiency, can save a large amount of production cost; the first defect type detection result and the second defect type detection result obtained through the first defect type detection network model and the second defect type detection network model are automatically classified through the preset defect classification standard, convenient for pre-sorting of the market channel, and different standards can be automatically classified according to different market channel scenes, thereby widening the application scenarios.

[0065] With reference to Figure 2 In some embodiments of the present application, the first defect type detection network model is obtained in the following manner:

[0066] In step S210, surface images of a plurality of poultry carcasses are obtained.

[0067] In step S220, the surface image of each poultry carcass is subjected to grayscale processing to obtain a grayscale surface image of each poultry carcass.

[0068] In step S230, the boundary of each poultry carcass is determined through the vertical grayscale projection curve of the grayscale surface image of each poultry carcass.

[0069] In step S240, the area outside the boundary of the poultry carcass in the surface image of each poultry carcass is removed to obtain a redundancy-removed surface image of each poultry carcass.

[0070] In step S250, the grayscale area of a preset grayscale value in each redundancy-removed surface image is colored through ROI Manager to obtain an ROI redundancy-removed surface image of each poultry carcass; wherein the ROI redundancy-removed surface image comprises a colored ROI area.

[0071] In step S260, the first defect type detection network model is trained through the ROI redundancy-removed surface images of all poultry carcasses.

[0072] It should be noted that the boundary of each poultry carcass is determined through the vertical grayscale projection curve of the grayscale surface image of each poultry carcass, which is achieved in the following manner:

[0073] The vertical integral projection function and the horizontal integral projection function in the interval [x1, x2] and the interval [y1, y2] are calculated:

[0074]

[0075]

[0076] wherein I(x, y) represents a pixel gray value of a point (x, y) in the gray body surface image of the poultry carcass, S V (x) represents a vertical integral projection function, S h (y) represents a horizontal integral projection function.

[0077] The average integral projection function is calculated by the vertical integral projection function and the horizontal integral projection function:

[0078]

[0079]

[0080] wherein M v (y) represents a vertical integral projection function, M h (x) represents a horizontal integral projection function.

[0081] Since the poultry carcass appears mutation at the junction of the background, that is, there is a large gradient value at the point of the boundary. At the same time, two mutations appear at the defect part and the normal part of the poultry carcass, forming two wave troughs of gray values, and the approximate boundary of the ROI region of interest can be found accordingly. Therefore, the vertical gray projection function and the horizontal gray projection function are introduced to respectively describe the gray value changes of the body surface image of the poultry carcass in the horizontal direction and the vertical direction.

[0082] The ROI de-redundant body surface image of the poultry carcass obtained by the above method is used to train the first defect type detection network model, and after removing a large amount of redundant information, the first defect type detection network model is trained again, which effectively improves the accuracy of the first defect type detection network model and shortens the convergence time of the first defect type detection network model.

[0083] Referring to Figure 3 In some embodiments of the present application, the first defect type detection network model is trained by the ROI de-redundant body surface images of all poultry carcasses, comprising:

[0084] Step S261, calibrating the defect type of the ROI region in the ROI de-redundant body surface image of all poultry carcasses.

[0085] Step S262, generating a first training set and a first test set according to a preset proportion from the calibrated all ROI de-redundant body surface images.

[0086] Step S263, the first defect type detection network model is iteratively trained through the first training set, and the first accuracy of the first defect type detection network model is tested through the first test set; if the first accuracy reaches a preset accuracy threshold or the first iteration training number of the first defect type detection network model exceeds a threshold, the training of the first defect type detection network model is stopped.

[0087] The defect types of the ROI regions in the ROI de-redundant body surface image are calibrated, the first defect type detection network model is trained through the ROI de-redundant body surface image, the accuracy of the first defect type detection network model is improved, and the training of the first defect type detection network model is stopped only when the first accuracy reaches a preset accuracy threshold or the first iteration training number of the first defect type detection network model exceeds a threshold, so that the training of the first defect type detection network model is ended only when the first defect type detection network model is completely converged, and the recognition accuracy of the first defect type detection network model is ensured.

[0088] Reference Figure 4 In some embodiments of the present application, the second defect type detection network model is obtained in the following manner:

[0089] Step S310, in-vivo penetration images of a plurality of poultry carcasses are obtained.

[0090] Step S320, the in-vivo penetration images of all the poultry carcasses are subjected to a flood fill algorithm to obtain ROI in-vivo penetration images of all the poultry carcasses.

[0091] Step S330, the defect types of the ROI in-vivo penetration images of all the poultry carcasses are calibrated.

[0092] Step S340, the calibrated ROI in-vivo penetration images of the poultry carcasses are generated into a second training set and a second test set according to a preset proportion.

[0093] Step S350, the second defect type detection network model is iteratively trained through the second training set, and the second accuracy of the second defect type detection network model is tested through the second test set; if the second accuracy reaches a preset accuracy threshold or the second iteration training number of the second defect type detection network model exceeds a threshold, the training of the second defect type detection network model is stopped.

[0094] The ROI in-vivo penetration images of all the poultry carcasses obtained through the flood fill algorithm remove a large amount of redundant information, so that the convergence of the second defect type detection network model is faster and the accuracy is higher, the training of the second defect type detection network model is supervised through the second accuracy reaching a preset accuracy threshold or the second iteration training number of the second defect type detection network model exceeding a threshold, and the convergence of the second defect type detection network model is ensured.

[0095] ReferenceFigure 5 In some embodiments of the present application, the in vivo penetration image of all poultry carcasses is obtained by the flood fill algorithm to obtain the ROI in vivo penetration image of all poultry carcasses, including:

[0096] Step S321, setting the upper and lower limits of the connectable pixels of the in vivo penetration image of the poultry carcass.

[0097] Step S322, flood fill according to the upper and lower limits of the connectable pixels of the in vivo penetration image of the poultry carcass, to obtain the ROI region mask of the in vivo penetration image of the poultry carcass.

[0098] Step S323, extracting the in vivo penetration image of all poultry carcasses through the ROI region mask to obtain the ROI in vivo penetration image of all poultry carcasses.

[0099] It should be noted that the in vivo penetration image of the poultry carcass is mostly a gray image, so the ROI in vivo penetration image is extracted by the flood fill algorithm, which is a method of filling the connected region with a specific color by setting the upper and lower limits of the connectable pixels and the connection method to achieve different filling effects. The flood fill is often used to mark or separate a part of the image for further processing or analysis, and can also be used to obtain a mask region from the input image, which can speed up the processing process, or only process the pixel points specified by the mask. The result of the operation is always a certain continuous region.

[0100] The ROI region mask obtained by the flood fill processes the in vivo penetration image of the poultry carcass to obtain the ROI in vivo penetration image, which is simple to implement and has better effect on the in vivo penetration image of the poultry carcass. The ROI region mask can quickly process the in vivo penetration image of the poultry carcass, quickly remove the redundant information of the in vivo penetration image of the poultry carcass, reduce the waste of computing power, and obtain a more accurate second defect type detection network model.

[0101] In some embodiments of the present application, the defect classification result includes: poultry claw defect, poultry carcass skin defect, poultry carcass internal bone defect and poultry carcass internal tumor defect, and the first defect type detection result and the second defect type detection result include poultry claw deformation, poultry claw blackening, poultry claw bleeding, poultry claw swelling, scale elevation, skin necrosis, blue-purple plaque, subcutaneous edema, pock, plaque, white spot or plaque on the crown, poultry bone deformity, poultry bone fracture and thoracic cavity cyst.

[0102] The first defect type detection result and the second defect type detection result can be automatically classified as the defect classification result, realizing market channel pre-classification, and being able to adapt to different scenarios of the market.

[0103] In some embodiments of the present application, the in-vivo penetrating image comprises an X-ray planar perspective view, an electronic computer tomography image, an ultrasonic imaging image, and a magnetic resonance imaging image.

[0104] In some embodiments of the present application, the first defect type detection network model or the second defect type detection network model is any one of the following network models: an RFCN network, an R-CNN network, a Fast R-CNN network, a Faster R-CNN network, a yolov2 network, a yolov3 network, and an SSD network.

[0105] In some embodiments of the present application, the defect type detection result of the to-be-detected poultry carcass is obtained by taking the union of the first defect type detection result and the second defect type detection result.

[0106] It should be noted that the union of the first defect type detection result and the second defect type detection result can obtain the most complete defect type detection result, but due to the difference in task scenarios, there may be other ways to obtain the defect type detection result, which is not specifically limited here.

[0107] In order to facilitate the understanding of those skilled in the art, one specific embodiment of the present application provides a defect type classification method for a poultry carcass, comprising:

[0108] Firstly, obtain the surface images and in-vivo penetrating images of a plurality of poultry carcasses;

[0109] Secondly, train a preset first defect type detection network model by using the surface images of the plurality of poultry carcasses, and train a preset second defect type detection network model by using the in-vivo penetrating images of the plurality of poultry carcasses;

[0110] The first defect type detection network model is obtained by the following method:

[0111] Obtain the surface images of a plurality of poultry carcasses;

[0112] Perform gray scale processing on the surface image of each poultry carcass to obtain a gray scale surface image of each poultry carcass;

[0113] Determine the boundary of each poultry carcass by using the vertical gray scale projection curve of the gray scale surface image of each poultry carcass;

[0114] Remove other regions except the boundary of the poultry carcass in the surface image of each poultry carcass to obtain a de-redundancy surface image of each poultry carcass;

[0115] Color the gray scale region of a preset gray scale value in each de-redundancy surface image by using the ROI Manager to obtain an ROI de-redundancy surface image of each poultry carcass; wherein, the ROI de-redundancy surface image comprises a colored ROI region.

[0116] calibrating the defect types of the ROI regions in the ROI de-redundant body surface images of all the poultry carcasses;

[0117] generating a first training set and a first test set from the calibrated ROI de-redundant body surface images according to a preset proportion;

[0118] training the first defect type detection network model iteratively through the first training set, testing the first accuracy of the first defect type detection network model through the first test set, and stopping training the first defect type detection network model if the first accuracy reaches a preset accuracy threshold or the first defect type detection network model exceeds a threshold number of iterations.

[0119] wherein the boundary of each poultry carcass is determined by the vertical gray projection curve of the gray body surface image of each poultry carcass, and the determination is achieved by the following method:

[0120] calculating the vertical integral projection function and the horizontal integral projection function in the interval [x1, x2] and the interval [y1, y2]:

[0121]

[0122]

[0123] wherein I(x, y) represents the pixel gray value of the point (x, y) in the gray body surface image of the poultry carcass, S V (x) represents the vertical integral projection function, S h (y) represents the horizontal integral projection function.

[0124] calculating the average integral projection function by the vertical integral projection function and the horizontal integral projection function:

[0125]

[0126]

[0127] wherein M v (y) represents the vertical integral projection function, M h (x) represents the horizontal integral projection function.

[0128] The first defect type detection network model is obtained by the following method:

[0129] obtaining the in-vivo penetration images of a plurality of poultry carcasses;

[0130] obtaining the ROI in-vivo penetration images of all the poultry carcasses by the flood fill algorithm from the in-vivo penetration images of all the poultry carcasses;

[0131] calibrating the ROI in vivo penetrability images of all poultry carcasses to obtain a calibration result;

[0132] generating a second training set and a second test set from the calibrated ROI in vivo penetrability images of the poultry carcasses according to a preset proportion;

[0133] iteratively training the second defect type detection network model through the second training set, and testing the second accuracy of the second defect type detection network model through the second test set;

[0134] stopping training the second defect type detection network model if the second accuracy reaches a preset accuracy threshold or the second iterative training number of the second defect type detection network model exceeds a threshold.

[0135] The ROI in vivo penetrability images of all poultry carcasses obtained by the flood fill algorithm have a large amount of redundant information removed, which can make the convergence of the second defect type detection network model faster and more accurate. The training of the second defect type detection network model is supervised by the second accuracy reaching the preset accuracy threshold or the second iterative training number of the second defect type detection network model exceeding the threshold, so as to ensure that the second defect type detection network model converges completely.

[0136] The in vivo penetrability images of all poultry carcasses are obtained by the flood fill algorithm, including:

[0137] setting upper and lower limits of the connectable pixels of the in vivo penetrability images of the poultry carcasses;

[0138] flood filling according to the upper and lower limits of the connectable pixels of the in vivo penetrability images of the poultry carcasses to obtain an ROI region mask of the in vivo penetrability images of the poultry carcasses;

[0139] extracting the in vivo penetrability images of all poultry carcasses through the ROI region mask to obtain the ROI in vivo penetrability images of all poultry carcasses.

[0140] In the third step, the body surface image and the in vivo penetrability image of the poultry carcass to be detected are received, the body surface image of the poultry carcass to be detected is input into the first defect type detection network model to obtain a first defect type detection result, the in vivo penetrability image of the poultry carcass to be detected is input into the second defect type detection network model to obtain a second defect type detection result, and the union of the first defect type detection result and the second defect type detection result is taken to obtain a defect type detection result of the poultry carcass to be detected. The defect type detection result of the poultry carcass to be detected is obtained according to a preset defect classification standard to obtain a defect classification result of the poultry carcass to be detected.

[0141] The defect classification standard is: the defect classification result includes: poultry claw defects, poultry carcass skin defects, poultry carcass internal bone defects and poultry carcass internal tumor defects; wherein the first defect type detection result and the second defect type detection result belonging to the poultry claw defects include poultry claw deformation, poultry claw blackening, poultry claw bleeding, poultry claw swelling and scale lifting; the first defect type detection result and the second defect type detection result belonging to the poultry carcass skin defects include skin necrosis, blue-purple patches, subcutaneous edema, scab, pockmark and crown white spots or patches; the first defect type detection result and the second defect type detection result belonging to the poultry carcass internal bone defects include poultry bone deformity and poultry bone fracture; the first defect type detection result and the second defect type detection result belonging to the poultry carcass internal tumor defects include thoracic cavity cysts.

[0142] In the fourth step, the defect classification result of the poultry carcass to be detected is sent to a sorting device; the sorting device is used to obtain a sorting instruction according to the defect classification result of the poultry carcass to be detected and execute the sorting instruction.

[0143] Referring to Figure 7 In the fourth step, the defect classification result of the poultry carcass to be detected is sent to a sorting device; the sorting device is used to obtain a sorting instruction according to the defect classification result of the poultry carcass to be detected and execute the sorting instruction.

[0144] Referring to Figure 6 In one embodiment of the present application, a poultry carcass defect type classification system is also provided, which comprises an image receiving module 1001, a first defect type detection module 1002, a second defect type detection module 1003, a defect classification module 1004 and a sorting module 1005, wherein:

[0145] The image receiving module 1001 is used to receive the body surface image and the internal penetration image of the poultry carcass to be detected;

[0146] The first defect type detection module 1002 is used to input the body surface image of the poultry carcass to be detected into a preset first defect type detection network model to obtain the first defect type detection result output by the first defect type detection network model;

[0147] The second defect type detection module 1003 is used to input the internal penetration image into a preset second defect type detection network model to obtain the second defect type detection result output by the second defect type detection network model;

[0148] The defect classification module 1004 is used to judge the defect classification result of the poultry carcass to be detected according to the preset defect classification standard, the first defect type detection result and the second defect type detection result;

[0149] The sorting module 1005 is used to implement the sorting of the poultry carcass to be detected according to the defect classification result.

[0150] It should be noted that since the one kind of poultry carcass defect type classification system in the present embodiment and the one kind of poultry carcass defect type classification method described above are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the present device embodiment, which will not be described in detail here.

[0151] Those of ordinary skill in the art will understand that all or some of the steps in the method disclosed above can be implemented as software, firmware, hardware, or a suitable combination thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer-readable media, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of data such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, it is common knowledge to those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and can include any data delivery medium.

[0152] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "exemplary embodiment", "example", "specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the exemplary description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0153] Although embodiments of the present application have been shown and described, those of ordinary skill in the art will understand that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirit of the present application, and the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method of classifying a defect type of a poultry carcass, characterized by, The poultry carcass defect type classification method comprises: receiving a body surface image and an internal penetration image of a poultry carcass to be detected; inputting the body surface image of the poultry carcass to be detected into a preset first defect type detection network model to obtain a first defect type detection result output by the first defect type detection network model; the first defect type detection network model is obtained by the following way: obtaining body surface images of a plurality of poultry carcasses; performing gray scale processing on the body surface image of each poultry carcass to obtain a gray scale body surface image of each poultry carcass; determining the boundary of each poultry carcass through the vertical gray scale projection curve of the gray scale body surface image of each poultry carcass; removing other regions outside the boundary of the poultry carcass in the body surface image of each poultry carcass to obtain a de-redundancy body surface image of each poultry carcass; coloring the gray scale region of a preset gray scale value in each de-redundancy body surface image through ROI Manager to obtain an ROI de-redundancy body surface image of each poultry carcass; wherein the ROI de-redundancy body surface image comprises a colored ROI region; training the first defect type detection network model through the ROI de-redundancy body surface images of all the poultry carcasses; inputting the internal penetration image into a preset second defect type detection network model to obtain a second defect type detection result output by the second defect type detection network model; the second defect type detection network model is obtained by the following way: obtaining internal penetration images of a plurality of poultry carcasses; obtaining ROI internal penetration images of all the poultry carcasses by filling algorithm through all the internal penetration images of the poultry carcasses; calibrating the defect type of the ROI internal penetration images of all the poultry carcasses; generating a second training set and a second test set according to a preset proportion from the calibrated ROI internal penetration images of the poultry carcasses; iteratively training the second defect type detection network model through the second training set, and testing the second accuracy of the second defect type detection network model through the second test set; if the second accuracy reaches a preset accuracy threshold or the number of iterations of the second defect type detection network model exceeds a threshold, stop training the second defect type detection network model; judging the defect classification result of the poultry carcass to be detected according to a preset defect classification standard, the first defect type detection result and the second defect type detection result; implementing the sorting of the poultry carcass to be detected according to the defect classification result.

2. The method of classifying the defect type of a poultry carcass according to claim 1, characterized in that, The training of the first defect type detection network model through the ROI de-redundancy body surface images of all the poultry carcasses comprises: calibrating the defect type of the ROI region in the ROI de-redundancy body surface image of all the poultry carcasses; generating a first training set and a first test set according to a preset proportion from all the calibrated ROI de-redundancy body surface images; training the first defect type detection network model through the first training set iteratively, and testing a first accuracy of the first defect type detection network model through the first test set; if the first accuracy reaches a preset accuracy threshold or a first iteration training number of the first defect type detection network model exceeds a threshold, stopping training the first defect type detection network model.

3. The method of classifying the type of defect of the poultry carcass according to claim 1, characterized in that, The method comprises the following steps: setting upper and lower limits of the connectable pixels of the in vivo penetration image of the poultry carcass; performing the flood fill according to the upper and lower limits of the connectable pixels of the in vivo penetration image of the poultry carcass to obtain an ROI region mask of the in vivo penetration image of the poultry carcass; extracting the in vivo penetration image of the poultry carcass through the ROI region mask to obtain the ROI in vivo penetration image of the poultry carcass.

4. The method of classifying a defect type of a poultry carcass according to claim 1, wherein, The defect classification result includes poultry claw defects, poultry carcass skin defects, poultry carcass internal bone defects and poultry carcass internal tumor defects, and the first defect type detection result and the second defect type detection result include poultry claw deformation, poultry claw blackening, poultry claw bleeding, poultry claw swelling, scale elevation, skin necrosis, blue-purple patches, subcutaneous edema, scab, patch, crown white spots or patches, poultry bone deformity, poultry bone fracture and thoracic cyst.

5. The method of classifying the defect type of a poultry carcass according to claim 1, wherein, The in vivo penetration image includes an X-ray planar perspective view, an electronic computer tomography view, an ultrasonic imaging view and a magnetic resonance imaging view.

6. The method of classifying the defect type of a poultry carcass according to claim 1, wherein, The first defect type detection network model or the second defect type detection network model is any one of the following network models: an RFCN network, an R-CNN network, a FastR-CNN network, a Faster R-CNN network, a yolov2 network, a yolov3 network and an SSD network.

7. The method of classifying the type of defect of a poultry carcass according to claim 1, characterized in that, The defect type detection result of the poultry carcass to be detected is obtained by taking the union of the first defect type detection result and the second defect type detection result.

8. A classification system for defect types in poultry carcasses, characterized in that, The poultry carcass defect type classification system comprises: an image receiving module configured to receive a body surface image and an in vivo penetration image of a poultry carcass to be detected; a first defect type detection module configured to input the body surface image of the poultry carcass to be detected into a preset first defect type detection network model to obtain a first defect type detection result output by the first defect type detection network model; the first defect type detection network model is obtained by the following method: The body surface images of a plurality of poultry carcasses are acquired; the body surface image of each poultry carcass is subjected to grayscale processing to obtain a grayscale body surface image of each poultry carcass; the boundary of each poultry carcass is determined through the vertical grayscale projection curve of the grayscale body surface image of each poultry carcass; the area outside the boundary of each poultry carcass in the body surface image of each poultry carcass is removed to obtain a de-redundancy body surface image of each poultry carcass; the grayscale area with a preset grayscale value in each de-redundancy body surface image is colored through ROI Manager to obtain an ROI de-redundancy body surface image of each poultry carcass; the ROI de-redundancy body surface image comprises a colored ROI area; the first defect type detection network model is trained through the ROI de-redundancy body surface images of all poultry carcasses. The second defect type detection module is configured to input the in-depth penetration image into a preset second defect type detection network model to obtain a second defect type detection result output by the second defect type detection network model; the second defect type detection network model is obtained in the following manner: The in-depth penetration images of a plurality of poultry carcasses are acquired; the in-depth penetration images of all poultry carcasses are subjected to a flood fill algorithm to obtain ROI in-depth penetration images of all poultry carcasses; the defect types of the ROI in-depth penetration images of all poultry carcasses are calibrated; the calibrated ROI in-depth penetration images of poultry carcasses are generated into a second training set and a second test set according to a preset proportion; the second defect type detection network model is iteratively trained through the second training set, and the second accuracy of the second defect type detection network model is tested through the second test set; if the second accuracy reaches a preset accuracy threshold or the number of iterations of the second defect type detection network model exceeds a threshold, the training of the second defect type detection network model is stopped; The defect classification module is configured to determine the defect classification result of the poultry carcass to be detected according to a preset defect classification standard, the first defect type detection result and the second defect type detection result. The sorting module is configured to sort the poultry carcass to be detected according to the defect classification result.

Citation Information

Patent Citations

  • Vehicle license plate recognition method based on video

    CN104050450A

  • X-ray defect detection method and system based on digital image region growth

    CN111652844A