An artificial intelligence food safety supervision system based on AI algorithm

Through the food safety artificial intelligence supervision system based on AI algorithms, image segmentation and prediction modules are used to compare the morphology of different parts of food, solving the problems of high food safety detection cost and poor predictability in the existing technology, and realizing timely detection of food abnormalities. Discovery and economical detection results.

CN117456468BActive Publication Date: 2024-08-27JUNHUA HI-TECH GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311624600.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2024-08-27
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

Existing food safety detection technology obtains an overall image of the food, but has the problems of high cost and poor predictability. It is difficult to detect food abnormalities in a timely manner, resulting in the possibility of widespread damage to the food.

Method used

A food safety artificial intelligence supervision system based on AI algorithms is used to obtain the overall image of the food through the image acquisition module. The image segmentation module segments the image, the prediction module predicts the shape of the junction area, and the quality judgment module compares the predicted image with the actual image. , determine whether there is any abnormality in the food.

Benefits of technology

It achieves timely detection of food abnormalities, avoids large-scale damage to food, is economical, and improves detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117456468B
    Figure CN117456468B
Patent Text Reader

Abstract

The present invention discloses a food safety artificial intelligence supervision system based on an AI algorithm, which belongs to the field of food safety detection technology, and includes: an image acquisition module, which is configured to acquire the overall image of food; an image segmentation module, which is configured to segment the overall image of food according to different parts; a prediction module, which is configured to predict the morphology of any object in the adjacent boundary area with other objects to obtain a predicted image of the detection object; a quality judgment module, which is configured to compare the predicted image of the detection object with the morphology of the physical image of the detection object, and when it is determined that the morphological difference between the predicted image of the detection object and the physical image of the detection object exceeds a preset threshold, the food is judged to be abnormal. The present invention provides a food safety artificial intelligence supervision system based on an AI algorithm, which can effectively judge food abnormalities, has good detection effect, and is economical.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of food safety detection, and specifically relates to an artificial intelligence food safety supervision system based on an AI algorithm. Background Art

[0002] When monitoring food safety, currently the main method is to obtain the overall image of the food, and then determine the abnormality of the food based on machine learning abnormal images. When using machine learning methods, a large number of abnormal image samples and machine learning are required, which requires a lot of investment and has poor economic efficiency. On the other hand, currently the main method is to obtain the overall image of the food. When food abnormal information appears in the overall image, the food usually has a large area of ​​abnormality, and the predictability is poor. Summary of the invention

[0003] The present invention provides an artificial intelligence food safety supervision system based on an AI algorithm, which can effectively judge food abnormalities, has good detection effect and good economy.

[0004] The present invention is achieved through the following technical solutions:

[0005] The present invention provides an artificial intelligence food safety supervision system based on an AI algorithm, comprising: an image acquisition module, which is configured to acquire an overall image of food; an image segmentation module, which is configured to segment the overall image of food according to different parts; a prediction module, which is configured to predict the morphology of any object in a boundary area adjacent to other objects to obtain a predicted image of the detection object; and a quality judgment module, which is configured to compare the morphology of the predicted image of the detection object with the morphology of the actual image of the detection object, and determine that the food is abnormal when the morphological difference between the predicted image of the detection object and the actual image of the detection object exceeds a preset threshold.

[0006] In some of the embodiments, the image segmentation module includes a color segmentation unit and / or a shape segmentation unit; the color segmentation unit segments the overall image of the food based on color difference to obtain objects in different parts; the shape segmentation unit segments the overall image of the food based on the degree of shape change to obtain objects in different parts.

[0007] In some of the embodiments, the color segmentation unit segments the overall image of the food based on color difference to obtain objects in different parts, including the following steps: S10, deleting the non-food image area in the overall image; S20, performing an image binarization operation on the remaining image; S30, obtaining different parts of the food based on graphic binarization.

[0008] In some of the embodiments, the prediction module includes a shape prediction unit and a color prediction unit; the shape prediction unit predicts the shape of the detection object in the boundary area adjacent to other objects based on an extension curve of one end of the detection object away from the boundary area toward the boundary area; the color prediction unit predicts the color of the detection object in the boundary area adjacent to other objects based on the color of the detection object away from the boundary area.

[0009] In some of the embodiments, the image segmentation module includes a whole segmentation unit and a local segmentation unit; the whole segmentation unit is configured to segment the whole image of the food to obtain an image that only includes any one object after segmentation; the local segmentation unit is configured to segment the whole image of the food to obtain an image that simultaneously includes at least two objects.

[0010] In some embodiments, the quality judgment module includes an overall judgment unit and a local judgment unit; the overall judgment unit obtains the image segmented by the overall segmentation unit and performs judgment; the local judgment unit obtains the image segmented by the local segmentation unit and performs judgment.

[0011] In some of the embodiments, the prediction module obtains the predicted image of the detection object including the following steps: T10, obtaining the type of food; T20, based on the type of food, obtaining the morphological changes of healthy foods in a database; T30, obtaining the morphological change trend of the food detection object from a morphology away from the boundary area to the boundary area; T40, obtaining the predicted image of the detection object based on the morphological changes of healthy foods in the database and the morphological change trend of the food from a morphology away from the boundary area to the boundary area.

[0012] In some of the embodiments, after the image segmentation module segments the whole image, a root-stem segmentation image and / or a stem-leaf segmentation image is obtained.

[0013] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0014] The food safety artificial intelligence monitoring system based on the AI ​​algorithm provided by the present invention mainly obtains the image content of the intersection of different parts of food, and predicts the image of the intersection of the segmented object and other objects, and compares the predicted image with the actual image to determine whether there is an abnormality at the intersection of the food object and other objects. Based on the above embodiment, it is also possible to detect the abnormality in time when the food begins to be abnormal, avoid large-scale damage to the food, and achieve the purpose of saving food. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A schematic diagram of a process of segmenting an entire image by a color segmentation unit in a food safety artificial intelligence supervision system based on an AI algorithm provided in some embodiments of the present invention;

[0017] Figure 2 A schematic diagram of a process for obtaining a detection object by a prediction module in a food safety artificial intelligence supervision system based on an AI algorithm provided in some embodiments of the present invention;

[0018] Figure 3 A flowchart of an AI algorithm-based food safety artificial intelligence supervision method provided for some embodiments of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0020] In the description of the present invention, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc. used to indicate the orientation or position relationship are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship commonly placed when the product of the invention is used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0021] In addition, if the terms "horizontal" or "vertical" appear in the description of the present invention, it does not mean that the components are required to be absolutely horizontal or suspended, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0022] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0023] The terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other steps or modules that are inherent to these processes, methods, products, or devices.

[0024] The present embodiment provides a food safety artificial intelligence supervision system based on an AI algorithm, which mainly includes an image acquisition module, an image segmentation module, a prediction module and a quality judgment module. Among them, the image acquisition module is configured to obtain the overall image of the food; the image acquisition module can obtain the overall image of the food through a camera. To obtain the overall image of the food, it can be assisted by setting a transparent tray, adjusting the posture of the food, etc. Of course, in different embodiments, the overall image of the food can also be a partial image of the whole food. When the food includes an edible part and an inedible part, the overall image of the food can be only the edible part. The image segmentation module is configured to segment the overall image of the food according to different parts; by segmenting the overall image of the food, the different objects after segmentation are mainly different parts. In different embodiments, different objects can be completely different parts, and an object obtained after segmentation can also be an image content that mainly includes one part, with less or no other parts. The prediction module is configured to predict the morphology of any object in the boundary area with other objects to obtain a predicted image of the detection object; the object predicted by the prediction module refers to the specific part of the food, and the boundary area of ​​any object with other objects can be understood as the area where different parts intersect; the main function of the prediction module is to predict the morphology of the detected boundary area of ​​the detected food in a healthy state, and based on the prediction process, obtain the predicted image of the detection object. The quality judgment module is configured to compare the predicted image of the detection object with the morphology of the physical image of the detection object, and determine whether there is a difference in the morphology between the predicted image of the detection object and the physical image of the detection object. When there is a difference in the morphology between the predicted image of the detection object and the physical image of the detection object, and the difference value exceeds the preset threshold, it is determined that the detected food is abnormal.

