Method, device and system for identifying illegal picking of food

Through computer vision technology, identifying ingredients and human postures in the kitchen of catering stores, and judging the positional relationship between ingredients and human targets, solving the problem of difficult to identify and manage illegal picking of ingredients in the existing technology, and achieving efficient food safety management.

CN119399708BActive Publication Date: 2025-04-11HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411998446.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-11
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively identify and manage illegal picking of ingredients in the kitchen of catering stores, resulting in food safety risks and high management costs and difficulty.

Method used

Through computer vision technology, images of the kitchen area are obtained, food targets and human targets with preset postures are identified, the positional relationship between the food targets and the human targets are determined, and whether there is any illegal picking of ingredients.

Benefits of technology

It realizes automatic identification of illegal picking of ingredients, reduces management costs and difficulties, and improves the efficiency of food safety management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399708B_ABST
    Figure CN119399708B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer vision technology, and in particular to a method, device, and system for identifying illegal food picking, the method comprising: acquiring an image of a first area; determining whether the image contains a food target and a human target in a preset posture, wherein the preset posture includes bending over and / or squatting; determining the positional relationship between the food target and the human target in the image; and determining that illegal food picking exists when it is identified that the image contains a food target and a human target in a preset posture, and when it is identified that the food target and the human target have an overlapping area. The method, device, and system for identifying illegal food picking provided by the present application solve the problem of difficult management of illegal food picking, reduce management costs and difficulty, and improve the efficiency of identifying illegal food picking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a method, device and system for identifying food picked up in violation of regulations. Background Art

[0002] In the back kitchen of a restaurant, there are strict food hygiene requirements for kitchen staff, one of which is that they are not allowed to pick up food that has fallen on the ground and re-cook it, in order to reduce food safety risks and protect the health of customers. Currently, picking up materials on the ground can only be avoided through corporate management methods, which include formulating and implementing strict food safety regulations, conducting employee training, implementing supervision and inspection measures, and establishing a food safety culture. However, currently, picking up materials on the ground can only be avoided through corporate management methods, which increases costs, increases management difficulty, and has low efficiency. Summary of the invention

[0003] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for identifying illegal food picking up in response to the above technical problems, which can solve the problem of difficult management of illegal food picking up, reduce management costs and difficulty, and improve the efficiency of identifying illegal food picking up.

[0004] In a first aspect, the present application provides a method for identifying illegally picked up food, the method comprising:

[0005] acquiring an image of a first region;

[0006] Determining whether the image contains a food target and a human target in a preset posture, wherein the preset posture includes bending over and / or squatting;

[0007] Determining a positional relationship between the food target and the human target in the image;

[0008] When it is recognized that the image contains a food target and a human target in a preset posture, and when it is recognized that the food target and the human target have an overlapping area, it is determined that there is an illegal behavior of picking up food.

[0009] In one embodiment, the method for identifying the human target bending and / or squatting includes: obtaining the length-to-width ratio of the recognition frame of the human target in the image; determining the posture of the human target based on the length-to-width ratio of the recognition frame of the human target in the image and the matching relationship between the length-to-width ratio and the human posture.

[0010] In one embodiment, based on the length-to-width ratio of the recognition frame of the human target in the image and the matching relationship between the length-to-width ratio and the human posture, determining the posture of the human target includes: when the length-to-width ratio of the recognition frame of the human target in the image falls within a first ratio range, determining that the human target in the image includes a bending and / or squatting posture.

[0011] In one embodiment, the method further includes: determining whether the food target in the image is located within a preset range of the human target when no overlapping area between the food target and the human target is identified; and determining that there is an illegal act of picking up food when it is identified that the image contains a food target and a human target in a preset posture, and the food target is located within the preset range of the human target.

[0012] In one embodiment, when no overlapping area between the food target and the human target is identified, determining whether the food target in the image is located within a preset range of the human target includes:

[0013] Enlarging the identification frame of the human target and / or the food target according to a custom ratio, if the enlarged identification frame intersects or includes the other identification frame, then determining that the food target is within the preset range of the human target; or

[0014] Obtaining the shortest distance between the identification frame of the human target and the identification frame of the food target, and determining whether the shortest distance is less than or equal to a preset multiple of the width of the human target identification frame, and if so, determining that the food target is within the preset range of the human target; or,

[0015] A circle is determined with the center of the identification frame of the human target as the center and the farthest coordinate point of the identification frame of the human target as the radius. If the circle intersects with the identification frame of the food target, it is determined that the food target is within the preset range of the human target.

[0016] In one embodiment, the identifying that the food target and the human target have an overlapping area includes:

[0017] Determine whether the identification frame of the food target is contained in the identification frame of the human target, and if so, determine that there is an overlapping area between the food target and the human target in the image; or,

[0018] If the identification frame of the food target is not included in the identification frame of the human target, determine whether the identification frame of the food target intersects with the identification frame of the human target, and if so, determine the overlapping area of ​​the food target and the human target in the image; or

[0019] Determine whether the overlapping area between the identification frame of the food target and the identification frame of the human target is greater than or equal to a preset parameter, and if so, determine that the food target and the human target have an overlapping area; wherein the preset parameter includes at least one of a preset area, a preset screen ratio, a preset proportion of the overlapping area to the food target identification frame, and a preset proportion of the overlapping area to the human target identification frame.

[0020] In one embodiment, the method further comprises:

[0021] Determine the positional relationship between the center of gravity of the food target and the center of gravity of the human target in the image; wherein the center of gravity of the human target is determined based on the center of the human target recognition frame, and the center of gravity of the food target is determined based on the center of the food target recognition frame;

[0022] The step of determining that there is illegal food picking behavior when it is recognized that the image includes a food target and a human target in a preset posture, and when it is recognized that the food target and the human target have an overlapping area, includes:

[0023] When it is recognized that the image contains a food target and a human target in a preset posture, it is recognized that the food target and the human target have an overlapping area, and the center of gravity of the food target is located below the center of gravity of the human target, it is determined that there is an illegal behavior of picking up food.

[0024] In one embodiment, the method further includes: obtaining an area in the first area where the false alarm frequency of alarm instructions is greater than a preset value within a preset time period as a second area; and automatically adjusting the first area based on the second area.

[0025] In one embodiment, an area in the first area where the frequency of false alarms of alarm instructions is greater than a preset value is obtained as the second area, including: obtaining multiple feedback instructions from users, the feedback instructions including instructions for confirming violations, confirming no violations, or not processing; based on the number or proportion of the no-violation instructions and the no-processing instructions, and the location coordinates of the illegal food picking behavior in the first area, determining an area in the first area where the frequency of false alarms of alarm instructions is greater than a preset value as the second area.

