Rapid food detection device, method and equipment and storage medium

By integrating image and hyperspectral recognition modules in the food detection device, combining neural network models and dimmable light sources, the problems of traditional food detection time and sample variability are solved, real-time and accurate food detection on the production line is achieved, and the inspection is ensured. Reliability and stability of the results.

CN119000550APending Publication Date: 2024-11-22新腾数致网络科技有限公司
View PDF 0 Cites 7 Cited by

Patent Information

Application Number
CN202410953219.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Traditional food testing methods take a long time and may damage samples, making it difficult to achieve immediate, lossless and efficient detection on the production line. In addition, hyperspectral detection technology has accuracy and reliability problems when dealing with sample variability and environmental factors.

Method used

A food rapid detection device was designed, including image recognition module, hyperspectral recognition module, working cavity, power transmission module, information matching module and main control module. The food type, parts and ingredients are identified through neural network models, and the use of adjustable The light source module optimizes lighting conditions and combines tags and wireless reading and writing equipment to achieve data synchronization and alarm signals.

Benefits of technology

Realize instant and non-invasive food testing on the production line, improve detection accuracy and adaptability, accurately identify and compensate sample variation, ensure the reliability and stability of the test results, and solve the problem of sample differences in traditional methods. Accuracy issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119000550A_ABST
    Figure CN119000550A_ABST
Patent Text Reader

Abstract

The invention provides a rapid food detection device, method and equipment and a storage medium. A power transmission module of the device is used for conveying food to a detection position in a working cavity; the image recognition module and the hyperspectral recognition module are respectively used for acquiring an image and spectral data of the food; the information matching module is used for synchronizing detection results; and the main control module is used for calling the food material data model to carry out image recognition to obtain type, part and stage information, and then calling the corresponding food material component information model to recognize the spectral data to obtain component information. According to the method, firstly, the characteristic information of the food can be obtained through the image recognition module and the food material data model, and on the basis, the spectral data of the food are deeply analyzed by using the hyperspectral recognition module and the food material component information model, so that high-precision recognition of the type, part and stage information and components of the food is realized; the detection range is wide, the result is accurate, and the accuracy problem caused by sample difference in a traditional method is effectively solved.
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 detection, and in particular relates to a rapid food detection device, method, equipment and storage medium. Background Art

[0002] In today's food industry production scenarios, as consumers' requirements for food safety and quality continue to increase, efficient and accurate food testing technology has become the key to ensuring product quality and improving production efficiency. Traditional food testing methods often rely on physical sampling and laboratory analysis, which is not only time-consuming, but may also affect the integrity of the product due to sample pretreatment (such as crushing), thereby interfering with subsequent production and sales processes. Therefore, developing a technology that can detect food quality in real time and non-destructively on the production line has become a technical problem that needs to be solved urgently.

[0003] In recent years, hyperspectral imaging technology has been widely explored and applied in the field of food testing because it can obtain information on the chemical composition and physical properties of food without physical contact or destruction of the sample. By building a hyperspectral database and model for specific ingredients, rapid analysis of their nutritional content, freshness, contaminants, and other aspects can be achieved. However, existing technologies still face challenges in practical applications, especially in dealing with sample variations caused by different sources, processing conditions, or storage time.

[0004] Specifically, the hyperspectral characteristics of food samples will show certain differences in different parts, processing methods and storage conditions. These differences may cause deviations in the analysis results based on the standard model, thus affecting the accuracy and reliability of the detection. In addition, environmental factors such as light changes, temperature fluctuations and the stability of the instrument itself are also important factors affecting the accuracy of hyperspectral detection. Therefore, how to effectively correct these variabilities and ensure the universality and robustness of the model has become a bottleneck for the further development of hyperspectral food detection technology. Summary of the invention

[0005] In view of this, the present invention aims to provide a food rapid detection device, method, equipment and storage medium to implement instant, non-invasive and comprehensive detection on the production line, while having high detection accuracy and adaptability, and being able to accurately identify and compensate for sample variations caused by different conditions or time periods, thereby ensuring the reliability and stability of the detection results.

[0006] In order to achieve the above object, the technical solution provided by the present invention is as follows: In a first aspect, the present invention provides a food rapid detection device, comprising: Image recognition module, hyperspectral recognition module, working cavity, power transmission module, information matching module and main control module; The power transmission module is used to transmit the food to be tested to the testing position in the working cavity; The image recognition module and the hyperspectral recognition module are used to obtain the image and spectral data of the food to be tested at the testing position respectively; The information matching module is used to store the physical and chemical test data of food and the synchronous test results; The main control module is used to issue instructions to drive each module to complete the corresponding operation; it is also used to call the food data model to identify the acquired image data to obtain the type, part and stage information of the food to be detected; it is also used to call the food ingredient information model that matches the type, part and stage information to identify the acquired spectral data to obtain the ingredient information of the food to be detected; it is also used to generate the test result according to the ingredient information; Among them, the food data model is a neural network model trained based on the image features of different types of food at different stages in different parts; the food ingredient information model is a neural network model trained based on the spectral data of food at different stages and the corresponding physical and chemical test data.