[0025] Taking raw food as an example, at the intersection of different parts, there will be mutual wrapping, which will lead to poor ventilation in this area and difficulty in moisture loss, making it more prone to abnormalities at the intersection of different parts. Food abnormalities include all forms of food from poor appearance and freshness to complete decay of food. When food becomes abnormal, its form will change compared to normal food of the same type.

[0026] Through the configuration of the above embodiment, the image content of the intersection of different parts of the food is mainly obtained, and the image of the intersection of the segmented object and other objects is predicted, and the predicted image is compared with the actual image to determine whether there is an abnormality at the intersection of the food object and other objects. Based on the above embodiment, the abnormality can also be discovered in time when the food begins to be abnormal, avoiding large-scale damage to the food and achieving the purpose of saving food.

[0027] In some embodiments, the image segmentation module includes at least one of a color segmentation unit and a shape segmentation unit. The color segmentation unit segments the overall image of the food based on the color difference to obtain objects at different parts. Exemplarily, when there is a large difference in color between different parts of the food, the objects at different parts of the overall image can be directly obtained by the color difference. The shape segmentation unit segments the overall image of the food based on the degree of shape change to obtain objects at different parts. Exemplarily, the root of the food has a tendency to gradually increase from the distal end to the stem, and the shape and size of the thickest part of the stem are significantly different from the shape and size of the root, and there will be a large change at the connection, so the overall image of the food can be segmented by the degree of change in the shape of the food.

[0028] In some examples, when the image segmentation module includes both a segmentation unit and a shape segmentation unit, one of the units can be used as the focus of detection according to the specific classification of the food, and the other unit can be used as a verification or backup. The detection value ratio of the two can also be set to obtain the final segmented image.

[0029] Through the arrangement of the above embodiment, the segmentation of the whole food image can be achieved, so as to better identify the boundary areas of different parts of the food in the future, so as to obtain information on whether the food is abnormal.

[0030] In some of these examples, see Figure 1 The color segmentation unit segments the whole image of the food based on the color difference to obtain objects of different parts, which mainly includes the following steps:

[0031] S10, deleting the non-food image area in the overall image. In step S10, the overall image of the food usually obtained includes the food body and other background. In this step, the other background areas except the food are deleted so that further operations can be performed on the food body in a targeted manner.

[0032] S20, performing an image binarization operation on the remaining image. In step S20, the remaining image mainly refers to the food body. When performing the image binarization operation, for different foods, different image binarization demarcation values ​​can be specifically set to obtain two regions of different colors. Alternatively, different demarcation values ​​can be continuously set for the image without determining the type of food until two regions of different colors are obtained.

[0033] S30, obtaining different parts of the food based on image binarization.

[0034] In the above embodiment, objects of different parts are obtained by performing a binarization operation on the food image.

[0035] In some embodiments, the prediction module includes a shape prediction unit and a color prediction unit. The shape prediction unit predicts the shape of the detection object in the adjacent boundary area with other objects based on the extension curve from one end of the detection object away from the boundary area to the boundary area. For example, taking stems and leaves as an example, there is an area with a gradually decreasing size from the thick end of the stem to the connection with the leaves, and the size of the leaves is obviously different from the size change area of ​​the stems. Therefore, the morphology of different parts of the food in the intersection area with other parts can be predicted in this way. By predicting the shape and comparing it with the real image in the subsequent steps, it can be obtained whether the food has abnormalities in the boundary area of ​​different parts. When the food has abnormalities in the boundary area, it will expand (mainly due to the enrichment of internal microorganisms) or shrink (mainly due to dehydration). This method can effectively determine whether the above situation occurs. The color prediction unit predicts the color of the detection object in the adjacent boundary area with other objects based on the color of the detection object away from the boundary area. For example, the same part of the food has the same or similar color, and there will be no large color difference. Based on this method, the color of the boundary area of ​​the detection object can be predicted.