[0026] In a second aspect, the present application further provides a device for identifying illegal picking of food, the device comprising:

[0027] An acquisition module, used for acquiring an image of the first area;

[0028] a recognition module, used to determine whether the image contains a food target and a human target in a preset posture, wherein the preset posture includes bending and / or squatting; the recognition module is also used to determine the positional relationship between the food target and the human target in the image;

[0029] The output module determines that there is an illegal act of picking up food when it is recognized that the image contains a food target and a human target in a preset posture, and when it is recognized that the food target and the human target have an overlapping area.

[0030] In a third aspect, the present application also provides a system for identifying illegally picked up food, the system comprising:

[0031] An image acquisition device, used to acquire an image of the first area;

[0032] The server is used to determine whether the image contains a food target and a human target in a preset posture, wherein the preset posture includes bending over and / or squatting; the recognition module is also used to determine the positional relationship between the food target and the human target in the image; when it is recognized that the image contains a food target and a human target in a preset posture, and it is recognized that the food target and the human target have an overlapping area, it is determined that there is an illegal behavior of picking up food.

[0033] In a fourth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods in the first aspect are implemented.

[0034] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods in the first aspect are implemented.

[0035] The above-mentioned method, device, system, computer equipment and computer-readable storage medium for identifying illegal food picking up, obtain an image of a first area; determine whether the image contains a food target and a human target in a preset posture, wherein the preset posture includes bending over and / or squatting; determine the positional relationship between the food target and the human target in the image; further, when it is identified that the image contains a food target and a human target in a preset posture, and it is identified that the food target and the human target have an overlapping area, it is determined that there is illegal food picking up, thereby solving the problem of difficult management of illegal food picking up, reducing management costs and management difficulties, and improving the efficiency of identifying illegal food picking up. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1A schematic diagram of a method for identifying illegal picking up of food in one embodiment;

[0037] Figure 2 is a schematic diagram of a recognition frame of a human target in one embodiment;

[0038] Figure 3 A schematic diagram showing an embodiment in which an overlapping area between a food target and a human target in a preset posture is not recognized;

[0039] Figure 4 A schematic diagram of enlarging the recognition frames of a human target and a food target according to a custom ratio in one embodiment;

[0040] Figure 5 A schematic diagram of the shortest distance between a recognition frame of a human target and a recognition frame of a food target in one embodiment;

[0041] Figure 6 A schematic diagram of the intersection of a circle determined based on a human target recognition frame and a recognition frame of a food target in one embodiment;

[0042] Figure 7 A schematic diagram showing that a recognition frame of a human target includes a recognition frame of a food target in one embodiment;

[0043] Figure 8 A schematic diagram of the intersection of a recognition frame of a human target and a recognition frame of a food target in one embodiment;

[0044] Fig. 9 A schematic diagram of a process for identifying illegal picking of food in one embodiment;

[0045] Fig.10 A structural block diagram of a device for identifying illegal picking of food in one embodiment;

[0046] Fig.11 A structural block diagram of a system for identifying illegal picking of food in one embodiment;

[0047] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] In the back kitchen of a restaurant, there are strict food hygiene requirements for kitchen staff, one of which is that they are not allowed to pick up food that has fallen on the ground and re-cook it, in order to reduce food safety risks and protect the health of customers. Currently, picking up materials on the ground can only be avoided through corporate management methods, which include formulating and implementing strict food safety regulations, conducting employee training, implementing supervision and inspection measures, and establishing a food safety culture. However, currently picking up materials on the ground is avoided through corporate management methods, which has the problems of increased costs, increased management difficulty, and low efficiency.

[0050] Based on this, an embodiment of the present application provides a method for identifying illegal picking of food ingredients, which is applied in the back kitchen scene of a catering store to automatically identify whether there is any illegal picking of food ingredients.

[0051] The following describes in detail the implementation of the method for identifying illegally picked up food according to an embodiment of the present application.

[0052] In one embodiment, Figure 1 As shown, the method for identifying illegally picked up food specifically includes the following steps:

[0053] Step S101: Acquire an image of a first area.

[0054] The first area indicates an area where illegal picking up of food materials may occur, for example, the first area includes a floor area of ​​a back kitchen. The first area may be a continuous area or a dispersed area of ​​the back kitchen, or in other words, the back kitchen includes at least one first area.

[0055] Exemplarily, an image of the first area is collected by a camera or a monitoring device. The image may be captured in real time, or may be a frame extracted from a video recording, or may be a picture captured at intervals of a unit time.

[0056] The image is then processed using image recognition technology to subsequently identify illegal food picking behavior in the first area.

[0057] Step S102: determining whether the image contains food targets and human targets in preset postures, wherein the preset postures include bending over and / or squatting.

[0058] Ingredients refer to the raw materials needed to make food, such as cucumbers, cabbage, beef, longan, etc. Ingredients can be divided into different categories according to different characteristics, such as vegetarian ingredients, meat ingredients, or fresh ingredients, frozen ingredients. Ingredient targets refer to ingredients that fall into the first area. For example, in the kitchen, ingredient targets refer to ingredients that fall on the ground in the kitchen. Computer vision algorithms or deep learning algorithms can be used to detect ingredient targets contained in the image, so as to analyze whether the ingredient targets have been picked up illegally.

[0059] Among them, human targets refer to people who may appear in the first area when handling ingredients or cooking ingredients. Human postures include standing upright, bending over, squatting, etc., and preset postures include bending over and / or squatting to determine whether the image contains human targets that may violate the rules. For example, in the kitchen, when the kitchen staff bends over or squats, they may pick up ingredients that have fallen on the ground. The Pose Estimation model based on deep learning can be used to identify human targets in preset postures contained in the image to preliminarily determine the human targets that may violate the rules in the kitchen.

[0060] Step S103: determining the positional relationship between the food target and the human target in the image.

[0061] Among them, a rectangular coordinate system can be established to represent the food targets and human targets in the image in the coordinate system to determine whether there is an intersection or overlap between the positions of the food targets and the human targets; the relative position between the food targets and the human targets in the image can also be judged to determine the positional relationship between the two targets.

[0062] It should be noted that, in this embodiment, there is no restriction on the order in which step S102 and step S103 are executed. Exemplarily, step S102 is executed first, and then step S103 is executed: first determine whether the image contains food targets and human targets in preset postures, and then determine the positional relationship between the food targets in the image and the human targets in preset postures. For example, when there are many food targets and / or human targets in the image, you can first screen and then calculate, that is, first screen the human targets in preset postures in the image, and then calculate the positional relationship between the food targets and the human targets in preset postures, so as to improve the operation efficiency of the algorithm. Exemplarily, step S103 is executed first, and then step S102 is executed: first determine the positional relationship between the food targets and the human targets in the image, and then determine whether the image contains human targets in preset postures, and determine the positional relationship between the human targets in preset postures and the food targets. For example, when there are not many food targets and human targets in the image, you can also calculate and then screen, that is, first calculate the positional relationship between the food targets and the human targets, and then screen out the positional relationship between the human targets in preset postures and the food targets, so as to improve the flexibility of the algorithm.

[0063] Step S104: when it is recognized that the image contains a food target and a human target in a preset posture, and it is recognized that the food target and the human target have an overlapping area, it is determined that there is an illegal behavior of picking up food.

[0064] Specifically, when it is recognized that the image contains a food target and a human target in a preset posture, that is, in the current image of the first area obtained, there are food targets that have fallen on the ground, and there are human targets that are bent and / or squatting. It is recognized that there is an overlapping area between the food target and the human target, for example, the hand or body of the human target contacts or intersects with the boundary box of the food target, resulting in an overlapping area. It can be seen from this that if there is a human target picking up the food target, it is determined that there is an illegal act of picking up food, which makes it convenient for management personnel to effectively manage the illegal act of picking up food, and effectively prevent and reduce the occurrence of illegal food picking.

[0065] According to the above description, the method for identifying illegal food picking of this embodiment obtains an image of the first area to determine the area of ​​illegal food picking to be identified; further, determines whether the image contains food targets and human targets in preset postures, wherein the preset postures include bending over and / or squatting; determines the positional relationship between the food targets and the human targets in the image, so as to identify illegal food picking behavior in the first area; further, when it is identified that the image contains food targets and human targets in preset postures, and it is identified that the food targets and the human targets have overlapping areas, it is determined that there is illegal food picking behavior, thereby identifying the illegal food picking behavior in the first area. The method for identifying illegal food picking of this embodiment solves the problem that it is difficult to manage illegal food picking behavior, reduces management costs and management difficulties, and improves the efficiency of identifying illegal food picking behavior.

[0066] In order to improve the recognition accuracy of human targets in preset postures, in one embodiment, a method for identifying a human target bending and / or squatting includes: obtaining the length-to-width ratio of a recognition frame of the human target in an image; determining the posture of the human target based on the length-to-width ratio of the recognition frame of the human target in the image and the matching relationship between the length-to-width ratio and the human posture.

[0067] The recognition frame of the human target is a rectangular frame that completely covers the human target. To obtain the recognition frame of the human target in the image, the human target in the image can be identified by an object detection algorithm, and a corresponding rectangular bounding box is generated as the recognition frame of the human target. Then, the aspect ratio of the recognition frame is calculated, that is, the length of the rectangle divided by the width of the rectangle.

[0068] For example, Figure 2As shown, a plane rectangular coordinate system is established based on the image, and the recognition frame of the human target is represented in the coordinate system. The example in the figure is a rectangular recognition frame of a human target in an upright state. The coordinates of the four corners of the recognition frame are (x1, y1), (x2, y2), (x3, y3), and (x4, y4) respectively. Based on this, the length-to-width ratio of the recognition frame of the human target is equal to (y1-y2) / (x3-x2). Similarly, the food recognition frame of the food target can also be represented in a plane rectangular coordinate system. The coordinates of the four corners of the recognition frame of the food target are (x5, y5), (x6, y6), (x7, y7), and (x8, y8) respectively, so as to facilitate the subsequent determination of the positional relationship between the two targets based on the coordinates of the recognition frame of the human target and the recognition frame of the food target.

[0069] Regarding the matching relationship between the length-to-width ratio and the human body posture, the matching relationship between the length-to-width ratio and the human body posture (e.g., standing upright, bending over, squatting) can be established through experiments or predefined standards. For example, if the length-to-width ratio of the recognition frame of the human target is lower than a certain threshold, it indicates that the human body is in a bending or squatting state, and if the length-to-width ratio of the recognition frame of the human target is higher than a certain threshold, it indicates that the human body is in an upright state.

[0070] In this embodiment, a rectangular frame that completely covers the human target is used as the recognition frame of the human target, and the aspect ratio of the recognition frame of the human target is obtained. Further, based on the matching relationship between the aspect ratio and the human posture, the posture of the human target is determined to identify whether the human target is bending over and / or squatting, thereby improving the recognition accuracy of the human target in the preset posture.

[0071] Furthermore, in one embodiment, based on the aspect ratio of the recognition frame of the human target in the image and the matching relationship between the aspect ratio and the human posture, determining the posture of the human target includes: when the aspect ratio of the recognition frame of the human target in the image falls within a first ratio range, determining that the human target in the image includes a bending and / or squatting posture.

[0072] Among them, the human body postures of the human target include upright, stooped, and squatted, and the height of the human body target in the rectangular recognition frame is defined as the length, and the width of the human body target in the rectangular recognition frame is defined as the width. The first ratio range can pre-define different length-to-width ratio ranges corresponding to different postures based on experimental data or empirical values. For example, a smaller length-to-width ratio may indicate that the human target is in a stooped and / or squatting state. Specifically, the first ratio range is the length-to-width ratio range of the human body target recognition frame when the human body target is stooped and / or squatting, and the second ratio range is the length-to-width ratio range of the human body target recognition frame when the human body target is standing or upright.

[0073] Exemplarily, the second ratio range is 3 to 4, that is, when the human body posture of the human target is in an upright state, the length-to-width ratio range of the human body target's identification frame is 3 to 4. The ratio of the first ratio range is 0.5 to 2.5, and when the length-to-width ratio of the identification frame is greater than or equal to 0.5, and the length-to-width ratio is less than or equal to 2.5, it is determined that the human body target in the image includes a bending and / or squatting posture.

[0074] In this embodiment, by setting a first ratio range, when the aspect ratio of the identification frame of the human target in the image falls within the first ratio range, it is determined that the human target in the image includes a bending and / or squatting posture, thereby effectively inferring whether the human target in the image is in a bending and / or squatting posture, thereby improving the accuracy of determining the posture of the human target.

[0075] In order to avoid missing illegal food picking behaviors in the image, in one embodiment, the method for identifying illegal food picking also includes: when no overlapping area between the food target and the human target is identified, determining whether the food target in the image is within a preset range of the human target; when it is identified that the image contains the food target and a human target in a preset posture, and the food target is within the preset range of the human target, determining that illegal food picking behaviors exist.

[0076] The preset range of the human target may be a range within a preset distance around the human target, or a range within a preset distance around the human target recognition frame. The preset range may be set based on experience or experimental data, and the preset range may be a dynamic range or a fixed range.

[0077] For example, Figure 3 As shown, it is a schematic diagram that the food target is within the preset range of the human target. Based on the diagram, when the food target and the human target are not identified to have an overlapping area, the human body posture of the human target is in a bent state. On the one hand, it may be that the human target is about to pick up the food, but based on the current image, the two targets have not yet overlapped. On the other hand, if the color of part of the food is similar to the skin color of the human body, there is a human target that has picked up the food target, that is, the human target in the bent state actually overlaps with the food target, but because the color of the food in the overlapping part is similar to the skin color of the human target, the image recognition technology does not accurately identify the overlapping area between the human target and the food target in the image. Therefore, it is possible to determine whether the food target is within the preset range of the human target by comparing the coordinates of the food target with the coordinates and preset range of the human target recognition frame. If the food target is within the preset range of the human target, there is an illegal act of picking up food. Therefore, it is calculated whether the position of the food target falls within the preset range of the human target to determine whether the food target is within the preset range of the human target, so as to determine whether there is an illegal act of picking up food, and avoid missing the illegal act of picking up food.

[0078] If a food target and a human target in a preset posture (bending and / or squatting) are identified in the image, and the food target is within the preset range of the human target, it can be determined that there is illegal picking up of food, thereby achieving more accurate detection and judgment of whether there is illegal picking up of food in the image, and improving the accuracy and reliability of the method for identifying illegal picking up of food.

[0079] Furthermore, in order to accurately determine whether the food target is within the preset range of the human target, in one embodiment, when no overlapping area between the food target and the human target is identified, it is determined whether the food target in the image is within the preset range of the human target. The specific method includes: enlarging the identification frame of the human target and / or the food target according to a custom ratio. If the enlarged identification frame intersects or contains the other identification frame, it is determined that the food target is within the preset range of the human target.

[0080] The custom ratio can be set according to experimental data or empirical values. The identification frame of the human target and / or the food target is enlarged according to the custom ratio to expand the range of the identification frame, and then it is determined whether the enlarged identification frame intersects or contains the identification frame of the other party. If so, it is determined that the food target is within the preset range of the human target. If not, it cannot be determined.

[0081] For example, Figure 4 As shown, it is a schematic diagram of expanding the recognition frames of the human target and the food target according to a custom ratio. Based on the diagram, after the recognition frames of the human target and the food target are expanded at the same time according to the custom ratio, the expanded recognition frames of the two targets (red lines in the figure) intersect, and it is determined that the food target is within the preset range of the human target. It should be noted that, according to specific needs, the recognition frame of the human target can also be expanded separately, or the recognition frame of the food target can be expanded separately, and then it is determined that the expanded recognition frame intersects or is contained with the other party's recognition frame to determine that the food target is within the preset range of the human target.

[0082] This method effectively determines the spatial relationship between two objects by expanding the recognition box and checking the intersection or inclusion, which helps to detect illegal food picking behaviors in images.

[0083] In another embodiment, when no overlapping area between the food target and the human target is identified, it is determined whether the food target in the image is within a preset range of the human target. The specific method includes: obtaining the shortest distance between the identification frame of the human target and the identification frame of the food target, and determining whether the shortest distance is less than or equal to a preset multiple of the width of the human target identification frame. If so, it is determined that the food target is within the preset range of the human target.

[0084] Among them, the shortest distance can be achieved by calculating the distance between the nearest edges of the two identification frames. Depending on the relative position of the frames, it may also be necessary to calculate multiple sets of distances and take the minimum value. It should be noted that the range from the human target to the picked-up material generally does not exceed the arm span, which is approximately equal to the width of the human body. Then, the shortest distance between the identification frame of the human target and the identification frame of the food target is compared with the preset multiple of the width of the human target identification frame. If it is less than the preset multiple of the width of the human target identification frame, there may be a possibility that the human target picks up the food target. Set a preset multiple k, which is used to define the "preset range" around the human target. For example, if k=1, the preset range is equivalent to the width of the human target.

[0085] For example, Figure 5 The figure shows the shortest distance between the recognition frame of the human target and the recognition frame of the food target. Based on the figure, the shortest distance (the red line in the figure) is the distance between the closest edges of the two recognition frames. Assuming k=1, it can be observed that the shortest distance is less than the width of the human target recognition frame. Therefore, it is determined that the food target is within the preset range of the human target.

[0086] This method effectively determines whether the food target is within the preset range of the human target by calculating and comparing the shortest distance between the recognition frames and the preset multiples of the width of the human target recognition frame, thereby helping to automatically identify specific spatial relationships in the image to analyze whether there is any illegal behavior in picking up food.

[0087] In another embodiment, when no overlapping area between the food target and the human target is identified, it is determined whether the food target in the image is within a preset range of the human target. The specific method includes: determining a circle with the center of the recognition frame of the human target as the center of the circle and the farthest coordinate point of the recognition frame of the human target as the radius. If the circle intersects with the recognition frame of the food target, it is determined that the food target is within the preset range of the human target.

[0088] Exemplarily, determining the center of the identification frame of the human target and the farthest coordinate point of the identification frame of the human target can be achieved through geometric calculations. Then determine a circle and judge whether the circle intersects with the identification frame of the food target. This can be achieved by calculating the distance from each corner of the food target identification frame to the center of the circle and comparing it with the radius. If the distance from any corner to the center of the circle is less than or equal to the radius, the identification frame intersects with the circle, and it is determined that the food target is within the preset range of the human target. This method uses the circle and spatial relationship to determine the relative position between the two targets, which helps to detect illegal food picking behaviors in images.

[0089] For example, Figure 6The figure shows a schematic diagram of the intersection of a circle determined based on the human target recognition frame and the recognition frame of the food target. Based on the figure, a circle (the red circle in the figure) is determined with the center of the human target recognition frame as the center (the red dot in the figure) and the farthest coordinate point of the human target recognition frame as the radius (the red straight line in the figure). The circle intersects with the recognition frame of the food target, so it is determined that the food target is within the preset range of the human target.

[0090] Through the above three methods of determining whether the food target in the image is within the preset range of the human target, it is possible to evaluate whether the food target is within the preset range of the human target from different angles. These three methods provide flexible judgment basis, which can adapt to different scenarios and needs, thereby improving the accuracy and adaptability of identifying illegal food picking behaviors. It should be noted that in order to further improve the accuracy of judging whether the food target is within the preset range of the human target, if the above three judgment methods are met in the image, it is confirmed that the food target in the image is within the preset range of the human target.

[0091] In order to accurately identify the overlapping area between the food target and the human target, in one embodiment, identifying that the food target and the human target have an overlapping area includes: determining whether the identification frame of the food target is contained in the identification frame of the human target, and if so, determining that the food target and the human target have an overlapping area in the image.

[0092] For example, Figure 7 The figure shows a schematic diagram of a human target recognition frame including a food target recognition frame. The human target is in a squatting state, and the food target recognition frame is included in the human target recognition frame, indicating that the human has picked up the food or is about to pick up the picked food, so that it is determined that there is an overlapping area between the food target and the human target in the image, and the overlapping area is the food target recognition frame.

[0093] In another embodiment, it is recognized that there is an overlapping area between the food target and the human target, and the method further includes: if the identification frame of the food target is not included in the identification frame of the human target, determining whether the identification frame of the food target intersects with the identification frame of the human target, and if so, determining the overlapping area between the food target and the human target in the image.

[0094] For example, Figure 8 The figure shows the intersection of the recognition frame of the human target and the recognition frame of the food target. The human target is in a squatting state, and the recognition frame of the food target is not included in the recognition frame of the human target, but the recognition frame of the food target intersects with the recognition frame of the human target, indicating that the human body has or is about to pick up the food, thereby determining the overlapping area of ​​the food target and the human target in the image.

[0095] In another embodiment, identifying that the food target and the human target have an overlapping area also includes: determining whether the overlapping area between the identification frame of the food target and the identification frame of the human target is greater than or equal to a preset parameter, and if so, determining that the food target and the human target have an overlapping area.

[0096] Among them, the preset parameters include at least one of a preset area, a preset screen ratio, a preset ratio of the overlapping area to the food target recognition frame, and a preset ratio of the overlapping area to the human target recognition frame.

[0097] Exemplarily, if the preset parameter is a preset area, the area of ​​the overlapping area between the identification frame of the food target and the identification frame of the human target is calculated to determine whether the area is greater than or equal to the preset parameter. For example, if the area is equal to 0, it means there is no overlapping area, or if the area is greater than 0, it means there is an overlapping area, and then the size of the overlapping area is determined according to the size of the area. Therefore, the value of the preset parameter needs to be greater than 0. Similarly, when the preset parameter is a preset screen ratio, a preset ratio of the overlapping area to the food target identification frame, or a preset ratio of the overlapping area to the human target identification frame, a similar method can be used to determine the preset parameter and determine whether there is an overlapping area between the food target and the human target, which will not be repeated here.

[0098] The above three methods for identifying whether there are overlapping areas between food targets and human targets provide a flexible way to judge the overlap between food targets and human targets in the image. The most appropriate identification method can be selected according to actual conditions and needs, thereby improving the accuracy of identifying whether there are overlapping areas between food targets and human targets.

[0099] In order to improve the accuracy of the positional relationship between the food target and the human target, in one embodiment, the method for identifying illegal food picking also includes: determining the positional relationship between the center of gravity of the food target and the center of gravity of the human target in the image.

[0100] The center of gravity of the human target is determined based on the center of the human target recognition frame, and the center of gravity of the food target is determined based on the center of the food target recognition frame. For example, for a rectangular recognition frame, the center of gravity can be approximated as the center point of the recognition frame, that is, the center point coordinates of the width and height of the recognition frame.

[0101] When it is recognized that the image contains a food target and a human target in a preset posture, and it is recognized that the food target and the human target have an overlapping area, it is determined that there is an illegal behavior of picking up food, including: when it is recognized that the image contains a food target and a human target in a preset posture, and it is recognized that the food target and the human target have an overlapping area, and the center of gravity of the food target is located below the center of gravity of the human target, it is determined that there is an illegal behavior of picking up food.

[0102] Specifically, based on the acquired center of gravity of the human target and the center of gravity of the food target, it is possible to determine whether the center of gravity of the food target is located below the center of gravity of the human target based on the coordinates of the two centers of gravity, for example, by determining the ordinate values ​​of the two center of gravity coordinates, the smaller ordinate value of the center of gravity indicates that the center of gravity is located below the other center of gravity. Thus, when the center of gravity of the food target is located below the center of gravity of the human target, the positional relationship between the food target and the human target is accurately determined, thereby determining that there is an illegal act of picking up food.

[0103] In this embodiment, by combining the recognition of the target posture, the detection of the overlapping area, and the determination of the center of gravity, the illegal behavior of picking up food can be effectively identified and prevented. This multi-condition combination method improves the accuracy and robustness of the detection, and helps to monitor and standardize the food safety and hygiene standards of the kitchen.

[0104] In one embodiment, the method for identifying illegal food picking also includes: when the image contains food targets and human targets in preset postures, if the food targets and human targets overlap in the image, the image displays a specific label, such as "confirmed violation". The specific label can improve the operation efficiency and recognition accuracy of the algorithm. It should be noted that if a human target in a preset posture is identified in the image, a specific label is displayed in the image, such as "human bending" or "human squatting" or "human preset posture".

[0105] In order to improve recognition efficiency and reduce labor costs, in one embodiment, the method for identifying illegally picked up food also includes: obtaining an area in the first area where the frequency of false alarms of alarm instructions is greater than a preset value within a preset time period as a second area; and automatically adjusting the first area based on the second area.

[0106] The preset time period is a time period during which food can be picked up, and is used to distinguish whether it is a time period for identifying illegal food picking. For example, picking up food during the cleaning time period does not constitute an illegal behavior. The preset value can be set based on historical data, security requirements, and system tolerance.

[0107] Specifically, within a preset time period, alarm instruction data in the first area are collected. The alarm instruction data includes the time, date, location of each alarm, and whether it is a real alarm or a false alarm. Then, the false alarm frequency of alarm instructions in the human target area and the food target area in the first area within the preset time period is calculated. This can be done by dividing the number of false alarms by the total number of alarm instructions and then calculating the percentage. Secondly, the false alarm frequency of alarm instructions is compared with a preset value, and the area where the false alarm frequency of alarm instructions is greater than the preset value is marked as the second area. Therefore, based on the characteristics of the second area, an adjustment strategy is formulated. For example, the second area can be automatically cut out from the original first area to generate a new first area; or the second area can be manually cut out from the first area to generate a new first area.

[0108] It should be noted that after the adjustment, the alarm data of the second area can be monitored to evaluate the effect of the adjustment. If false alarms are still frequent, further analyze and adjust the first area to reduce future false alarms. This process is iterative, and the goal is to find the best first area configuration to minimize false alarms of alarm instructions while not missing real illegal food picking behaviors.

[0109] It should be noted that whether the alarm instruction is a false alarm and the judgment of the second area can be automatically judged by the system based on the user's feedback. For example, the system prompts the user to confirm violation / no violation / no action; or the system obtains the scope of the second area from the user and adjusts the first area.

[0110] In this embodiment, those areas with high frequency of false alarms can be systematically identified and adjusted, thereby improving the efficiency and accuracy of the entire monitoring system. This can not only reduce the demand for human resources, but also improve the speed and quality of response to security incidents.

[0111] Furthermore, in order to reduce false alarms of alarm instructions and improve the accuracy of obtaining the second area, in one embodiment, an area in the first area where the frequency of false alarms of alarm instructions is greater than a preset value is obtained as the second area, including: obtaining multiple feedback instructions from users, the feedback instructions including confirming violation, non-violation or non-processing instructions; based on the number or proportion of non-violation instructions and non-processing instructions, and the location coordinates of the illegal food picking behavior in the first area, determining the area in the first area where the frequency of false alarms of alarm instructions is greater than a preset value as the second area.

[0112] Specifically, first, multiple user feedback on alarm instructions is collected, and user feedback includes confirmation of violations, no violations, or no processing instructions. Then, the feedback is classified, and the number of no-violation instructions and no-processing instructions is counted. At the same time, the proportion of these two types of feedback to the total number of feedback is calculated. Secondly, the location coordinates of the illegal food picking behavior in the first area are recorded, and the location coordinates are analyzed to determine whether there is a specific pattern or central trend. Based on the number or proportion of no-violation instructions and no-processing instructions, combined with the location coordinates of the illegal food picking behavior, the false alarm frequency of the alarm instructions in the first area is analyzed; the false alarm frequency obtained by the analysis is compared with the preset value to determine which areas have a false alarm frequency greater than the preset value; thereby marking the area with a false alarm frequency greater than the preset value as the second area for further optimization or adjustment.

[0113] In this embodiment, by combining user feedback and the location coordinates of illegal food picking behaviors to analyze the false alarm frequency of alarm instructions, it is possible to more accurately identify problem areas and take targeted measures to reduce false alarms. This method not only improves the efficiency and accuracy of the monitoring system, but also improves user satisfaction and the overall performance of the system.

[0114] In order to improve the accuracy of determining whether an image contains a food target, in one embodiment, the method for identifying illegally picked food further includes: storing a food recognition model for identifying different types of food in a database. Determining a first type of the food target according to the attributes of the first area; obtaining food with a frequency greater than a preset frequency in the first area, and determining a second type of the food target according to the food with a frequency greater than the preset frequency; determining a final type of the food target based on the first type and the second type, and retrieving a matching food recognition model from the database based on the final type of the food target.

[0115] Exemplarily, the attributes of the first area include the location of the first area (such as a back kitchen), purpose (such as food preparation, storage, cooking), etc.; based on the association between the attributes of the first area and common ingredients, a first category of the ingredient target is preliminarily determined, for example, common kitchen ingredients include vegetarian ingredients, meat ingredients, etc.; the frequency of occurrence of ingredients in the first area is collected and calculated, and ingredients with an occurrence frequency greater than a preset frequency are judged to determine a second category of the ingredient target; the final category of the ingredient target is determined by combining the first category and the second category, and an ingredient recognition model matching the final category is retrieved from the database to determine whether the image contains the ingredient target, thereby improving the accuracy of the judgment on whether the image contains the ingredient target.

[0116] In order to improve the accuracy of determining whether an image contains a food target, in one embodiment, a method for identifying illegally picked food includes: storing multiple food target recognition models in a database, each food target recognition model is used to recognize different target types. A food target recognition model matching the food target is retrieved from the database, and the food target recognition model is used to determine whether the image contains the food target.

[0117] Exemplarily, an index is created for each food target recognition model to facilitate rapid retrieval of the corresponding food recognition model according to the target type; necessary preprocessing is performed on the image, such as resizing, normalization, denoising, etc., to meet the input requirements of the food recognition model; the output results of the food recognition model are analyzed to determine whether the image contains food targets, thereby improving the accuracy of the judgment on whether the image contains food targets.

[0118] In one embodiment, the first camera captures an image of the first area, and identifies the food target based on a pre-stored food recognition model and identifies the human target in a preset posture based on a human posture recognition model; when the first camera identifies that the image contains the food target and the human target in a preset posture, the server determines whether there is an overlapping area between the food target and the human target in the image. It should be noted that the first camera is an edge camera with a recognition function, which can effectively reduce the data flow transmitted from the camera to the server.

[0119] In one embodiment, the second camera captures an image of the first area, and the server identifies the food target and the human target in a preset posture in the image captured by the second camera based on the pre-stored food recognition model and human posture recognition model respectively; if the food target and the human target in a preset posture are recognized in the image, the server determines whether there is an overlapping area between the food target and the human target in the image. It should be noted that the second camera can be a camera with basic functions, which is used to capture images, and the captured images are transmitted to the server, which performs the recognition function, thereby reducing the cost of the camera.

[0120] In order to more clearly illustrate the application of the method for identifying illegal picking of food in the embodiment of the present application, as shown in FIG. Fig. 9 As shown, a judgment flow chart of a method for identifying illegal picking of food ingredients is also provided, which specifically includes the following steps:

[0121] Step S901: Acquire an image of a first area.

[0122] Step S902: determine food targets and human targets in the image.

[0123] Step S903: Obtain the aspect ratio of the recognition frame of the human target in the image.

[0124] Step S904: Based on the aspect ratio of the recognition frame of the human target in the image and the matching relationship between the aspect ratio and the human posture, determine whether the image contains a human target in a preset posture; if the judgment result is yes, execute step S905; if the judgment result is no, the process ends.

[0125] Step S905, determine whether there is an overlapping area between the food target and the human target in the image; if the determination result is yes, execute step S907, if the determination result is no, execute step S906.

[0126] Step S906, determine whether the food target in the image is within the preset range of the human target; if the determination result is yes, execute step S907, if the determination result is no, the process ends.

[0127] Step S907: Determine whether there is any illegal behavior of picking up food.

[0128] Exemplarily, in the scenario of identifying whether there is illegal picking of food in the kitchen, an image of the first area in the kitchen is obtained, and the image may include food, personnel, plates, and various kitchen utensils. Then, the kitchen human target and kitchen food target in the image are extracted, and the length-width ratio of the recognition frame of the human target in the image is obtained, and then it is determined whether the image contains a human target in a preset posture (bending and / or squatting). If there is a person bending and / or squatting in the kitchen, it is further determined whether there is an overlapping area between the food target and the human target in the image. If there is an overlapping area between the food target and the human target in the kitchen, it is determined that there is illegal picking of food; if there is no overlapping area between the food target and the human target in the kitchen, it can also be determined whether the food target in the image is within the preset range of the human target. If the food target is within the preset range of the human target, it is determined that there is illegal picking of food, and then an alarm instruction can be issued to reduce illegal behavior in the kitchen and improve food safety in the kitchen.

[0129] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0130] Based on the same inventive concept, the embodiment of the present application also provides a device for implementing the above-mentioned method for identifying illegally picked food. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiment of the device for identifying illegally picked food provided below can refer to the limitations of the method for identifying illegally picked food above, and will not be repeated here.

[0131] In one embodiment, Fig.10 As shown, a device for identifying illegal picking of food is provided, comprising:

[0132] The acquisition module 1001 is used to acquire an image of a first area.

[0133] The recognition module 1002 is used to determine whether the image contains food targets and human targets in preset postures, wherein the preset postures include bending and / or squatting; the recognition module 1002 is also used to determine the positional relationship between the food targets and the human targets in the image.

[0134] The output module 1003 is used to determine that there is an illegal act of picking up food when it is recognized that the image contains a food target and a human target in a preset posture, and it is recognized that the food target and the human target have an overlapping area.

[0135] In one embodiment, the recognition module 1002 is further specifically used to: obtain the length-to-width ratio of the recognition frame of the human target in the image; determine the posture of the human target based on the length-to-width ratio of the recognition frame of the human target in the image and the matching relationship between the length-to-width ratio and the human posture.

[0136] In one embodiment, the recognition module 1002 is further specifically configured to: determine that the human target in the image includes a bending and / or squatting posture when the length-to-width ratio of the recognition frame of the human target in the image falls within a first ratio range.

[0137] In one embodiment, the output module 1003 is further used to determine whether the food target is located within a preset range of the human target in the image when no overlapping area between the food target and the human target is identified;

[0138] When it is recognized that the image contains a food target and a human target in a preset posture, and the food target is located within the preset range of the human target, it is determined that there is an illegal act of picking up food.

[0139] In one embodiment, the recognition module 1002 is further specifically configured to: expand the recognition frame of the human target and / or the food target according to a custom ratio, and if the expanded recognition frame intersects or includes the other recognition frame, determine that the food target is within the preset range of the human target; or

[0140] Obtain the shortest distance between the identification frame of the human target and the identification frame of the food target, and determine whether the shortest distance is less than or equal to a preset multiple of the width of the human target identification frame. If so, determine that the food target is within the preset range of the human target; or,

[0141] A circle is determined with the center of the human target's identification frame as the center and the farthest coordinate point of the human target's identification frame as the radius. If the circle intersects with the food target's identification frame, it is determined that the food target is within the preset range of the human target.

[0142] In one embodiment, the recognition module 1002 is further specifically used to: determine whether the recognition frame of the food target is contained in the recognition frame of the human target, and if so, determine whether there is an overlapping area between the food target and the human target in the image;

[0143] or,

[0144] If the identification frame of the food target is not included in the identification frame of the human target, determine whether the identification frame of the food target intersects with the identification frame of the human target, and if so, determine the overlapping area of ​​the food target and the human target in the image;

[0145] or,

[0146] Determine whether the overlapping area between the identification frame of the food target and the identification frame of the human target is greater than or equal to a preset parameter. If so, determine that the food target and the human target have an overlapping area; wherein the preset parameters include at least one of a preset area, a preset screen ratio, a preset ratio of the overlapping area to the food target identification frame, and a preset ratio of the overlapping area to the human target identification frame.

[0147] In one embodiment, the recognition module 1002 is further specifically used to: determine the positional relationship between the center of gravity of the food target and the center of gravity of the human target in the image; wherein the center of gravity of the human target is determined based on the center of the human target recognition frame, and the center of gravity of the food target is determined based on the center of the food target recognition frame;

[0148] The output module 1003 determines that there is an illegal behavior of picking up food when it is recognized that the image contains a food target and a human target in a preset posture, and that there is an overlapping area between the food target and the human target, and that the center of gravity of the food target is below the center of gravity of the human target, and determines that there is an illegal behavior of picking up food.

[0149] In one embodiment, the identification module 1002 is further specifically used to: obtain an area in the first area with a false alarm frequency of alarm instructions greater than a preset value within a preset time period as the second area; and automatically adjust the first area based on the second area.

[0150] In one embodiment, the identification module 1002 obtains an area in the first area where the frequency of false alarms of alarm instructions is greater than a preset value within a preset time period, as the second area, and is specifically used to: obtain multiple feedback instructions from users, the feedback instructions including confirmation of violation, non-violation or non-processing instructions; based on the number or proportion of non-violation instructions and non-processing instructions, and the location coordinates of the illegal food picking behavior in the first area, determine the area in the first area where the frequency of false alarms of alarm instructions is greater than a preset value as the second area.

[0151] Each module in the above-mentioned device for identifying illegally picked food can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0152] Based on the same inventive concept, the embodiment of the present application also provides a system for realizing the above-mentioned identification of illegally picked up food. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiment of the system for identifying illegally picked up food provided below can refer to the limitations of the method for identifying illegally picked up food above, and will not be repeated here.

[0153] In one embodiment, Fig.11 As shown, a system 110 for identifying illegally picked up food is also provided, and the system 110 includes:

[0154] The image acquisition device 111 is used to acquire an image of the first area.

[0155] Server 112 is used to determine whether the image contains food targets and human targets in preset postures, wherein the preset postures include bending over and / or squatting; the recognition module is also used to determine the positional relationship between the food targets and the human targets in the image; when it is recognized that the image contains food targets and human targets in preset postures, and it is recognized that the food targets and the human targets have overlapping areas, it is determined that there is illegal food picking behavior.

[0156] In one embodiment, the image acquisition device 111 includes a camera, which is used to acquire an image of the first area, and identify food targets based on a pre-stored food recognition model, and identify human targets in preset postures based on a human posture recognition model; when the camera recognizes that the image contains food targets and human targets in preset postures, the server 112 determines whether there is an overlapping area between the food targets and the human targets in the image.

[0157] It should be noted that the image acquisition device 111 and the server 112 in the system for identifying illegally picked food cooperate with each other to execute the implementation scheme recorded in the above method for identifying illegally picked food. Therefore, the specific implementation scheme in the image acquisition device 111 and the server 112 refers to the above definition of the method for identifying illegally picked food, and will not be repeated here.

[0158] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection.

[0159] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0160] In one embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0161] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory, magnetic memory, ferroelectric memory, phase change memory, graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but is not limited thereto.

[0162] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0163] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for identifying illegal picking up of food, characterized in that: The method comprises: Acquire an image of a first area, where the first area indicates an area where illegal food picking behavior may occur; Determining whether the image contains a food target and a human target in a preset posture, wherein the preset posture includes bending over and / or squatting; Determining a positional relationship between the food target and the human target in the image; When it is recognized that the image contains a food target and a human target in a preset posture, and it is recognized that the food target and the human target have an overlapping area, determining that there is an illegal act of picking up food; Wherein, when it is recognized that the image contains a food target and a human target in a preset posture, and it is recognized that the food target and the human target have an overlapping area, determining that there is an illegal act of picking up food includes: In the case where it is recognized that the image includes a food target and a human target in a preset posture, it is recognized that the food target and the human target have an overlapping area, and the center of gravity of the food target is located below the center of gravity of the human target, it is determined that there is an illegal behavior of picking up food; The method further includes: obtaining an area in the first area where the false alarm frequency of alarm instructions is greater than a preset value within a preset time period as a second area; and adjusting the first area based on the second area.

2. The method for identifying illegal picking of food according to claim 1, characterized in that: The method for identifying the human target bending and / or squatting comprises: Obtaining the aspect ratio of the recognition frame of the human target in the image; The posture of the human target is determined based on the aspect ratio of the recognition frame of the human target in the image and the matching relationship between the aspect ratio and the human posture.

3. The method for identifying illegal picking up of food according to claim 1, characterized in that: Based on the aspect ratio of the recognition frame of the human target in the image and the matching relationship between the aspect ratio and the human posture, determining the posture of the human target includes: When the length-to-width ratio of the recognition frame of the human target in the image falls within a first ratio range, it is determined that the human target in the image includes a bending and / or squatting posture.

4. The method for identifying illegal picking of food according to claim 1, characterized in that: The method further includes: in the case where no overlapping area between the food target and the human target is identified, determining whether the food target is located within a preset range of the human target in the image; When it is recognized that the image contains a food target and a human target in a preset posture, and the food target is located within a preset range of the human target, it is determined that there is an illegal behavior of picking up food.

5. The method for identifying illegal picking up of food according to claim 4, characterized in that: In the case that no overlapping area between the food target and the human target is identified, determining whether the food target in the image is located within a preset range of the human target includes: Enlarging the identification frame of the human target and / or the food target according to a custom ratio, if the enlarged identification frame intersects or includes the other identification frame, then determining that the food target is within the preset range of the human target; or Obtaining the shortest distance between the identification frame of the human target and the identification frame of the food target, and determining whether the shortest distance is less than or equal to a preset multiple of the width of the human target identification frame, and if so, determining that the food target is within the preset range of the human target; or, A circle is determined with the center of the identification frame of the human target as the center and the farthest coordinate point of the identification frame of the human target as the radius. If the circle intersects with the identification frame of the food target, it is determined that the food target is within the preset range of the human target.

6. The method for identifying illegal picking of food according to claim 1, characterized in that: The identifying that the food target and the human target have an overlapping area includes: Determine whether the identification frame of the food target is contained in the identification frame of the human target, and if so, determine that there is an overlapping area between the food target and the human target in the image; or, If the identification frame of the food target is not included in the identification frame of the human target, determining whether the identification frame of the food target intersects with the identification frame of the human target, and if so, determining an overlapping area between the food target and the human target in the image; or, Determine whether the overlapping area between the identification frame of the food target and the identification frame of the human target is greater than or equal to a preset parameter, and if so, determine that the food target and the human target have an overlapping area; wherein the preset parameter includes at least one of a preset area, a preset screen ratio, a preset proportion of the overlapping area to the food target identification frame, and a preset proportion of the overlapping area to the human target identification frame.

7. The method for identifying illegal picking of food according to any one of claims 1 to 6, characterized in that: The method further comprises: Determine the positional relationship between the center of gravity of the food target and the center of gravity of the human target in the image; wherein the center of gravity of the human target is determined based on the center of the human target recognition frame, and the center of gravity of the food target is determined based on the center of the food target recognition frame.

8. The method for identifying illegal picking of food according to claim 1, characterized in that: Acquiring an area in the first area where the false alarm frequency of the alarm instruction is greater than a preset value as the second area includes: Obtain multiple feedback instructions from the user, the feedback instructions including confirmation of violation, no violation or no processing instructions; Based on the number or proportion of the non-violation instructions and the unprocessed instructions, and the location coordinates of the illegal food picking behavior in the first area, an area in the first area where the false alarm frequency of alarm instructions is greater than a preset value is determined as the second area.

9. A device for identifying illegal picking up of food, characterized in that: The device comprises: An acquisition module, configured to acquire an image of a first area, wherein the first area indicates an area where illegal food picking behavior may occur; an identification module, used to determine whether the image contains a food target and a human target in a preset posture, wherein the preset posture includes bending and / or squatting; used to determine the positional relationship between the food target and the human target in the image; and also used to obtain an area in the first area where the false alarm frequency of the alarm instruction is greater than a preset value within a preset time period as a second area, and adjust the first area based on the second area; The output module determines that there is an illegal act of picking up food when it is recognized that the image contains a food target and a human target in a preset posture, and when it is recognized that the food target and the human target have an overlapping area, and the center of gravity of the food target is located below the center of gravity of the human target.

10. A system for identifying illegal picking of food, characterized in that: The system comprises: An image acquisition device, used to acquire an image of the first area; The server is configured to determine whether the image contains a food target and a human target in a preset posture, wherein the preset posture includes bending and / or squatting; determine a positional relationship between the food target and the human target in the image; and determine that there is an illegal act of picking up food if it is identified that the image contains a food target and a human target in a preset posture, and it is identified that the food target and the human target have an overlapping area; Wherein, when it is recognized that the image contains a food target and a human target in a preset posture, and it is recognized that the food target and the human target have an overlapping area, determining that there is an illegal behavior of picking up food includes: when it is recognized that the image contains a food target and a human target in a preset posture, it is recognized that the food target and the human target have an overlapping area, and the center of gravity of the food target is located below the center of gravity of the human target, determining that there is an illegal behavior of picking up food; The server is further used to obtain an area in the first area where the false alarm frequency of alarm instructions is greater than a preset value within a preset time period, as a second area; and adjust the first area based on the second area.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for identifying illegally picked up food according to any one of claims 1 to 8 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for identifying illegally picked up food materials according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Method, system and terminal for realizing wearing identification of safety helmet and computer readable storage medium

    CN109670441A

  • Smoking behavior detection method and device, computer equipment and storage medium

    CN111488841A