[0007] Furthermore, the training process of the food material data model includes: Acquire image data of different parts of different types of food at different stages through an image recognition module and / or external sources; Combine the basic information of food to annotate the features of food in the image data to form an image training set with multi-dimensional information; The selected neural network is trained using the image training set to obtain an ingredient data model for identifying food type, part and stage information. The stage information includes the stage of the food and corresponding characteristic information.

[0008] Furthermore, the training process of the food ingredient information model includes: Obtain spectral data and physical and chemical test results of different parts of different types of food at different stages through a hyperspectral recognition module and / or external sources; The characteristic information, spectral data and physical and chemical test results of food at different stages form a training set; The selected neural network is trained using the training set to obtain food ingredient information models for identifying food ingredients at different stages.

[0009] Furthermore, an adjustable light source module is included, and the adjustable light source module is used to provide light conditions for detection for the image recognition module and the hyperspectral recognition module in the working cavity. The light conditions for detection are set according to the following steps: Recording illumination condition parameter values ​​of images and spectral data used for training food data models and food ingredient information models respectively; Calculate the contribution of different source data in training the corresponding model, and generate the benchmark lighting conditions of the corresponding model based on the lighting condition parameter value of the source data with the highest contribution; During the model training process, the image recognition module and the hyperspectral recognition module and / or the image and spectral data obtained from external sources are used to continuously update the contribution and the reference lighting conditions, and the updated reference lighting conditions are used as the lighting conditions for the corresponding model detection.

[0010] Furthermore, the information matching module includes: a tag and a wireless reading and writing device; The label is set at the food to be tested, and the label stores the test results and physical and chemical test data of the food to be tested; The wireless reading and writing device is arranged in the working cavity, and is used to read the physical and chemical test data of the food to be tested from the label and send it to the main control module; it is also used to synchronize the test results to the label.

[0011] Furthermore, the main control module is also used to compare the ingredient information identified by the food ingredient information model with the physical and chemical test data of the corresponding food, obtain abnormal data and issue an alarm signal.

[0012] In a second aspect, the present invention further provides a method for rapid food detection, which is applied to the rapid food detection device of the first aspect, and comprises the following steps: Conveying the food to be tested to the testing position in the working chamber; Respectively acquiring images and spectral data of the food to be tested at the testing position; The acquired image data is identified using the food data model to obtain the type, part and stage information of the food to be tested; Selecting a food ingredient information model that matches the type, part, and stage information to identify the acquired spectral data, and obtaining ingredient information of the food to be tested; Among them, the food data model is a neural network model trained based on the image features of different types of food at different stages in different parts; the food ingredient information model is a neural network model trained based on the food spectral data and corresponding physical and chemical test data.

[0013] Furthermore, the training process of the food data model and the food ingredient information model includes: Obtain images and spectral data of different parts of different types of food at different stages, as well as basic information and physical and chemical test results of the food; Combine the basic information of food to annotate the features of food in the image data to form an image training set with multi-dimensional information; The selected neural network is trained using the image training set to obtain a food material data model for identifying food type, part and stage information, wherein the stage information includes the stage of the food and corresponding characteristic information; The characteristic information, spectral data and physical and chemical test results of food at different stages form a training set; The selected neural network is trained using the training set to obtain food ingredient information models for identifying food ingredients at different stages.

[0014] Accordingly, the present invention also provides a computer device, the device comprising a processor and a memory: The memory is used to store the computer program and send the instructions of the computer program to the processor; The processor executes a rapid food detection method as described in the second aspect according to the instructions of the computer program.

[0015] Correspondingly, the present invention also provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, a rapid food detection method as described in the second aspect is implemented.

[0016] In summary, the present invention provides a food rapid detection device, method, equipment and storage medium, the device includes an image recognition module, a hyperspectral recognition module, a working cavity, a power transmission module, an information matching module and a main control module; the power transmission module is used to transmit the food to be detected to the detection position in the working cavity; the image recognition module and the hyperspectral recognition module are respectively used to obtain the image and spectral data of the food to be detected at the detection position; the information matching module is used to store the physical and chemical detection data of the food and the synchronous detection results; the main control module is used to issue instructions to drive each module to complete the corresponding operation; it is also used to call the food data model to identify the acquired image data to obtain the type, part and stage information of the food to be detected, and is also used to call the food ingredient information model that matches the type, part and stage information to identify the acquired spectral data to obtain the ingredient information of the food to be detected. The present invention firstly acquires characteristic information of food through an image recognition module and a food material data model, and further, based on the acquired characteristic information, uses a hyperspectral recognition module and a food material component information model to deeply analyze the spectral data of food, thereby achieving high-precision recognition of food type, part, stage information and ingredients. The detection range is wide and the results are accurate, which effectively solves the accuracy problem caused by sample differences in traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a logic block diagram of a food rapid detection device; Figure 2 This is a structural diagram of a food rapid detection device; Figure 3 This is a flowchart of a rapid food testing method; Figure 4 A block diagram of the composition of a computer device.

