CN115760772A - Tobacco material storage cabinet state judgment and non-tobacco material detection method - Google Patents
Tobacco material storage cabinet state judgment and non-tobacco material detection method Download PDFInfo
- Publication number
- CN115760772A CN115760772A CN202211453899.3A CN202211453899A CN115760772A CN 115760772 A CN115760772 A CN 115760772A CN 202211453899 A CN202211453899 A CN 202211453899A CN 115760772 A CN115760772 A CN 115760772A
- Authority
- CN
- China
- Prior art keywords
- state
- storage cabinet
- tobacco material
- material storage
- smoke
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Image Analysis (AREA)
Abstract
The invention provides a tobacco material storage cabinet state judging and non-smoke material detecting method, which belongs to the technical field of tobacco production and comprises a tobacco material storage cabinet state judging module and a non-smoke material detecting module, wherein the tobacco material storage cabinet state judging module is used for executing the following steps: establishing a tobacco material storage cabinet state judgment model by using a computer vision algorithm; collecting tobacco material storage cabinet state picture training data; training a tobacco material storage cabinet state judgment model by using tobacco material storage cabinet state picture training data; inputting a current video, and calculating the operation condition of a charger and the state of a tobacco material storage cabinet by using a tobacco material storage cabinet state judgment model; and if the tobacco material storage cabinet state judgment model judges that the tobacco material storage cabinet state is an empty material state, sending a material emptying notice.
Description
Technical Field
The invention belongs to the technical field of tobacco production, and particularly relates to a tobacco material storage cabinet state judgment and non-smoke material detection method.
Background
The tobacco material storage cabinet is an essential process link in the tobacco shred preparation process in a shred manufacturing workshop and is mainly responsible for storage, alcoholization and temperature and humidity balance of tobacco materials. State detection and foreign matter detection in current silk workshop cabinet class equipment, material conveying equipment transportation process have been the difficult point of puzzlement silk workshop, though the workshop has taken numerous error-proof measures and management method, supervise and urge the incessant tour in the operative employee production process, nevertheless receive the influence of factors such as tour range, tour cycle, can't realize that the material state is all-round, the accurate of full flow, full cycle is controlled, the material sneaks into impurity phenomenon and occasionally takes place. The cabinet is gone into to the silk manufacturing process and is verified before production, and the current majority adopts the mode that the cabinet was tested on the manual work scene, and the part has double-deck cabinet phenomenon moreover, to operating personnel, and it is hard and time-consuming to test the cabinet process, has certain safe risk, influences production efficiency.
Chinese patent publication No. CN1241982A (application No. CN 96180561.7) discloses a method for conveying tobacco in pellet form using a conveyor comprising a resiliently mounted conveying disc (12) and an unbalanced motor (31) mounted to the disc. A performance index of, for example, 80 x 103 kg/kw.h can be obtained. Under the action of the motor, the disk oscillates at a frequency of about 400 cycles/minute or more and at a projection angle of at least 25 ° to the horizontal.
The invention can not solve the problems of the state detection of the tobacco material storage cabinet and the detection of non-smoke materials in the conveying process.
Disclosure of Invention
In view of this, the invention provides a method for judging the state of a tobacco material storage cabinet and detecting a non-smoke material, which can effectively solve the problems of state detection of the tobacco material storage cabinet and detection of the non-smoke material in the conveying process.
The invention is realized by the following steps:
the invention provides a tobacco material storage cabinet state judgment and non-smoke material detection method, wherein the system comprises a tobacco material storage cabinet state judgment module and a non-smoke material detection module, wherein the non-smoke material detection module is used for executing the following steps:
s110: establishing a non-smoke material detection model by a machine vision algorithm;
s120: collecting non-smoke material picture training data, and preprocessing the non-smoke material picture training data;
s130: training the non-smoke material detection model by using the non-smoke material picture training data;
s140: updating the non-smoke material detection model by using different types of non-smoke material picture training data by adopting a transfer learning algorithm;
s150: inputting a current video, and calculating whether the materials on the conveying equipment have the non-smoke materials by using the non-smoke material detection model;
s160: if the non-smoke material detection model judges that the non-smoke materials exist on the conveying equipment, the next step S170 is carried out, and if the non-smoke material detection model judges that the non-smoke materials do not exist on the conveying equipment, the step S150 is repeated;
s170: issuing a non-smoke foreign body alarm;
the tobacco material storage cabinet state judgment module is used for executing the following steps:
s210: establishing a tobacco material storage cabinet state judgment model by using a computer vision algorithm;
s220: collecting tobacco material storage cabinet state picture training data, and preprocessing the tobacco material storage cabinet state picture training data;
s230: training the tobacco material storage cabinet state judgment model by using the tobacco material storage cabinet state picture training data;
s240: inputting a current video, and calculating the operation condition of a charger and the state of a tobacco material storage cabinet by using the tobacco material storage cabinet state judgment model, wherein the tobacco material storage cabinet state comprises an empty material state, a full material state, a discharging state and a charging state;
s250: if the tobacco material storage cabinet state judgment model judges that the tobacco material storage cabinet state is an empty material state, performing the next step S260, and if the tobacco material storage cabinet state judgment model judges that the tobacco material storage cabinet state is a non-empty material state, repeating the previous step S240;
s260: and the tobacco material storage cabinet state judgment module sends a material emptying notice.
On the basis of the technical scheme, the tobacco material storage cabinet state judgment and non-tobacco material detection method can be further improved as follows:
in step S240, the method for calculating the operation condition of the charger and the state of the tobacco material storage cabinet by using the tobacco material storage cabinet state judgment model includes the following steps:
(1) Dividing the tobacco material storage cabinet into 4 states including the feeding state, the discharging state, the empty state and the full state, arranging a rectangular template frame on the upper part of a feeder on the upper part of the picture training data of the tobacco material storage cabinet state, defining the rectangular template frame as the running state of the conveyor, and arranging a small circle of trapezoidal template frame along the inner edge of the track of the conveyor and defining the trapezoidal template frame as the running state of the conveyor;
(2) Extracting pixels in the rectangular template frame and the trapezoidal template frame in every 5 frames of images adjacent to the current video, and extracting the images of the current video for 5 times;
(3) Comparing the distribution and the spatial position of the pixel point band values with the changed band values in the images of the current video of the front frame and the back frame;
(4) Defining the empty material state when the wave band value division is equal to a threshold value 0; defining the charging state when the change of the wave band value is higher than a threshold value 0; defining the wave band value distribution to be mostly concentrated below 10, and taking the wave band value distribution as the empty material state; when the conveying equipment is in a non-charging state, defining that the tobacco material storage cabinet is in the empty state when the spatial position ratio of the material-free area to the conveying equipment track pixel reaches a peak value of 1400, and defining that the tobacco material storage cabinet is in the full state when the spatial position ratio is less than a numerical value of 400, otherwise defining that the tobacco material storage cabinet is in the discharging state;
(4) Training the first tobacco material storage cabinet state judgment model by taking the wave band value subsection and the spatial position as training input data and taking the charging state, the discharging state, the empty state and the full state as training output data;
(5) Optimizing the deployment of the algorithm model, reading the trained tobacco material storage cabinet state judgment model file through breakpoint continuous training, reading an enlarged picture video set, and updating the tobacco material storage cabinet state judgment model.
Wherein, the specific operation steps in the step S120 include:
the first step is as follows: collecting the non-smoke material picture training data under different light rays;
the second step is that: processing the non-smoke material picture training data through image filtering;
the third step: classifying and storing the non-smoke material picture training data;
the fourth step: extracting characteristic values of the non-smoke material picture training data stored in the component category by using Labelimg, and marking;
the fifth step: and corresponding the non-smoke material picture training data after marking into a non-smoke material numerical value.
The specific operation method in step S130 is as follows:
and training the non-smoke material detection model by taking the marked non-smoke material picture training data as training input data and taking the corresponding non-smoke material numerical value as training output data.
Wherein, the specific operation steps in step S220 include:
the first step is as follows: collecting the tobacco material storage cabinet state picture training data under different light rays;
the second step is that: processing the non-smoke material picture training data through image filtering;
the third step: classifying and storing the tobacco material storage cabinet state picture training data;
the fourth step: performing row characteristic value extraction and marking treatment on the tobacco material storage cabinet state picture training data subjected to component type storage by using Labelimg;
the fifth step: and the tobacco material storage cabinet state picture training data after marking is corresponding to a tobacco material storage cabinet state numerical value.
When the current video is input in step S140, the definition of a plurality of current video images collected at regular time is compared, the current video image that is obviously blurred is eliminated, and the clear current video image is automatically selected for comparison.
The specific operation method in step S230 is as follows:
and training the tobacco material storage cabinet state judgment model by taking the marked tobacco material storage cabinet state picture training data as training input data and taking the tobacco material storage cabinet state numerical value as training output data.
The preprocessing method in the step S120 comprises the steps of uniformly processing the non-smoke material picture training data formats into images with proper sizes; and the non-smoke material picture training data features are more obvious through the steps of image format shaping, histogram equalization, gray level processing, image definition improvement, image brightness equalization and image filtering image processing.
Further, during marking treatment, if the marked image is an RGB color image, the image is converted into a gray scale image.
Wherein the models used in the steps S110 and S210 are a convolutional neural network algorithm model VGG-16 and a convolutional neural network algorithm model YOLO.
Compared with the prior art, the tobacco material storage cabinet state judgment and non-tobacco material detection method provided by the invention has the beneficial effects that: based on a machine vision algorithm, the tobacco material storage cabinet material state image acquisition and the common non-tobacco material image acquisition in the production process are carried out, the image characteristic value is extracted after image preprocessing, the extracted characteristic value and an image source are subjected to visual detection model training through a convolutional neural network algorithm, the deployment is optimized and completed, the automatic judgment of the storage cabinet state and the non-tobacco material recognition in the feeding process are realized, the labor intensity of manual cabinet inspection is reduced, and the efficiency of the inspection cabinet before delivery and the purity of the materials in the storage cabinet are improved; the material state of the storage cabinet and the identification of non-smoke materials are acquired on line, so that the detection of foreign matters in the storage cabinet before production is realized, the foreign matters are prevented from being mixed into the materials, and the material purity of the tobacco storage cabinet is ensured; monitoring the cabinet feeding state of the materials in the production process, and timely processing the found problems to ensure the continuity of production; judging whether residual materials exist in the cabinet or not when production is finished, so that the phenomenon of smoke mixing is avoided; the production process of the equipment is monitored in real time, the non-smoke materials are found to alarm in time, impurities are prevented from entering the next process to influence the product quality, the efficiency of checking the cabinet before production can be effectively improved, foreign matters are reduced from being mixed into the materials in the production process, and the quality safety of the cabinet materials is ensured; the abnormal conditions of the equipment in the production process are found in time, the cut tobacco making materials are ensured to meet the process quality standard, and a foundation is provided for the production of high-quality cigarettes.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive labor.
FIG. 1 is a step diagram of a method of detecting a non-smoking material according to the present invention;
FIG. 2 is a step diagram of the method for determining the status of a storage cabinet for tobacco material according to the present invention;
FIG. 3 is a schematic diagram of the location of a marking template;
FIG. 4 is a flow chart of the storage cabinet status determination;
FIG. 5 is a graph showing the variation of the oscillation amplitudes in two templates under different conditions;
FIG. 6 is a graph of a visual calculation of the oscillation amplitude;
FIG. 7 is a distribution diagram of the wave bands of the smoke cabinet in different states;
FIG. 8 is a graph of the content of the smoke cabinet in different states;
FIG. 9 is a graph showing fluctuation of an image after edge detection;
in the drawings, the components represented by the respective reference numerals are listed below:
1. a full material curve; 2. a discharge curve; 3. empty material curve; 4. addition profile.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Thus, the following detailed description of the embodiments of the present invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations or positional relationships based on those shown in the drawings, merely for convenience of description and simplicity of description, and do not indicate or imply that the device or element so 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.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
As shown in fig. 1-2, the present invention provides a first embodiment of a method for determining a status of a tobacco material storage cabinet and detecting a non-smoke material, in which in this embodiment, a system includes a tobacco material storage cabinet status determining module and a non-smoke material detecting module, wherein the non-smoke material detecting module is configured to perform the following steps:
s110: establishing a non-smoke material detection model by a machine vision algorithm;
s120: acquiring non-smoke material picture training data, and preprocessing the non-smoke material picture training data;
s130: training a non-smoke material detection model by using the non-smoke material picture training data;
s140: updating the non-smoke material detection model by using the non-smoke material picture training data of different categories by adopting a transfer learning algorithm;
s150: inputting a current video, and calculating whether the materials on the conveying equipment have the non-smoke materials by using a non-smoke material detection model;
s160: if the non-smoke material detection model judges that the non-smoke material exists on the conveying equipment, the next step S170 is carried out, and if the non-smoke material detection model judges that the non-smoke material does not exist on the conveying equipment, the step S150 is repeated;
s170: issuing a non-smoke foreign body alarm;
the tobacco material storage cabinet state judgment module is used for executing the following steps:
s210: establishing a tobacco material storage cabinet state judgment model by using a computer vision algorithm;
s220: collecting tobacco material storage cabinet state picture training data, and preprocessing the tobacco material storage cabinet state picture training data;
s230: training a tobacco material storage cabinet state judgment model by using tobacco material storage cabinet state picture training data;
s240: inputting a current video, and calculating the operation condition of a charger and the storage state of the tobacco material by using a tobacco material storage cabinet state judgment model, wherein the storage state of the tobacco material comprises an empty state, a full state, a discharging state and a charging state;
s250: if the tobacco material storage cabinet state judgment model judges that the tobacco material storage cabinet state is an empty material state, the next step S260 is carried out, and if the tobacco material storage cabinet state judgment model judges that the tobacco material storage cabinet state is a non-empty material state, the previous step S240 is repeated;
s260: the tobacco material storage cabinet state judgment module sends out a material emptying notice.
And S150, inputting the current video in the step S240 by using a starlight camera and a switch, wherein the starlight camera is powered by POE.
A Switch means a "Switch" is a network device used for electrical (optical) signal forwarding. It may provide an exclusive electrical signal path for any two network nodes accessing the switch. The most common switch is an ethernet switch. Other common are telephone voice switches, fiber switches, and the like.
The switch can use the UT model switch of Shenzhen City Shenzhong ann electronic equipment factory.
The starlight camera can use YHXGD3580-YS-V1.0 of Shenzhen Yuhaxuan opto-electronic technology Limited.
The signal transmission of the convergence switch layer and the core layer switch of the switch adopts optical fibers.
Because the convergence switch and the machine room are far away, the convergence switch and the core switch adopt optical fibers for signal transmission, and the video transmission speed is ensured. The camera adopts POE power supply, and video acquisition device's power supply and video transmission can be realized to a net twine, because the transmission distance of net twine is 100 meters at most, consequently assemble the position of switch and should synthesize the position of considering each video acquisition device, ensure that every video acquisition device's signal all can stably transmit to assembling the switch. Because the convergence switch and the machine room are far away, the convergence switch and the core switch adopt optical fibers for signal transmission, and the video transmission speed is ensured.
The convergence layer switch is a convergence point of a plurality of access layer switches, and is used for uniformly exporting the access nodes and also performing forwarding and routing. It must be able to handle all traffic from the access layer devices and provide an uplink to the core layer, so the convergence layer switch needs to have high forwarding performance compared to the access layer switch, which is also typically a three layer switch;
the core layer switch is generally a three-layer switch or a switch with more than three layers, adopts a chassis-type appearance, has many redundant components, and the core layer switch, which can also be called a gateway of the switch, generally occupies most of investment in network planning design because the core layer equipment has high requirements on redundancy capability, reliability and transmission speed.
In the above technical solution, the specific operation steps in step S120 include:
the first step is as follows: collecting non-smoke material picture training data under different light rays;
the second step is that: processing the non-smoke material picture training data through image filtering;
the third step: classifying and storing the non-smoke material picture training data;
the fourth step: extracting characteristic values of the non-smoke material picture training data stored in the component category by using Labelimg, and marking;
the fifth step: and corresponding the marked non-smoke material picture training data into a non-smoke material numerical value.
LabelImg is a visual image calibration tool. Data sets required by target detection networks such as Faster R-CNN, YOLO, SSD and the like all need to be calibrated by the tool. The generated XML file is in the format of a PASCAL VOC.
In the above technical solution, the specific operation method in step S130 is as follows:
and training the non-smoke material detection model by taking the marked non-smoke material picture training data as training input data and taking the corresponding non-smoke material numerical value as training output data.
In the above technical solution, the method for calculating the operation condition of the charger and the state of the tobacco material storage cabinet by using the tobacco material storage cabinet state judgment model in step S240 includes the following steps:
(1) Dividing tobacco material storage cabinet states into 4 types including a feeding state, a discharging state, an empty state and a full state, arranging a rectangular template frame on the upper part of conveying equipment on the upper part of a feeder on the tobacco material storage cabinet state picture training data, defining the feeding equipment to be in a running state, arranging a small circle of trapezoidal template frame along the inner edge of a conveying equipment track, and defining the feeding machine to be in a running state;
(2) Extracting pixels in a rectangular template frame and a trapezoidal template frame in every 5 frames of adjacent images of the current video, and extracting images of the current video for 5 times;
(3) Comparing the distribution and the spatial position of the pixel point band values with the changed band values in the images of the current video of the front frame and the back frame;
(4) When the division of the defined wave band value is equal to the threshold value 0, the material is judged to be in an empty state; defining that the charging state is judged when the change of the wave band value is higher than a threshold value 0; most of the defined wave band values are concentrated below 10 and are in an empty state; when the conveying equipment is in a non-charging state, defining that the tobacco material storage cabinet is in an empty state when the space position ratio of the material-free area to the track pixel of the conveying equipment reaches a peak value of 1400, and defining that the tobacco material storage cabinet is in a full state when the space position ratio is less than a numerical value of 400, otherwise defining that the tobacco material storage cabinet is in a discharging state;
(4) Training a first tobacco material storage cabinet state judgment model by taking the wave band value subsection and the spatial position as training input data and taking the charging state, the discharging state, the empty state and the full state as training output data;
(5) And optimizing the deployment of the algorithm model, reading the trained tobacco material storage cabinet state judgment model file, reading the enlarged picture video set and updating the tobacco material storage cabinet state judgment model through breakpoint continuous training.
The principle of the tobacco material storage cabinet state judgment algorithm is shown in fig. 3, a rectangular template frame is defined to monitor the operation condition of a feeding machine in a tobacco cabinet, a trapezoidal template frame is defined to monitor the tobacco material storage cabinet state, the whole tobacco material storage cabinet state judgment process is shown in fig. 4, wherein λ 1 and λ 2 are classification threshold values to be determined, and the oscillation amplitude refers to the sum of absolute values of band differences between pixels of two different images to be detected (generally extracted from two adjacent frames in a video stream).
The distribution of wave bands in the tobacco cabinets in different states also presents different laws, as shown in fig. 3, the trapezoidal template frame area is used as an identification area of an algorithm, a full material curve 1, a discharge curve 2, an empty material curve 3 and a charging curve 4 respectively correspond to four states of a full material state, a discharge state, an empty material state and a charging state of tobacco materials, wherein most of wave band values in the empty material state are concentrated under about 10, and the curves gradually tend to be gentle along with the content change of tobacco leaves in the tobacco material storage cabinet, so that the wave band distribution, the space position characteristics and the like of images can be used as marks for state identification. When the tobacco material storage cabinet is in a non-charging state, the material capacity is further judged, as shown in fig. 5-9, the material capacity is remarkably changed in a discharging state, a full-charging state and an empty-charging state, the frame area of the trapezoidal template is an area with a wave band value smaller than a certain threshold value, when the occupation ratio of the trapezoidal area reaches a peak value, the tobacco material storage cabinet is considered to be in the empty-charging state, and when the occupation ratio is smaller than a certain value, the tobacco material storage cabinet is considered to be in the full-charging state, otherwise, the tobacco material storage cabinet is considered to be in the charging state. For the charging state and the discharging state, according to two adjacent frames of images in the video stream, the periodic change of the 'oscillation amplitude' is determined, the images are extracted once every 5 frames, after 5 times of video image extraction (25 frames in total, namely 1 second), the images are compared, the pixel point space distribution with the changed wave band values in the two frames of images before and after the image extraction is carried out, when the wave band value change is higher than a certain threshold value, the charging state is determined, and the charging state training is carried out in the same way.
The difference of the sum of gray values of all pixel points is calculated in a specific range of adjacent time sequence images (1 s interval is selected here), and the difference is compared with a set threshold value to judge whether the images are in a charging state or not, wherein the judgment is that a discharging part is in a static state under the non-charging condition, the roller is smaller than the set threshold value, and the images are in a moving state under the charging condition. Py can be calculated from videopart in the tool folder, and from the video in the feed, find the value between the two fluctuations, see fig. 8.
Judge the driving running state, except that the trapezoidal template region oscillation amplitude variation under the other four states of reinforced state all should tend to steadily, this is because the stop work of feeder and the quiescent condition of whole cigarette cabinet, when the trapezoidal template region oscillation of appearing by a wide margin this moment, proves there is the condition that the foreign matter got into. And at the moment, performing motion detection by using a background difference method, if the obtained pixel number is greater than a certain threshold value, judging that a moving object exists in the monitored scene, and combining a corresponding work order signal to judge whether the large vehicle runs normally.
The system can acquire the right-to-use images according to the traversing photographing time of the tobacco material storage cabinet state and the set feeding state, calls a visual algorithm to judge, feeds back the judgment result to the staff in real time, and automatically triggers and controls the display module to control and shut down the equipment according to the situations of human invasion and non-empty cabinet entering. By repeatedly executing the above work, the automatic checking of the state of the tobacco material storage cabinet and the online identification of the non-tobacco materials are realized.
The background subtraction method is to select the average of one or several images in the background as the background image, and then subtract the current frame of the subsequent sequence image from the background image to eliminate the background.
Judging the running state of the vehicle, except the feeding state, the vibration amplitude change of the trapezoidal area in the other four states should tend to be stable, which is due to the stop work of the feeding machine and the static state of the whole cigarette cabinet, and when the trapezoidal template frame area tends to have large amplitude vibration at the moment, the situation that non-smoke foreign matters enter is proved to exist. And at the moment, performing motion detection by using a background difference method, if the obtained pixel number is greater than a certain threshold value, judging that a moving object exists in the monitored scene, and combining a corresponding work order signal to judge whether the large vehicle runs normally.
In the above technical solution, the preprocessing method in step S120 includes uniformly processing the non-smoke material picture training data formats into images of a suitable size; the training data characteristics of the non-smoke material pictures are more obvious through the steps of image format shaping, histogram equalization, gray level processing, image definition improvement, image brightness equalization and image filtering image processing.
In the above technical solution, when the current video is input in step S140, the definition of several current video images collected at regular time is compared, the current video image that is obviously blurred is removed, and the clear current video image is automatically selected for comparison.
The apparently blurred image is an image which is shot by overexposure or camera equipment shake according to parameters set by a fixed focal length of a camera.
Further, in the above technical solution, when marking is performed, if the marked image is an RGB color image, the image is converted into a grayscale image.
The RGB color image is formed by overlapping three color channels, and each pixel point is overlapped by numerical values of 3 channels so as to represent the color of the pixel point; the gray map is a two-dimensional matrix, each pixel point is in single-channel color and only has one value, the value range of the gray map is 0-255, 256 gray scales are provided, 0 represents full black, and 255 represents full white.
In the above technical solution, the specific operation steps in step S220 include:
the first step is as follows: acquiring tobacco material storage cabinet state picture training data under different light rays;
the second step is that: processing the non-smoke material picture training data through image filtering;
the third step: classifying and storing the tobacco material storage cabinet state picture training data;
the fourth step: carrying out line characteristic value extraction and marking treatment on the tobacco material storage cabinet state picture training data subjected to component type storage by using Labelimg;
the fifth step: and (4) corresponding the marked tobacco material storage cabinet state picture training data into a tobacco material storage cabinet state numerical value.
In the above technical solution, the specific operation method in step S230 is:
tobacco material stores up cabinet state picture training data after beating the mark and is regarded as training input data, uses tobacco material to store up cabinet state numerical value and as training output data, stores up cabinet state judgement model to tobacco material and trains.
In the above technical solution, the models used in step S110 and step S210 are convolutional neural network algorithm model VGG-16 and convolutional neural network algorithm model YOLO.
According to project target algorithm research, two types of mainstream convolutional neural network algorithms VGGNet and YOLO are analyzed and compared, wherein the category II is mainly used for image classification, the category II is mainly used for target detection, algorithm selection is completed, and a convolutional neural network algorithm model VGG-16 and a convolutional neural network algorithm model YOLO are selected and used.
The method may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation, disk storage, CD-ROM, optical storage, and the like.
The VGG convolutional neural network is a network structure of an ILSVRC (ImageNet Large Scale Visual Recognition Change) game in 2014 of computer vision laboratories of Oxford university, and aims to solve the 1000 types of image classification and positioning problems in ImageNet. The experimental result is that VGGNet chopped the ILSVRC classification of 2014 second, and the first classification is located, which is the google net model, and the VGG16 has 16 layers, which is also the source of the name of the VGG16, and is a quite deep convolutional neural network.
YOLO, a target detection algorithm, the goal of the target detection task is to find all regions of interest in an image and determine the location and class probability of these regions. Deep learning methods in the field of target detection are mainly classified into two categories: a Two-stage (Two-stage) target detection algorithm and a single-stage (One-stage) target detection algorithm. The two-stage method is that a series of candidate bounding boxes are generated by an algorithm as samples, and then the samples are classified through a convolutional neural network, and is also called as a region-based method, such as R-CNN, fast R-CNN, R-FCN and the like; YOLO is a one-stage target detection algorithm, which can be regarded as a single regression problem.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A tobacco material storage cabinet state judgment and non-smoke material detection method is characterized in that the system comprises a tobacco material storage cabinet state judgment module and a non-smoke material detection module, wherein the non-smoke material detection module is used for executing the following steps:
s110: establishing a non-smoke material detection model by a machine vision algorithm;
s120: collecting non-smoke material picture training data, and preprocessing the non-smoke material picture training data;
s130: training the non-smoke material detection model by using the non-smoke material picture training data;
s140: updating the non-smoke material detection model by using different types of non-smoke material picture training data by adopting a transfer learning algorithm;
s150: inputting a current video, and calculating whether the materials on the conveying equipment have the non-smoke materials by using the non-smoke material detection model;
s160: if the non-smoke material detection model judges that the non-smoke material exists on the conveying equipment, the next step S170 is carried out, and if the non-smoke material detection model judges that the non-smoke material does not exist on the conveying equipment, the step S150 is repeated;
s170: issuing a non-smoke foreign body alarm;
the tobacco material storage cabinet state judgment module is used for executing the following steps:
s210: establishing a tobacco material storage cabinet state judgment model by using a computer vision algorithm;
s220: collecting tobacco material storage cabinet state picture training data, and preprocessing the tobacco material storage cabinet state picture training data;
s230: training the tobacco material storage cabinet state judgment model by using the tobacco material storage cabinet state picture training data;
s240: inputting a current video, and calculating the operation condition of a charger and the state of a tobacco material storage cabinet by using the tobacco material storage cabinet state judgment model, wherein the tobacco material storage cabinet state comprises an empty material state, a full material state, a discharging state and a charging state;
s250: if the tobacco material storage cabinet state judgment model judges that the tobacco material storage cabinet state is an empty material state, the next step S260 is carried out, and if the tobacco material storage cabinet state judgment model judges that the tobacco material storage cabinet state is a non-empty material state, the last step S240 is repeated;
s260: and the tobacco material storage cabinet state judgment module sends out a material emptying notice.
2. The method of claim 1, wherein the step S240 of calculating the operation condition of the charger and the status of the tobacco material storage cabinet by using the tobacco material storage cabinet status determination model comprises the steps of:
(1) Dividing the tobacco material storage cabinet into 4 states including the feeding state, the discharging state, the empty state and the full state, arranging a rectangular template frame on the upper part of a feeder on the upper part of the picture training data of the tobacco material storage cabinet state, defining the rectangular template frame as the running state of the conveyor, and arranging a small circle of trapezoidal template frame along the inner edge of the track of the conveyor and defining the trapezoidal template frame as the running state of the conveyor;
(2) Extracting pixels in the rectangular template frame and the trapezoidal template frame in every 5 frames of images adjacent to the current video, and extracting the images of the current video for 5 times;
(3) Comparing the distribution and the spatial position of the pixel point band values with the changed band values in the images of the current video of the front frame and the back frame;
(4) Defining the empty material state when the wave band value subsection is equal to a threshold value 0; defining the charging state when the change of the wave band value is higher than a threshold value 0; defining the wave band value division to be mostly concentrated below 10, and taking the wave band value division as the empty material state; when the conveying equipment is in a non-charging state, defining that the tobacco material storage cabinet is in the empty state when the spatial position ratio of the material-free area to the conveying equipment track pixel reaches a peak value of 1400, and defining that the tobacco material storage cabinet is in the full state when the spatial position ratio is less than a numerical value of 400, otherwise defining that the tobacco material storage cabinet is in the discharging state;
(4) Training the first tobacco material storage cabinet state judgment model by taking the wave band value subsection and the spatial position as training input data and taking the charging state, the discharging state, the empty state and the full state as training output data;
(5) Optimizing the deployment of the algorithm model, reading the trained tobacco material storage cabinet state judgment model file through breakpoint continuous training, reading an enlarged picture video set, and updating the tobacco material storage cabinet state judgment model.
3. The method for judging the state of the tobacco material storage cabinet and detecting the non-tobacco material according to claim 1, wherein the specific operation steps in the step S120 include:
the first step is as follows: collecting the non-smoke material picture training data under different light rays;
the second step: processing the non-smoke material picture training data through image filtering;
the third step: classifying and storing the non-smoke material picture training data;
the fourth step: extracting characteristic values of the non-smoke material picture training data stored in the component category by using Labelimg, and marking;
the fifth step: and corresponding the non-smoke material picture training data after marking into a non-smoke material numerical value.
4. The method for judging the state of the tobacco material storage cabinet and detecting the non-tobacco material according to claim 1, wherein the specific operation method in the step S130 is as follows:
and taking the marked non-smoke material picture training data as training input data, taking the corresponding non-smoke material numerical value as training output data, and training the non-smoke material detection model.
5. The method for judging the state of the tobacco material storage cabinet and detecting the non-smoke material as claimed in claim 1, wherein the specific operation steps in the step S220 comprise:
the first step is as follows: collecting the tobacco material storage cabinet state picture training data under different light rays;
the second step is that: processing the non-smoke material picture training data through image filtering;
the third step: classifying and storing the tobacco material storage cabinet state picture training data;
the fourth step: performing row characteristic value extraction and marking treatment on the tobacco material storage cabinet state picture training data subjected to component type storage by using Labelimg;
the fifth step: and the tobacco material storage cabinet state picture training data after marking is corresponded to tobacco material storage cabinet state numerical values.
6. The method according to claim 1, wherein when the current video is input in step S140, the current video images collected at regular time are subjected to sharpness comparison, the current video images are removed from being blurred obviously, and the sharp current video images are automatically selected for comparison.
7. The method for judging the state of the tobacco material storage cabinet and detecting the non-smoke materials according to claim 1, wherein the specific operation method in the step S230 is as follows:
with beat the mark tobacco material stores up cabinet state picture training data and regards as training input data, with tobacco material stores up cabinet state numerical value and regards as training output data, right tobacco material stores up cabinet state judgement model and trains.
8. The tobacco material storage cabinet state judgment and non-smoke material detection method according to claim 1, wherein the preprocessing method in step S120 comprises uniformly processing the non-smoke material picture training data format into an image with a proper size; and the non-smoke material picture training data characteristics are more obvious through the steps of image format shaping, histogram equalization, gray level processing, image definition improvement, image brightness equalization and image filtering image processing.
9. The tobacco material storage cabinet state judgment and non-smoke material detection method according to claim 3, wherein during marking, if the marked image is an RGB color image, the image is converted into a gray scale image.
10. The method as claimed in claim 1, wherein the models used in the steps S110 and S210 are a convolutional neural network algorithm model VGG-16 and a convolutional neural network algorithm model YOLO.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211453899.3A CN115760772A (en) | 2022-11-21 | 2022-11-21 | Tobacco material storage cabinet state judgment and non-tobacco material detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211453899.3A CN115760772A (en) | 2022-11-21 | 2022-11-21 | Tobacco material storage cabinet state judgment and non-tobacco material detection method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115760772A true CN115760772A (en) | 2023-03-07 |
Family
ID=85334777
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211453899.3A Pending CN115760772A (en) | 2022-11-21 | 2022-11-21 | Tobacco material storage cabinet state judgment and non-tobacco material detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115760772A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117755760A (en) * | 2023-12-27 | 2024-03-26 | 广州市智汇诚信息科技有限公司 | Visual material selection method applied to feeder |
-
2022
- 2022-11-21 CN CN202211453899.3A patent/CN115760772A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117755760A (en) * | 2023-12-27 | 2024-03-26 | 广州市智汇诚信息科技有限公司 | Visual material selection method applied to feeder |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102221559B (en) | Online automatic detection method of fabric defects based on machine vision and device thereof | |
CN110238078B (en) | Sorting method, device, system and storage medium | |
CN107886500A (en) | A kind of production monitoring method and system based on machine vision and machine learning | |
CN110647851B (en) | Production line capacity monitoring method, device and system | |
CN108982514A (en) | A kind of bionical vision detection system of casting surface defect | |
CN107179324A (en) | Method, device and system for detecting product package | |
CN108627520A (en) | A kind of on-line detecting system and method for heterogeneous solid material presentation quality | |
CN102254236A (en) | Intelligent management control system and method for material field | |
US20220391796A1 (en) | System and Method for Mapping Risks in a Warehouse Environment | |
CN112560816A (en) | Equipment indicator lamp identification method and system based on YOLOv4 | |
CN115760772A (en) | Tobacco material storage cabinet state judgment and non-tobacco material detection method | |
CN113989503A (en) | Production line inspection system and method, electronic equipment and storage medium | |
CN114858806A (en) | Cigarette quality inspection data analysis system and method | |
CN115908432A (en) | Material output quality detection system and prediction method | |
CN112756265B (en) | Method and device for detecting abnormal sorting of articles, industrial control equipment and storage medium | |
CN110136044A (en) | A kind of article sorting method, system, equipment and intelligent terminal | |
CN114462646B (en) | Pole number plate identification method and system based on contact network safety inspection | |
CN112733676A (en) | Method for detecting and identifying garbage in elevator based on deep learning | |
CN115218790A (en) | Bar detection method, device and system | |
CN117935452A (en) | Workshop security system and method based on visual multi-mode analysis | |
CN111523522A (en) | Intelligent operation and maintenance management method and management system for equipment | |
CN116758060A (en) | Vertical basket of flowers visual detection system of battery piece | |
CN116823795A (en) | Defect detection method and device for rubber product, electronic equipment and storage medium | |
CN109975312A (en) | A kind of cigarette bobbin paper quality detection device and method based on machine vision technique | |
CN214398645U (en) | Cigarette carton flow monitoring system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |