Disclosure of Invention
The invention aims to provide a chef cap wearing detection method, and aims to solve the technical problem that whether a chef cap of a person in the kitchen is worn and not checked timely by a person in the prior art.
In order to achieve the purpose, the chef cap wearing detection method adopted by the invention comprises the following steps:
acquiring video data shot by a camera device;
extracting human body characteristic information on the video data;
extracting corresponding human head region information according to the human body characteristic information;
inputting the human head area information into a chef cap detection model;
receiving a detection result output by the chef cap detection model based on terminal equipment;
if the situation that the kitchen staff do not wear the chef cap is detected, sending image data corresponding to the situation that the kitchen staff do not wear the chef cap to a manager;
and if the situation that all the kitchen staff wear the chef cap is detected, the image data is not sent to the manager.
Wherein, the video data that the video camera shooting device shoots of acquireing includes:
mounting the camera device to a corresponding corner of a kitchen;
carrying out shooting debugging on the shooting device;
and after debugging is finished, starting the camera device to acquire the shot video data.
The video data is an image video or a photo.
Wherein, extracting the human body feature information on the video data comprises:
decoding the video data according to an artificial intelligence algorithm to obtain decoded data;
and performing characteristic analysis on the decoded data according to the corresponding frame rate to obtain the human body characteristic information.
The human body characteristic information comprises personnel identity identification information, personnel post identification information and personnel gender identification information.
Wherein, the human head area information is the head area image of the corresponding kitchen staff.
Wherein before the step of inputting the human head region information into a chef cap detection model, the method further comprises:
training is carried out according to the original scene data set of the chef cap to obtain the chef cap detection model.
Wherein, in receiving the testing result of chef cap detection model output based on terminal equipment, if detect after the personnel of kitchen do not wear the chef cap, carry out result verification by oneself, specifically do:
receiving a real-time distance signal between a chef cap and a first obstacle on the ground, wherein the real-time distance signal is transmitted by the chef cap within a first preset time;
calculating the absolute value of the difference between the real-time distance signal and the height of the worker;
and judging whether the absolute value in the second preset time is changed or not, judging that the absolute value is within a preset threshold range, if the absolute value in the second preset time is changed and is within the preset threshold range, verifying that the detection result is wrong, and if the absolute value in a period of time is not changed or is not within the preset threshold range, verifying that the detection result is correct, and generating the detection result to the terminal equipment.
According to the chef cap wearing detection method, video data shot by the camera device are obtained;
extracting human body characteristic information on the video data; extracting corresponding human head region information according to the human body characteristic information; inputting the human head area information into a chef cap detection model; receiving a detection result output by the chef cap detection model based on terminal equipment; if the situation that the kitchen staff do not wear the chef cap is detected, sending image data corresponding to the situation that the kitchen staff do not wear the chef cap to a manager; if the kitchen staff is detected to wear the chef cap, the image data is not sent to the manager, so that manual investigation is not needed, whether the chef cap of the kitchen staff is worn or not can be detected in real time, and the inspection is more timely.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the description of the present invention, it is to be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships illustrated in the drawings, and are used merely for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention. Further, in the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Referring to fig. 1, the present invention provides a chef hat wearing detection method, which includes the following steps:
s1: acquiring video data shot by a camera device;
s2: extracting human body characteristic information on the video data;
s3: extracting corresponding human head region information according to the human body characteristic information;
s4: inputting the human head area information into a chef cap detection model;
s5: receiving a detection result output by the chef cap detection model based on terminal equipment; if the situation that the kitchen staff do not wear the chef cap is detected, sending image data corresponding to the situation that the kitchen staff do not wear the chef cap to a manager; and if the situation that all the kitchen staff wear the chef cap is detected, the image data is not sent to the manager.
In the present embodiment, the imaging device is mounted to a corresponding corner of the kitchen; carrying out shooting debugging on the shooting device; and after debugging is finished, starting the camera device to acquire the shot video data. The video data is image video or photos. In addition, after the debugging is finished, the camera device is started, and the step of acquiring the shot video data is as follows: after the debugging is finished and the camera device is started, the camera device is trained based on libSVM, the human head is directly positioned, and all the human heads and positions in the image are detected.
The extracting the human body feature information on the video data comprises the following steps: decoding the video data according to an artificial intelligence algorithm to obtain decoded data; and performing characteristic analysis on the decoded data according to a corresponding frame rate to obtain the human body characteristic information, wherein the human body characteristic information comprises personnel identity identification information, personnel post identification information and personnel gender identification information.
Then extracting corresponding human head region information according to the human body characteristic information;
the human head area information is a head area image of a corresponding kitchen worker.
Inputting the human head area information into a chef cap detection model;
before the step of inputting the human head area information into the chef cap detection model, the method further comprises the following steps: training is carried out according to the original scene data set of the chef cap to obtain the chef cap detection model.
In the step of training according to an original chef hat wearing scene data set to obtain the chef hat detection model:
acquiring an original chef cap wearing scene data set, and performing enhancement processing on the original chef cap wearing scene data set;
training an original chef cap wearing scene data set and an enhanced chef cap wearing scene data set by utilizing neural networks of different feature extraction networks to obtain a plurality of first models;
acquiring an original chef cap unworn scene data set, and performing enhancement processing on the original chef cap unworn scene data set;
training the enhanced chef cap-free scene data set by taking a first model as a pre-training model to obtain a second model;
performing non-maximum suppression processing without distinguishing between a plurality of first models and a plurality of second models;
and fusing the plurality of first models and the second models after the non-maximum value inhibition processing to obtain a chef cap detection model, and carrying out chef cap wearing detection through the chef cap detection model.
After the plurality of first models and the plurality of second models which are subjected to the non-maximum suppression processing are fused, the fused second models are input into a YOLOv3 network for repeated training, and a chef cap detection model is obtained. Receiving a detection result output by the chef cap detection model based on terminal equipment; if the situation that the kitchen staff do not wear the chef cap is detected, sending image data corresponding to the situation that the kitchen staff do not wear the chef cap to a manager; and if the situation that all the kitchen staff wear the chef cap is detected, the image data is not sent to the manager. Wherein the terminal equipment is a computer;
in receiving the detection result output by the chef cap detection model based on the terminal equipment, if the situation that a cook person does not wear the chef cap is detected, the result verification is automatically carried out, and the method specifically comprises the following steps: receiving a real-time distance signal between a chef cap and a first obstacle on the ground, wherein the real-time distance signal is transmitted by the chef cap within a first preset time; calculating the absolute value of the difference between the real-time distance signal and the height of the worker; and judging whether the absolute value in the second preset time is changed or not, judging that the absolute value is within the preset threshold range, if the absolute value in the second preset time is changed and is within the preset threshold range, verifying that the detection result is wrong, and if the absolute value in a period of time is not changed or is not within the preset threshold range, verifying that the detection result is correct, and sending the detection result to the terminal equipment.
The chef cap wearing detection method provided by the invention comprises the steps of acquiring video data shot by a camera device; extracting human body characteristic information on the video data; extracting corresponding human head region information according to the human body characteristic information; inputting the human head area information into a chef cap detection model; receiving a detection result output by the chef cap detection model based on terminal equipment; if the situation that the kitchen staff do not wear the chef cap is detected, sending image data corresponding to the situation that the kitchen staff do not wear the chef cap to a manager; if the kitchen staff is detected to wear the chef cap, the image data is not sent to the manager, so that manual investigation is not needed, whether the chef cap of the kitchen staff is worn or not can be detected in real time, and the inspection is more timely.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.