[0019] In the accompanying drawings: 1-RFID tag, 2-photoelectric switch, 3-transmission drive control module, 4-transmission device drive device, 5-transmission device, 6-light shield, 7-wireless reading and writing module, 8-control module, 9-adjustable light source 1, 10-adjustable light source 2, 11-depth camera, 12-hyperspectral camera, 13-adjustable light source 3, 14-adjustable light source 4, 15-tray, 16-food to be tested. DETAILED DESCRIPTION

[0020] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, 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 embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] See also Figure 1 This embodiment provides a food rapid detection device, including: An image recognition module, a hyperspectral recognition module, a working cavity, a power transmission module, an information matching module and a main control module; the power transmission module is used to transmit the food to be detected to the detection position in the working cavity; the image recognition module and the hyperspectral recognition module are used to obtain the image and spectral data of the food to be detected at the detection position respectively; the information matching module is used to store the physical and chemical detection data of the food and the synchronous detection results; the main control module is used to issue instructions to drive each module to complete the corresponding operation; it is also used to call the food data model to identify the acquired image data to obtain the type, part and stage information of the food to be detected, and it is also used to call the food ingredient information model that matches the type, part and stage information to identify the acquired spectral data to obtain the ingredient information of the food to be detected; it is also used to generate the detection result according to the ingredient information; Among them, the food data model is a neural network model trained based on the image features of different types of food at different stages in different parts; the food ingredient information model is a neural network model trained based on the food spectral data and corresponding physical and chemical test data.

[0022] It should be noted that the image recognition module uses a camera or other imaging device to capture the image information of the food to be tested. These image data are then used to analyze the appearance characteristics of the food, such as shape, color, surface condition, etc., to provide a basis for the preliminary identification and classification of the food.

[0023] The hyperspectral recognition module collects spectral data of food through hyperspectral imaging technology. Hyperspectral imaging can capture the absorption or reflection spectra of food at different wavelengths. These spectral features are closely related to the internal components of food, such as moisture content, fat ratio, nutritional components, etc., and are the key to in-depth analysis of food chemical composition.

[0024] The working chamber provides a stable testing environment for food, ensuring the accuracy of image and spectral data acquisition. The power transmission module is responsible for automatically transporting food samples from the production line or other input end to the designated detection position in the working chamber, realizing a continuous and efficient automated detection process. The information matching module collects and processes basic information of food (such as variety, source, etc.) to provide a basis for subsequent model matching. As the command center of the entire system, the main control module is responsible for coordinating the work of each module, sending instructions to control power transmission, starting the collection of image and spectral data, and calling the corresponding data model for analysis. Finally, the test results (such as qualified or unqualified) are generated based on the component information obtained by the analysis.

[0025] This embodiment uses a neural network model (deep learning technology) to analyze image and spectral data. The food data model is trained based on the image features of different parts of different types of food at different maturity or growth stages, and can identify the maturity or growth stage of food; while the food ingredient information model uses the spectral data of the food to associate with its known physical and chemical test data, and through machine learning training, it can accurately identify the food ingredients. Specifically, the food data model has multi-dimensional recognition capabilities. First, the type of ingredients, such as raw meat, vegetables, or cooked food; the type of product, poultry (chicken, duck, or goose) or livestock meat (lamb, beef, or pork, which have different color and texture characteristics); if it is livestock meat, which part of the meat is it, pork belly, leg meat, or neck meat (in theory, different meats are suitable for different dishes); and finally the stage (raw meat includes different growth stages, cooked food includes different degrees of maturity, and different lengths of time after being cooked). Therefore, the food data model should have the ability to obtain type, part, and stage information from images.

[0026] The present embodiment provides a rapid food detection device, which firstly acquires characteristic information of food through an image recognition module and a food material data model, and then further, based on the acquired characteristic information, uses a hyperspectral recognition module and a food material component information model to deeply analyze the spectral data of food, thereby achieving high-precision recognition of food type, part, stage information and ingredients. The detection range is wide and the results are accurate, which effectively solves the accuracy problem caused by sample differences in traditional methods.

[0027] In some embodiments, a method for training a food material data model is provided, comprising the following steps: S11: Acquire image data of different parts of different types of food at different stages through an image recognition module and / or an external source.

[0028] It should be noted that this step uses image recognition modules (such as high-definition cameras, scanning devices, etc.) to capture food images from different angles and lighting conditions or obtain food images from external sources (such as the Internet, etc.). This step ensures the richness and comprehensiveness of the data set, providing basic materials for subsequent model training.

[0029] S12: Label the features of the food in the image data in combination with the basic information of the food to form an image training set with multi-dimensional information.

[0030] It should be noted that this step combines basic information such as scientific classification of food, growth cycle records, and processing status to carefully annotate the food features in each collected picture. The annotated data forms a multi-dimensional image training set that not only contains intuitive image features, but also incorporates background knowledge and characteristic information of food, improving the depth and accuracy of model learning.

[0031] S13: Using the image training set to train the selected neural network, obtain different types of food data models for identifying food types, parts and stage information, the stage information includes the stage information of the food and corresponding characteristic information.

[0032] It should be noted that this step selects a suitable neural network architecture (such as convolutional neural network CNN, or other advanced visual models), and inputs the multidimensional image training set obtained in step S12 into the model for training. During the training process, the model gradually optimizes the weight parameters by learning the complex relationship between the food image and its annotated type, part, stage information and characteristic information, so as to achieve the ability to accurately identify the stage and characteristic information of the food. The final model is the "ingredient data model", which can automatically predict key information such as the maturity and processing status of the food based on the input food image.

[0033] In some embodiments, based on the training method of the food data model proposed in the above embodiments, a training method of the food ingredient information model is proposed, including the following process: S21: Obtain spectral data and physical and chemical test results of different parts of different types of food at different stages through a hyperspectral recognition module and / or external sources.

[0034] It should be noted that this step uses a hyperspectral recognition module or external sources to collect spectral data of food at different growth or processing stages, which reflects the changes in the internal chemical composition of the food. At the same time, physical and chemical tests are performed to obtain specific values ​​such as moisture content, fat ratio, and sugar concentration.

[0035] S21: The characteristic information, spectral data and physical and chemical test results of food at different stages form a training set.

[0036] It should be noted that this step combines hyperspectral data with physical and chemical test results, and forms a comprehensive training set containing high-dimensional features corresponding to different growth stages or processing states of food. This training set not only contains direct spectral features, but also incorporates the physical and chemical properties of food, providing more comprehensive and in-depth learning materials for deep learning models.

[0037] S21: Using the training set to train the selected neural network, to obtain food ingredient information models for identifying food ingredients at different stages.

[0038] It should be noted that this step selects a neural network architecture suitable for processing high-dimensional continuous data (such as a deep neural network DNN, a recurrent neural network RNN ​​or a hybrid model), and inputs the above comprehensive training set into the model for training. The goal of model learning is to identify the complex relationship between spectral data and physical and chemical indicators and food ingredients, so that when receiving spectral information of unknown food, it can accurately predict the composition of the food.

[0039] In some embodiments, the device is further designed with an adjustable light source module; the adjustable light source module is used to provide illumination conditions for detection for the image recognition module and the hyperspectral recognition module in the working cavity, and the illumination conditions for detection are set according to the following steps: S31: Recording illumination condition parameter values ​​of the image and spectral data used for training the food data model and the food component information model respectively.

[0040] It should be noted that this step collects a large amount of image and spectral data to train the food data model and food ingredient information model. In this process, for each batch of data, the lighting condition parameters at that time, such as light intensity, spectral distribution, etc., will be recorded in detail. These parameters are crucial for the subsequent establishment of the lighting condition model.

[0041] S32: Calculate the contribution of different source data in training the corresponding model, and generate the reference lighting condition of the corresponding model according to the lighting condition parameter value of the source data with the highest contribution.

[0042] It should be noted that this step evaluates the importance or "contribution" of different data sources in the model training process. This means that if some data is more conducive to feature extraction due to its lighting conditions, resulting in better model learning effects, then the lighting conditions of these data will be considered to have a high contribution. The system will select the lighting condition parameter value corresponding to the data with the highest contribution as the preliminary benchmark lighting condition. This step ensures that the model training is based on the optimal lighting environment in the early stage. In specific implementation, the contribution can also be determined based on the proportion of data from different sources when training the model.

[0043] S33: During the model training process, the image recognition module and the hyperspectral recognition module and / or the image and spectral data acquired from external sources are used to continuously update the contribution and the reference lighting conditions, and the updated reference lighting conditions are used as the lighting conditions for the corresponding model detection.

[0044] It should be noted that during the continuous model training process, the system does not statically use fixed lighting conditions, but dynamically utilizes newly acquired image and spectral data, as well as possible external data sources, to continuously recalculate data contributions and adjust the baseline lighting conditions accordingly. This means that as the model learns new data, its preference for lighting conditions may also change, so the lighting conditions will be optimized to achieve higher recognition accuracy. This iterative process ensures that the lighting conditions always match the model's optimal recognition state.

[0045] By covering training under a variety of lighting conditions, this embodiment enables the model to better generalize to unseen lighting environments, thereby improving robustness in practical applications.

[0046] In some embodiments, the information matching module of the device includes: a tag and a wireless reading and writing device; The tag is set at the food to be tested, and the tag stores the basic information, physical and chemical test data and test results of the food to be tested; the wireless reading and writing device is set in the working cavity, which is used to read the basic information and physical and chemical test data of the food to be tested from the tag and send it to the main control module; it is also used to synchronize the test results to the tag.

[0047] In this embodiment, the information matching module provides an efficient and accurate data collection and processing mechanism for the food rapid detection device by integrating wireless communication technology and smart tags, thereby ensuring the accuracy of food information and the integrity of detection data.

[0048] In some embodiments, the main control module is also used to compare the ingredient information identified by the food ingredient information model with the physical and chemical test data of the corresponding food, obtain abnormal data and issue an alarm signal.

[0049] In this embodiment, the main control module compares the ingredient information identified by the food ingredient information model (obtained through the hyperspectral recognition module and corresponding data analysis) with the physical and chemical test data of the food in detail. These physical and chemical test data are stored in the label in advance and read through the wireless reading and writing device. Through comparative analysis, the main control module can identify the differences between the two, especially those ingredient deviations that exceed the normal range or do not meet the food safety standards. This deviation may be due to abnormal changes in food ingredients, such as excessive additives, excessive pollutants, and substandard nutrients, which are all risk points for food safety. Once a significant inconsistency or abnormal value is detected between the ingredient information and the physical and chemical data, the main control module immediately triggers the alarm mechanism and sends an alarm signal. The alarm signal can be an audible and visual alarm, a system prompt, and an automatic email or text message notification to relevant personnel to ensure that abnormal situations can quickly attract attention and take countermeasures.

[0050] See also Figure 2 , Figure 2 This is a schematic diagram of a food rapid detection device proposed in combination with the above-mentioned embodiment. The present invention is further introduced below in combination with the structure of the device.

[0051] like Figure 2 As shown, the device includes a bracket, a working cavity, an image recognition module, a hyperspectral recognition module, a power transmission module, a light source module, an electric control module, a wireless reading and writing module, etc.

[0052] The working cavity is mounted above the bracket, and the bracket is provided with a conveying device 5, which is controlled by a conveying device driving device 4. Both ends of the working cavity are light shielding covers 6 for shielding natural light to prevent the natural light from affecting the work inside the cavity.

[0053] The main working component in the working chamber is a depth camera 11 (RGB-D camera, such as Intel's realsense435D). In addition to image capture, the depth camera can also perform depth recognition and 3D image drawing, and can identify the size and distance of the target object. Another main component is a hyperspectral camera 12. Generally, the hyperspectral camera 12 emits a spectrum of a specific frequency, and collects and identifies the reflected light of the spectrum from the target object, thereby judging the special component information of the target object based on the frequency of the absorbed reflected light.

[0054] To achieve a better shooting effect, the cavity has an adjustable light source 1234 (corresponding to Figure 2 In the figure, the four light sources are all adjustable to ensure that the light environment in the working cavity is always in a stable state, so that the depth camera and the hyperspectral camera can work. The four light sources can be different types of light sources, such as light source 2 and light source 3 are LED lights, and light source 1 and light source 4 are halogen lamps or shadowless lamps. When performing different shooting requirements, different light sources are automatically matched and turned on. For example, when the depth camera 11 is working, light sources 2 and 3 are turned on, and 1 and 4 are turned off; when the hyperspectral camera 12 is working, 1 and 4 are turned on, and 2 and 3 are turned off.

[0055] One form of the conveying device is a conveyor belt (or roller conveyor, etc.), which is controlled by a driving device. One form of the driving device is a stepper motor (or servo motor) driving a connecting rod mechanism (or conveyor belt) and then driving the conveying device to move. The entire movement is controlled by the transmission drive control module 3 of the driving module. The control module of the driving module is connected to the overall control module placed on one side of the working cavity through a communication method (such as upper and lower computer communication, Bluetooth, Zigbee, infrared, etc.), and the overall control module performs overall control. The conveying device can realize operations such as running direction, running speed, start and stop.

[0056] The tray has an electronic tag and an electronic storage device (which may be an RFID tag 1, a Bluetooth module, a zigbee module, etc.), and the tray 15 is used to carry the food to be tested. There is a sensor for positioning the tray 15 inside the working cavity, one form of which is a photoelectric switch 2, which transmits the photoelectric signal to the control module 8. The connection between the photoelectric switch 2 and the control module 8 can be wireless or wired. In this embodiment, after the object to be tested runs to the position of the photoelectric switch 2, the photoelectric switch 2 transmits the signal to the control module 8, and the control module 8 can control the shooting module to shoot. In one case, the control module 8 can control the conveying device to stop running for a period of time (such as 0.5s) to allow the shooting device to shoot. In another case, the control module 8 can control the running speed of the conveying device (such as from 0.2m / s to 0.1m / s) The control module 8 has an image processing module (such as an image processing graphics card, NVIDIA's image processing center NVIDIAJetson AGX Orin), which can perform processing based on the image recognition algorithm program carried by the control module 8, and upload the processing results to the cloud platform, or save them locally, or store them on a pallet, or store them on a food label.

[0057] In the device, a tray has an RFID tag 1 with a unique code, which is uniquely matched to the tray 15 when the food 16 to be tested is placed on the tray 15. When the tray 15 enters the working chamber, the wireless reader / writer module 7 of the device identifies the unique code of the object to be tested, and both RGB-D shooting and hyperspectral shooting are for this unique object to be tested. The spectral image and the RGB-D image can be matched.

[0058] Identification and judgment are performed based on the captured image, and the identification result is written into the RFID tag 1 of the product or pallet. For example, when the pallet 15 runs out of the working chamber, the "qualified / unqualified" information can be written into the RFID tag 1 of the pallet. This facilitates subsequent processing and operation.

[0059] In addition, the food data model integrated in the control module 8 of the device is constructed using the multi-target directional detection model YOLO-OBB. The multi-target directional detection model YOLO-OBB is a relatively mature model in the field of image recognition, which can accurately identify and locate rod-shaped crops in the image. In order to improve the efficiency of constructing image data sets, a labeling software called OBBLabel is specially developed for directional detection tasks, which supports fast and intuitive labeling work. Using this software, the present invention constructs a large-scale label data set of water chestnut seedlings, cucumbers and carrots for training deep learning models. In practice, multiple randomly oriented crops are loaded onto a conveyor belt, and the camera above captures images of designated areas. The directional detection model YOLO-OBB proposed in the present invention takes an RGB image as input and outputs a directional bounding box of all targets in the image. Then, each target is extracted into a separate sub-image and input into the multi-label recognition model YOLO-MLD to determine its level and posture. Through a calibrated camera, the pixel information of the original image can be converted into motion instructions controlled by the robot actuator. In the framework proposed in the present invention, the visual algorithm is loosely coupled with the hardware, reducing the difficulty of adapting the software and hardware system. The sorter requires only basic hardware components such as a universal conveyor belt, a camera, and a programmable sorting operator. By processing multiple targets simultaneously rather than individually, the framework reduces possible crop damage, improves efficiency, and is applicable to various types of pole crops.

[0060] Similarly, this method can be used for data collection during the food model building process. Through the RGB-D camera of this device, detailed images and color information of the entire target object can be recorded, as well as size information. Based on the deep learning model and the corresponding interactive software of the device, the staff can annotate the images.

[0061] The food ingredient information model can be combined with the existing application of hyperspectral technology in food analysis and established based on the capabilities provided by this device. It can achieve more accurate multi-dimensional data recording of spectral information and tested items and more accurate prediction results.

[0062] Specifically, in combination with the equipment structure provided by the above design example and the guidance of the embodiment of the food model training method, the specific process of model establishment includes: S1, the tray enters the working chamber; S2, the equipment identifies the pallet code and obtains basic information of the ingredients; S3, the photoelectric switch detects that the tray has reached the position; S4, RGB-D camera takes pictures of food and uploads the pictures; S5, the hyperspectral camera captures the spectral information and uploads the results; S6, manually mark food information, including food maturity, food part information, food processing information and other dimensions. And obtain the time period of the food through RFID or manual marking (such as fresh meat, slaughter time period (1 hour later, 1 hour after thawing, 2 hours later); or after the processing of braised goose (1 hour later, 2 hours later)).

[0063] S7, sending the corresponding food ingredients to physical and chemical testing, obtaining the test results, and recording the results in the dedicated identification code corresponding to the ingredients.

[0064] In this way, the complete information of this food is recorded, including image information features, hyperspectral features, and physical and chemical detection features.

[0065] S8, repeat the above process to accumulate a certain amount of samples (such as 1000).

[0066] S9, using machine learning algorithms (such as convolutional neural networks, etc.) to obtain the corresponding relationship between the spectral characteristics of the food and the physical and chemical test results. Establish a food data model to obtain the relationship between the image characteristics of the food and the time period of the food. Establish a food ingredient information model to obtain a detection prediction model for a specific time period of a certain food corresponding to the food spectral characteristics.

[0067] S10, using this method, different food types (and corresponding time periods) and different material components (such as nutrients such as protein) can be obtained.

[0068] At the same time, the spectral information of different foods at different stages may overlap. For example, the spectral feature of braised goose at stage 1 may be similar to a spectral feature of roast chicken at stage 2. Therefore, it is important to accurately record its complete information.

[0069] In the implementation of the above method, multiple food models can be established: Take the stewed goose model as an example: Braised goose model Image feature model Spectral Moisture Composition Model Spectrum preservative model Fresh out of the pan Image0 Water0 Fang0 1 hour before serving Image1 Water1 Fang1 2 hours after cooking Image2 Water2 Fang2 3 hours after cooking Image3 Water3 Fang3 In other words, through the continuous operation of this device, a series of mathematical models can be established for a food or ingredient; at the same time, a series of models for a series of products or ingredients can be established. For example, the corresponding model of braised chicken can also be established: Braised Chicken Model Image feature model Spectral Moisture Composition Model Spectrum preservative model Fresh out of the pan Image0 Water0 Fang0 1 hour before serving Image1 Water1 Fang1 2 hours after cooking Image2 Water2 Fang2 3 hours after cooking Image3 Water3 Fang3 The process of using the present invention to detect food ingredient information is as follows: S1, the tray enters the working chamber; S2, the equipment identifies the pallet code and obtains basic information of the ingredients; S3, the photoelectric switch detects that the tray has reached the position; S4, RGB-D camera takes pictures of food and uploads the pictures; S5, the hyperspectral camera captures the spectral information and uploads the results; S6 uses RGB-D camera to identify images taken by the camera and determine the type of product, such as braised goose or roasted chicken.

[0070] S7, if it is identified as braised goose, it will further compare the image feature model to determine the corresponding stage of the braised goose. For example, if the image feature of this product is consistent with the Image2 model of braised goose through identification and comparison, the accurate information of the braised goose can be determined.

[0071] S8, then retrieves the model of the precise stage that matches it based on the precise information of the braised goose.

[0072] S9, as needed, use the water2 model of the braised goose to obtain its water composition, and use the fang2 model of the braised goose to obtain the ingredient information of this preservative.

[0073] S10, using this method, accurate predictions of its various indicators can be obtained.

[0074] S11, compare with the standard, if any indicator exceeds the standard or does not meet the requirements, prompt.

[0075] The present invention can classify the objects to be tested more accurately based on the information recorded by RGB and RFID in advance, and then start a more matching model to achieve more accurate detection. At the same time, the RGB-D image is matched with the hyperspectral image, and the instability or inaccuracy of the hyperspectral data can be compensated based on the RGB-D image to achieve more accurate component information prediction.

[0076] See also Figure 3 In one embodiment of the present invention, a rapid food detection method is also provided, comprising the following steps: S41: conveying the food to be tested to a testing position in the working chamber; S42: Obtain basic information, image and spectrum data of the food to be tested at the testing position respectively; S43: using the food data model matching the basic information to identify the acquired image data, and obtain the type, part and stage information of the food to be detected; S44: using a food ingredient information model that matches the type, part, and stage information to identify the acquired spectral data, and obtain ingredient information of the food to be tested; Among them, the food data model is a neural network model trained based on the image features of different types of food at different stages in different parts; the food ingredient information model is a neural network model trained based on the food spectral data and corresponding physical and chemical test data.

[0077] In some embodiments, the training process of the food data model and the food ingredient information model includes: S51: Obtain images and spectral data of different parts of different types of food at different stages, as well as basic information and physical and chemical test results of the food; S52: labeling the features of the food in the image data in combination with the basic information of the food to form an image training set with multi-dimensional information; S53: training the selected neural network using the image training set to obtain a food material data model for identifying food type, part, and stage information, wherein the stage information includes the stage of the food and corresponding characteristic information; S54: forming a training set from characteristic information, spectral data and physical and chemical test results of food at different stages; S55: Using the training set to train the selected neural network, to obtain food ingredient information models for identifying food ingredients at different stages.

[0078] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0079] Reference Figure 4 An embodiment of the present invention further provides a computer device, comprising: a memory and a processor and a computer program stored in the memory. When the computer program is executed on the processor, a rapid food detection method as described in any one of the above methods is implemented.

[0080] The computer device may be a desktop computer, a notebook, a PDA, a cloud server or other computing device. The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 4 It is only an example of a computer device and does not constitute a limitation of the computer device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0081] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0082] In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the memory may include both an internal storage unit and an external storage device of the computer device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory may also be used to temporarily store data that has been output or is to be output.