[0036] In some examples, taking the shape of the boundary region between stems and leaves as an example, the shape prediction unit may use the following steps in the process of predicting the shape of the boundary region:

[0037]

[0038] Among them, r is the radius of the shape of the stem at the junction with the leaves; R is the radius of the thick end of the stem, and L is the height of the cone formed with the thick end as the ground and the junction area as the waist. It is the distance between the junction area and the thick end of the stem.

[0039] In the above embodiment, by setting the shape prediction unit and the color prediction unit, the shape and color of the detected food in a healthy state can be obtained, and this can be used as a reference to determine whether there is any abnormality in the physical image of the food.

[0040] In some examples, the prediction module may include one of a shape prediction unit and a color prediction unit, or may include both.

[0041] In some embodiments, the image segmentation module includes an overall segmentation unit and a local segmentation unit. The overall segmentation unit is configured to segment the overall image of the food to obtain an image that only includes any object after segmentation. In the images after the overall segmentation unit, each image only includes an object in one part, so as to better judge the object containing the part. For most foods, after the overall image is segmented, there will be objects whose parts are difficult to segment, and images including multiple parts can be segmented by the local segmentation unit.

[0042] In the above embodiment, the segmented objects are further classified so that a better detection effect can be achieved when the food is subsequently detected.

[0043] In some embodiments, the quality judgment module includes an overall judgment unit and a local judgment unit. The overall judgment unit obtains the image segmented by the overall segmentation unit and makes a judgment. In a specific example, the image segmented by the overall segmentation unit only includes an object in one part, which can be better compared with the predicted image to obtain a more accurate detection result. The local judgment unit obtains the image segmented by the local segmentation unit and makes a judgment. After comparing with the predicted image, if there is an abnormality, further judgment can be made through manual recognition or other recognition methods to obtain a more accurate judgment result.

[0044] In some of these examples, see Figure 2 The prediction module obtains the predicted image of the detected object mainly by the following steps:

[0045] T10. Obtaining the type of food. In T10, the type of food can be identified by using existing technology to obtain the type information of the food.

[0046] T20, based on the obtained food type, obtaining the morphological changes of the healthy food of the type in the database. In T20, by searching for the same type of food in the database, the morphological changes of the same type of food are obtained, such as shape change trends, color changes and other information.

[0047] T30, obtaining the morphological change trend of the food detection object from the morphology away from the boundary area to the morphological change trend of the boundary area. In T30, based on the morphological change trend of the same type of food in the database, the morphological change trend of the detected food is obtained. For example, the shape of the food has a trend of gradually decreasing from the far end, and its change trend can be calculated, and based on this trend, the morphological change trend of the detected food can be predicted.

[0048] T40. Based on the morphological changes of healthy foods in the database and the morphological change trends of foods from being away from the boundary area to the boundary area, a predicted image of the detection object is obtained.

[0049] In the above embodiment, the morphological change trend of the same type of healthy food in the database is obtained, and then the morphological change trend of the detected food is predicted to obtain a predicted image of the detected object.

[0050] In some embodiments, after the image segmentation module segments the whole image, at least one of a root and stem segmentation image and a stem and leaf segmentation image is obtained. For different foods, one or more of them can be selectively obtained.

[0051] On the other hand, see Figure 3 The present invention provides a food safety artificial intelligence supervision method based on an AI algorithm, which mainly includes the following steps:

[0052] K10. Get an overall image of the food.

[0053] K20. Segment the food image according to its different parts.

[0054] K30. Predict the shape of any object in the adjacent boundary area with other objects to obtain a predicted image of the detected object.

[0055] K40. Compare the predicted image of the detection object with the morphology of the actual image of the detection object.

[0056] K50. If the morphological difference between the predicted image of the detection object and the actual image of the detection object exceeds a preset threshold, the food is determined to be abnormal.

[0057] An embodiment of the present application also provides a food safety artificial intelligence supervision device based on an AI algorithm, including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the food safety artificial intelligence supervision method based on the AI ​​algorithm in the above embodiment.

[0058] This embodiment also provides a computer storage medium on which a computer program is stored. The computer program is loaded by a processing module to implement any of the AI ​​algorithm-based artificial intelligence food safety supervision methods in the above embodiments.

[0059] The above description is only a preferred embodiment of the present invention and does not constitute any limitation to the present invention. Any simple modification or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A food safety artificial intelligence supervision system based on AI algorithm, characterized in that: include: An image acquisition module, wherein the image acquisition module is configured to acquire an overall image of the food; An image segmentation module, wherein the image segmentation module is configured to segment the whole image of the food according to different parts; A prediction module, wherein the prediction module is configured to predict the shape of any object in a region adjacent to a boundary with other objects to obtain a predicted image of the detected object; A quality judgment module, wherein the quality judgment module is configured to compare the morphology of the predicted image of the detection object with the morphology of the actual image of the detection object, and determine that the food is abnormal when the morphology difference between the predicted image of the detection object and the actual image of the detection object exceeds a preset threshold; The prediction module includes a shape prediction unit and a color prediction unit; The shape prediction unit predicts the shape of the detection object in the vicinity of the boundary area with other objects based on an extension curve of one end of the detection object away from the boundary area toward the boundary area; The color prediction unit predicts the color of the detected object in the adjacent boundary area with other objects based on the color of the detected object away from the boundary area; When the detected object and its neighboring objects are stems and leaves respectively, the shape prediction unit predicts the shape of the boundary area including the following steps: Among them, r is the radius of the shape of the stem at the junction with the leaves; R is the radius of the thick end of the stem, and L is the height of the cone formed with the thick end as the ground and the junction area as the waist. It is the distance between the junction area and the thick end of the stem.

2. The food safety artificial intelligence supervision system based on AI algorithm according to claim 1 is characterized in that: The image segmentation module includes a color segmentation unit and / or a shape segmentation unit; The color segmentation unit segments the whole image of the food based on the color difference to obtain objects of different parts; The shape segmentation unit segments the whole image of the food based on the shape change degree to obtain objects of different parts.

3. The food safety artificial intelligence supervision system based on AI algorithm according to claim 2 is characterized in that: The color segmentation unit segments the whole image of the food based on the color difference to obtain objects of different parts, including the following steps: S10, deleting the non-food image area in the overall image; S20, performing an image binarization operation on the remaining image; S30, obtaining different parts of the food based on the graphic binarization.

4. The food safety artificial intelligence supervision system based on AI algorithm according to claim 1 is characterized in that: The image segmentation module includes an overall segmentation unit and a local segmentation unit; The whole segmentation unit is configured to segment the whole image of the food to obtain an image that only includes any one object after segmentation; The local segmentation unit is configured to segment the entire image of the food to obtain an image including at least two objects at the same time.

5. The food safety artificial intelligence supervision system based on AI algorithm according to claim 4 is characterized in that: The quality judgment module includes an overall judgment unit and a local judgment unit; The overall judgment unit obtains the image segmented by the overall segmentation unit and performs judgment; the local judgment unit obtains the image segmented by the local segmentation unit and performs judgment.

6. The food safety artificial intelligence supervision system based on AI algorithm according to claim 1 is characterized in that: The prediction module obtains the predicted image of the detection object including the following steps: T10, obtain food types; T20. Based on food types, obtain the morphological changes of healthy foods in the database; T30, obtaining the morphological change trend of the food inspection object away from the boundary area to the boundary area; T40. Based on the morphological changes of healthy foods in the database and the morphological change trends of foods from being away from the boundary area to the boundary area, a predicted image of the detection object is obtained.

7. The food safety artificial intelligence supervision system based on AI algorithm according to claim 1 is characterized in that: After the image segmentation module segments the entire image, a root-stem segmentation image and / or a stem-leaf segmentation image is obtained.