[0083] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the rapid food detection method as described in any one of the above methods is implemented.

[0084] In this embodiment, if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, USB flash drive, mobile hard disk, disk or optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0085] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0086] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0087] In the embodiments disclosed in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0088] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A food rapid detection device, characterized in that: include: Image recognition module, hyperspectral recognition module, working cavity, power transmission module, information matching module and main control module; The power transmission module is used to transmit the food to be tested to the testing position in the working cavity; The image recognition module and the hyperspectral recognition module are used to obtain the image and spectral data of the food to be detected at the detection position respectively; The information matching module is used to store physical and chemical testing data of food and synchronous testing results; The main control module is used to issue instructions to drive each module to complete corresponding operations; it is also used to call the food data model to identify the acquired image data to obtain the type, part and stage information of the food to be detected, and it is also used to call the food component information model matching the type, part and stage information to identify the acquired spectral data to obtain the component information of the food to be detected; it is also used to generate the detection result according to the component information; Among them, the food data model is a neural network model trained based on the image features of different types of food at different stages in different parts; the food ingredient information model is a neural network model trained based on the spectral data of food at different stages and the corresponding physical and chemical detection data.

2. The food rapid detection device according to claim 1, characterized in that: The training process of the food material data model includes: Acquire image data of different parts of different types of food at different stages through the image recognition module and / or external sources; Annotating the features of the food in the image data in combination with the basic information of the food to form an image training set with multi-dimensional information; The selected neural network is trained using the image training set to obtain the food data model for identifying food type, part and stage information, wherein the stage information includes the stage of the food and corresponding characteristic information.

3. The food rapid detection device according to claim 2, characterized in that: The training process of the food ingredient information model includes: Acquire the spectral data of different parts of different types of food at different stages and the physicochemical test results through the hyperspectral recognition module and / or external sources; The characteristic information of the food at different stages, the spectral data and the physical and chemical test results form a training set; The selected neural network is trained using the training set to obtain the food ingredient information model for identifying food ingredients at different stages.

4. The food rapid detection device according to claim 1, characterized in that: It also includes an adjustable light source module, which is used to provide the image recognition module and the hyperspectral recognition module with light conditions for detection in the working cavity. The light conditions for detection are set according to the following steps: Respectively recording illumination condition parameter values ​​of the image and spectral data used for training the food data model and the food ingredient information model; Calculate the contribution of different source data in training the corresponding model, and generate the benchmark lighting conditions of the corresponding model based on the lighting condition parameter value of the source data with the highest contribution; During the model training process, the contribution degree and the reference lighting condition are continuously updated using the image and spectral data acquired by the image recognition module and the hyperspectral recognition module and / or external sources, and the updated reference lighting condition is used as the lighting condition for corresponding model detection.

5. The food rapid detection device according to claim 1, characterized in that: The information matching module includes: a tag and a wireless reading and writing device; The label is arranged at the food to be tested, and the label stores the test result and the physical and chemical test data of the food to be tested; The wireless reading and writing device is arranged in the working cavity, and is used to read the physical and chemical test data of the food to be tested from the label and send it to the main control module; and is also used to synchronize the test result to the label.

6. The food rapid detection device according to claim 5, characterized in that: The main control module is also used to compare the ingredient information identified by the food ingredient information model with the physical and chemical test data of the corresponding food, obtain abnormal data and issue an alarm signal.

7. A method for rapid food detection, characterized in that: The food rapid detection device as claimed in any one of claims 1 to 6 comprises the following steps: Conveying the food to be tested to the testing position in the working chamber; Respectively acquiring the image and spectral data of the food to be tested at the testing position; Using the food data model to identify the acquired image data, and obtain the type, part and stage information of the food to be detected; Selecting a food ingredient information model that matches the type, part, and stage information to identify the acquired spectral data, and obtaining ingredient information of the food to be tested; Among them, the food data model is a neural network model trained based on the image features of different types of food at different stages in different parts; the food ingredient information model is a neural network model trained based on the spectral data of the food and the corresponding physical and chemical detection data.

8. The rapid food detection method according to claim 7, characterized in that: The training process of the food material data model and the food material component information model includes: Obtain images and spectral data of different parts of different types of food at different stages, as well as basic information and physical and chemical test results of the food; Annotating the features of the food in the image data in combination with the basic information of the food to form an image training set with multi-dimensional information; Using the image training set to train the selected neural network, to obtain the food data model for identifying food type, part and stage information, wherein the stage information includes the stage of the food and corresponding characteristic information; The characteristic information of the food at different stages, the spectral data and the physical and chemical test results form a training set; The selected neural network is trained using the training set to obtain the food ingredient information model for identifying food ingredients at different stages.

9. A computer device, characterized in that: The device comprises a processor and a memory: The memory is used to store a computer program and send instructions of the computer program to the processor; The processor executes a rapid food detection method as described in claim 7 or 8 according to the instructions of the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method for rapid food detection as claimed in claim 7 or 8 is implemented.

Citation Information

Cited By

  • Wheat flag leaf and wheat ear character intelligent identification method and system based on deep learning

    CN119625464A

  • Intelligent nutrition intake measuring system and method

    CN120064202A

  • Fruit preservative detection method

    CN120253697A

  • Production process parameter management system and method and preparation method of coarse putty powder primer

    CN120996837A

  • Production process parameter management system and method, and preparation method of putty powder coarse base

    CN120996837B