CN117496201B - Identification method for electronic cigarette, atomizer and battery rod - Google Patents

Identification method for electronic cigarette, atomizer and battery rod Download PDF

Info

Publication number
CN117496201B
CN117496201B CN202311848885.6A CN202311848885A CN117496201B CN 117496201 B CN117496201 B CN 117496201B CN 202311848885 A CN202311848885 A CN 202311848885A CN 117496201 B CN117496201 B CN 117496201B
Authority
CN
China
Prior art keywords
value
data
pixel
identification
atomizer
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.)
Active
Application number
CN202311848885.6A
Other languages
Chinese (zh)
Other versions
CN117496201A (en
Inventor
郭如云
钟鸣
郭小平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Wulun Technology Co ltd
Original Assignee
Shenzhen Wulun Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Wulun Technology Co ltd filed Critical Shenzhen Wulun Technology Co ltd
Priority to CN202311848885.6A priority Critical patent/CN117496201B/en
Publication of CN117496201A publication Critical patent/CN117496201A/en
Application granted granted Critical
Publication of CN117496201B publication Critical patent/CN117496201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a recognition method for an electronic cigarette, an atomizer and a battery rod, and relates to the field of electronic products. According to the identification method for the electronic cigarette, the atomizer and the battery rod, characteristic data of the electronic cigarette, the atomizer and the battery rod and an image to be identified are obtained, and a characteristic database is constructed based on the characteristic data; inputting the image to be identified into the constructed feature extraction model to obtain identification feature data of the image to be identified; reading the identification feature data, matching the identification feature data with a feature database, and calculating a feature similarity score; the invention improves the comprehensive recognition capability of the devices by acquiring the shape, size and color information of the electronic cigarette, the atomizer and the battery rod and capturing the shape information through the curvature value, and acquiring the length, width and height information and the RGB value of the color information, so that the system can consider the contribution of different characteristics more comprehensively and flexibly, thereby improving the accuracy and adaptability of the comprehensive recognition.

Description

Identification method for electronic cigarette, atomizer and battery rod
Technical Field
The invention relates to the field of electronic products, in particular to a recognition method for an electronic cigarette, an atomizer and a battery rod.
Background
With the widespread popularity and use of electronic devices such as electronic cigarettes, atomizers, and battery poles in the current society, related management and monitoring are facing new challenges and demands, and their popularity has made their presence in a variety of settings more and more common, including but not limited to public places, transportation hubs, and various types of security checkpoints.
In public places, it is particularly important to accurately identify the electronic devices, for example, in transportation hubs such as airports and stations, to rapidly and accurately detect the electronic cigarettes carried by passengers, so that the safety of the passengers can be ensured, potential safety risks can be effectively prevented, and in addition, the electronic devices need to be managed and monitored in scenes such as public transportation means, markets and schools to maintain order and safety.
At the security check point, the precise identification of the electronic equipment is important to prevent illegal objects from being carried and ensure the security, the appearance difference of the electronic cigarette, the atomizer, the battery rod and other equipment is small, the traditional means can be difficult to effectively distinguish the electronic equipment, and therefore, an efficient and precise identification method is needed to meet the management and monitoring requirements of the equipment.
In the prior art, the traditional electronic cigarette, the atomizer and the battery rod identification method generally have singleness, so that the identification accuracy is unstable, the processing speed of the traditional identification method is low, and the requirement on real-time performance is difficult to meet.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a recognition method for an electronic cigarette, an atomizer and a battery rod, which solves the problems that the conventional recognition method for the electronic cigarette, the atomizer and the battery rod usually has singleness, so that the recognition accuracy is unstable, the processing speed of the conventional recognition method is low, and the requirement on real-time performance is difficult to meet.
In order to achieve the above purpose, the invention is realized by the following technical scheme: an identification method for an electronic cigarette, a nebulizer and a battery pole, comprising the following steps: acquiring characteristic data of the electronic cigarette, the atomizer and the battery rod and an image to be identified, and constructing a characteristic database based on the characteristic data; inputting the image to be identified into the constructed feature extraction model to obtain identification feature data of the image to be identified; reading the identification feature data, matching the identification feature data with a feature database, and calculating a feature similarity score; and reading the feature similarity score, and marking the identification feature data with the feature similarity score larger than the set threshold value as the corresponding object.
Further, the characteristic data comprises shape information, size information and color information of the electronic cigarette, the atomizer and the battery rod, the shape information is a curvature value of edge coordinates of the electronic cigarette, the atomizer and the battery rod, the size information is a length, a width and a height of the electronic cigarette, the atomizer and the battery rod, and the color information is an RGB value of each pixel point in the electronic cigarette, the atomizer and the battery rod.
Further, the calculation formula of the feature similarity score is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein XS is a similarity score, XZ is a shape information value of the feature data, ++>For identifying the shape information value of the characteristic data CX is the size information value of the characteristic data, +.>For identifying the size information value of the characteristic data, YS is the color information value of the characteristic data, ++>For identifying the color information value of the characteristic data, +.>、/>、/>Respectively->、/>、/>E is a natural constant.
Further, the shape information value of the feature data is consistent with the calculation step of the shape information value of the identification feature data, and the calculation step of the shape information value of the identification feature data is as follows: acquiring curvature values of edge pixel points in the identification characteristic data; the curvature value of each edge pixel point is read and calculated to obtain a shape information value, and the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Curvature value for ith edge pixel,/-)>Slope of ith edge pixel, +.>I=1, 2,3, where N, N is the number of edge pixels.
Further, the size information value of the feature data is consistent with the step of calculating the size information value of the identification feature data, and the step of calculating the size information value of the identification feature data is as follows: respectively acquiring the length, width and height of an image in the identification characteristic data; the size information value is calculated based on the length, width and height of the image in the identification feature data, and the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein CD is the length of the image in the identification feature data, KD is the width of the image in the identification feature data, and GD is the height of the image in the identification feature data.
Further, the color information value of the feature data is equal to the color information value of the feature dataThe calculating steps of the color information values of the identification feature data are consistent, and the calculating steps of the color information values of the identification feature data are as follows: acquiring RGB values of each pixel point in the identification characteristic data; reading RGB values of each pixel point and respectively distributing a weight value; the color information value is calculated based on the RGB value and the weight value of each pixel point, and the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>RGB value for jth pixel, < >>The weight value of RGB value of the j-th pixel point, j=1, 2,3>N, M is the number of pixel points.
Further, the construction steps of the feature extraction model are as follows: acquiring image data sets of the electronic cigarette, the atomizer and the battery rod at different angles and preprocessing the image data sets; constructing an image data set based on the preprocessed image data of the electronic cigarette, the atomizer and the battery rod, and dividing the image data set into a training data set and a verification data set; constructing a deep learning model taking a cyclic neural network as a framework and an LSTM as a variant, and taking the preprocessed image data sets of the electronic cigarette, the atomizer and the battery rod as input data and the characteristic data of the electronic cigarette, the atomizer and the battery rod as output data; reading a training data set, training a deep learning model, and calculating to obtain a characteristic loss function; and evaluating the performance of the model by using the verification data set, and adjusting the model parameters according to the verification result until the model prediction characteristic data accords with the actual characteristic data value.
Further, acquiring image data of the electronic cigarette, the atomizer and the battery rod at different angles and preprocessing the image data, wherein the method comprises the following steps: the method comprises the steps of adjusting image data of electronic cigarettes, atomizers and battery bars at different angles to be of the same size, denoising the adjusted image data, and standardizing pixel value brightness of each pixel point in the denoised image data, wherein the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is the normalized pixel value of the s-th pixel point in the a-th image data,/for the s-th pixel point>Is the original pixel value of the s-th pixel point in the a-th image data,for the average pixel value in the a-th image data,/or->For scaling factor +.>E is a natural constant for a set target pixel value.
Further, the calculation step of the average pixel value in the a-th image data is as follows: respectively acquiring the number and the pixel value of pixel points on a red channel, a green channel and a blue channel in the a-th image data; the average pixel value in the a-th image data is calculated based on the number of pixel points on each channel and the pixel value, and the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>For the pixel value of the F-th pixel point in the red channel in the a-th image data, f=1, 2, 3..f, F is the number of pixels in the red channel, +.>For the pixel value of the G-th pixel in the green channel in the a-th image data, g=1, 2,3, G, G is the number of pixel points in the green channel, < >>The pixel value of the H pixel point in the blue channel in the a-th image data, h=1, 2,3,..h, H is the number of the pixel points in the blue channel, and the sum of the three is the total number of the pixel points in the a-th image data.
Further, the calculation formula of the characteristic loss function is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein,for the feature loss function, k=1, 2, 3..u, U is the number of samples trained, e is a natural constant, +.>For the kth actual characteristic data value, +.>Predicted feature data values predicted for the kth model.
The invention has the following beneficial effects:
(1) According to the identification method for the electronic cigarette, the atomizer and the battery rod, the shape, the size and the color information of the electronic cigarette, the atomizer and the battery rod are obtained, so that the comprehensive identification capacity of the equipment is improved, the shape information is captured through the curvature value, the length, the width and the height information and the RGB value of the color information are collected, and the system can comprehensively and flexibly consider the contribution of different characteristics, so that the accuracy and the adaptability of the comprehensive identification are improved.
(2) According to the identification method for the electronic cigarette, the atomizer and the battery rod, the shape, the size and the color information are considered through the calculation logic of the feature similarity score, and the weight value is introduced to carry out weighted calculation, so that the relative importance of different features can be considered more comprehensively and flexibly in the identification process of the system, the identification accuracy is improved, the influence of the absolute difference of the feature value on the final similarity score is effectively reduced through the introduction of the logic of the contrast value and the weighted summation, and the adaptability of the system to the difference of the feature value range among different devices is enhanced.
(3) According to the identification method for the electronic cigarette, the atomizer and the battery rod, through calculation of the curvature value, the system can capture the shape characteristics of the edge pixel points more sensitively, including micro bending and curve change, and the overall shape can be evaluated by the aid of the overall characteristic, so that the identification capability of the overall shape of the equipment is improved, and the adaptability to the complexity and the variability of the shape can be enhanced.
(4) According to the recognition method for the electronic cigarette, the atomizer and the battery rod, by adopting the structure of the cyclic neural network RNN and the deep learning model taking the LSTM as a variant, the system can better capture complex characteristics of the electronic cigarette, the atomizer and the battery rod, and the characteristic loss function used in the training process of the model is beneficial to model adjustment parameters so as to improve the prediction accuracy of actual characteristics. Through the preprocessing step in the model training process, the quality and consistency of input data can be improved, and the adaptability of the model is enhanced.
Of course, it is not necessary for any one product to practice the invention to achieve all of the advantages set forth above at the same time.
Drawings
Fig. 1 is a flowchart of an identification method for an electronic cigarette, an atomizer and a battery stem according to the present invention.
Fig. 2 is a flowchart showing a calculation step of shape information values of identification feature data in an identification method for an electronic cigarette, a nebulizer and a battery stick according to the present invention.
Fig. 3 is a flowchart illustrating a calculation step of a size information value of identification feature data in an identification method for an electronic cigarette, a nebulizer and a battery stick according to the present invention.
Fig. 4 is a flowchart showing a calculation step of color information values of identification feature data in an identification method for an electronic cigarette, a nebulizer and a battery stick according to the present invention.
Fig. 5 is a flowchart of the steps of constructing a feature extraction model in an identification method for an electronic cigarette, an atomizer and a battery stem according to the present invention.
Fig. 6 is a flowchart showing a step of calculating an average pixel value in the a-th image data in the identification method for the electronic cigarette, the atomizer and the battery stem according to the present invention.
Detailed Description
The embodiment of the application realizes the problem to be solved by the identification method for the electronic cigarette, the atomizer and the battery rod.
The problems in the embodiments of the present application are as follows:
the method comprises the steps of acquiring multidimensional feature data such as the shape, the size and the color of an electronic cigarette, an atomizer and a battery rod, constructing a comprehensive feature database, training the feature data through a deep learning model, particularly an LSTM model based on a cyclic neural network, enabling the model to accurately extract and predict the feature data of an image to be identified, monitoring the training process through a feature loss function, continuously adjusting model parameters to ensure optimization of model performance, and in an identification stage, acquiring identification feature data of the image to be identified by inputting the image to be identified into a trained feature extraction model, matching the identification feature data through feature similarity scores, and marking the identification feature data with the similarity scores larger than a set threshold value, thereby finally realizing accurate identification of the electronic cigarette, the atomizer and the battery rod.
Referring to fig. 1, the embodiment of the invention provides a technical scheme: an identification method for an electronic cigarette, a nebulizer and a battery pole, comprising the following steps: acquiring characteristic data of the electronic cigarette, the atomizer and the battery rod and an image to be identified, and constructing a characteristic database based on the characteristic data; inputting the image to be identified into the constructed feature extraction model to obtain identification feature data of the image to be identified; reading the identification feature data, matching the identification feature data with a feature database, and calculating a feature similarity score; and reading the feature similarity score, and marking the identification feature data with the feature similarity score larger than the set threshold value as the corresponding object.
Specifically, the characteristic data comprises shape information, size information and color information of the electronic cigarette, the atomizer and the battery rod, the shape information is a curvature value of edge coordinates of the electronic cigarette, the atomizer and the battery rod, the size information is the length, the width and the height of the electronic cigarette, the atomizer and the battery rod, and the color information is an RGB value of each pixel point in the electronic cigarette, the atomizer and the battery rod.
In this embodiment, the shape, size and color information of the electronic cigarette, the atomizer and the battery pole are comprehensively obtained, so that the comprehensive recognition capability of the system on the devices is improved, the shape information is captured through the curvature value, the system can sensitively distinguish the tiny shape change of the devices, the accuracy is improved, meanwhile, the collection of the size information such as the length, the width and the height is helpful for distinguishing the devices with different specifications, the adaptability of the system to diversity is improved, the comprehensive utilization of the RGB value of the color information enables the system to distinguish the devices with different color versions more finely, the recognition accuracy is improved, and the comprehensive characteristic data collection mode not only improves the capability of coping with the appearance diversity of the devices, but also enables the system to have robustness, and is more suitable for the actual application scene of the electronic devices with similar appearance but slight differences.
Specifically, the calculation formula of the feature similarity score is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein XS is a similarity score, XZ is a shape information value of the feature data, ++>For identifying the shape information value of the characteristic data CX is the size information value of the characteristic data, +.>For identifying the size information value of the characteristic data, YS is the color information value of the characteristic data, ++>For identifying the color information value of the characteristic data, +.>、/>、/>Respectively->、/>、/>E is a natural constant. In this embodiment, the logic for calculating the feature similarity score is: the method comprises the steps of respectively comparing the shape information value, the size information value and the color information value in the identification feature data with the shape information value, the size information value and the color information value of the feature data, then carrying out summation on the comparison values, then respectively distributing weights to carry out weighted summation calculation, and integrating the shape, the size and the color information of the electronic cigarette, the atomizer and the battery rod by the formula.
Specifically, as shown in fig. 2, the shape information value of the feature data is identical to the shape information value of the identification feature data, which is calculated as follows: acquiring curvature values of edge pixel points in the identification characteristic data; reading each edge imageThe curvature value of the pixel is calculated to obtain a shape information value, and the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Curvature value for ith edge pixel,/-)>Slope of ith edge pixel, +.>I=1, 2,3, where N, N is the number of edge pixels.
In this embodiment, the logic for calculating the shape information value of the identification feature data is: the slope and the second derivative of each edge pixel point are obtained, then the curvature value of each edge pixel point is calculated, the curvature value of each edge pixel point is subjected to mean value calculation, the shape information value of identification feature data is obtained, the shape feature of the edge pixel point can be captured through calculating the curvature value, and the curvature value reflects the bending degree of a curve, therefore, the contour of the electronic equipment can be described more accurately through calculating the curvature value of each edge pixel point, the contour of the electronic equipment comprises micro bending and curve change which can exist, the sensitivity of the system to the shape details is improved, the contour feature of different equipment is distinguished, the contour feature of the different equipment has important significance, the shape information value is obtained through calculating the curvature value of each edge pixel point, the shape information of the whole contour is comprehensively synthesized by the method, the synthesis of the global feature is beneficial to evaluating the whole shape rather than only focusing on the curvature value of an individual point, the whole shape feature of the electronic equipment is better understood by the comprehensive calculation, the recognition capability of the whole shape of the electronic equipment is improved, the curve can be more sensitive to the curve change under the complex situation, the situation of the curve change can be accurately reflected under the complex situation, the situation that the curve change is more sensitive to the curve change is more accurately detected by calculating the slope and the second derivative, the system is more sensitive to the change of the curve change, and the shape change can be accurately solved under the situation.
Specifically, as shown in fig. 3, the size information value of the feature data is consistent with the calculation step of the size information value of the identification feature data, and the calculation step of the size information value of the identification feature data is as follows: respectively acquiring the length, width and height of an image in the identification characteristic data; the size information value is calculated based on the length, width and height of the image in the identification feature data, and the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein CD is the length of the image in the identification feature data, KD is the width of the image in the identification feature data, and GD is the height of the image in the identification feature data.
In this embodiment, the logic for calculating the size information value of the identification feature data is: the method is characterized in that any two of the length, the width and the height of the image are taken as denominators, the rest is taken as a numerator, different partial formulas are used for summation calculation to obtain a size information value, calculation logic means that the importance of the length, the width and the height of the image is equal when the size information value is calculated, the same importance of the length, the width and the height of the image is guaranteed, such equal consideration is helpful for the overall evaluation of the size of the device by the system, the size information which is excessively deviated to a certain direction is not needed, the sensitivity of the system to different size characteristics is enhanced, the absolute value change of the size of the system is more robust by taking any two of the length, the width and the height as denominators, the accurate calculation can be carried out in the range of the size of different devices, the adaptability of the system to different sizes of the devices is improved, the rest is taken as the numerator in logic to carry out summation calculation, the calculation process of the size information value is simplified, the simplification is helpful for improving the calculation efficiency, the complexity of the calculation of the size change caused by the different sizes is reduced, and the real-time performance of the system is improved.
In particularAs shown in fig. 4, the color information value of the feature data is identical to the color information value of the identification feature data, and the color information value of the identification feature data is calculated as follows: acquiring RGB values of each pixel point in the identification characteristic data; reading RGB values of each pixel point and respectively distributing a weight value; the color information value is calculated based on the RGB value and the weight value of each pixel point, and the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>RGB value for jth pixel, < >>The weight value of RGB value of the j-th pixel point, j=1, 2,3>N, M is the number of pixel points.
In this embodiment, the color information value is obtained by performing weight calculation on the RGB values of all the pixel points, and the method provides global synthesis on the whole image color, which is helpful for the system to more comprehensively understand the color characteristics of the electronic device, has good adaptability to the color differences of different devices, improves the recognition capability of the system on the device colors, and calculates the logic of the color information value of the recognition characteristic data as follows: the RGB value of each pixel point is multiplied and summed with the corresponding weight value, then the sum value is divided by the weight value to sum, the weight value is introduced into logic, which means that the system can flexibly adjust the weight of different channels of the color according to actual demands.
Specifically, as shown in fig. 5, the construction steps of the feature extraction model are as follows: acquiring image data sets of the electronic cigarette, the atomizer and the battery rod at different angles and preprocessing the image data sets; constructing an image data set based on the preprocessed image data of the electronic cigarette, the atomizer and the battery rod, and dividing the image data set into a training data set and a verification data set; constructing a deep learning model taking a cyclic neural network as a framework and an LSTM as a variant, and taking the preprocessed image data sets of the electronic cigarette, the atomizer and the battery rod as input data and the characteristic data of the electronic cigarette, the atomizer and the battery rod as output data; reading a training data set, training a deep learning model, and calculating to obtain a characteristic loss function; and evaluating the performance of the model by using the verification data set, and adjusting the model parameters according to the verification result until the model prediction characteristic data accords with the actual characteristic data value.
In the embodiment, through acquiring the image data sets of different angles, the method enriches training data, so that the deep learning model can learn the characteristics of the electronic cigarette, the atomizer and the battery rod under a plurality of view angles, the model design is favorable for improving the adaptability of the model to equipment diversity, the adaptability of the system to equipment images shot at different angles is enhanced, preprocessing is carried out in logic, the steps of adjusting the size of the image, denoising and the like are included, the method is favorable for improving the quality and consistency of input data, the noise and standardized image characteristics can be reduced in a good preprocessing process, the robustness and the robustness of the model to the input data are enhanced, the characteristics in serial data can be better captured by adopting a structure of a cyclic neural network RNN, the model design is favorable for learning the complex characteristics of the electronic cigarette, the atomizer and the battery rod, the recognition capability of the equipment is improved, the training data sets are read and the deep learning model is trained, the failure of the model is realized in the logic, the model is better matched with the actual model, the model is better in the reliability is verified by the model, the model is better, the accuracy and the characteristic is better, the reliability is guaranteed, the model is better, the accuracy and the performance is better than the model is better verified, and the model is better matched with the actual model.
Specifically, obtain the image data of electron cigarette, atomizer and battery pole of different angles and carry out the preliminary treatment, include: the method comprises the steps of adjusting image data of electronic cigarettes, atomizers and battery bars at different angles to be of the same size, denoising the adjusted image data, and standardizing pixel value brightness of each pixel point in the denoised image data, wherein the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is the normalized pixel value of the s-th pixel point in the a-th image data,/for the s-th pixel point>Is the original pixel value of the s-th pixel point in the a-th image data,for the average pixel value in the a-th image data,/or->For scaling factor +.>E is a natural constant for a set target pixel value.
In this embodiment, adjusting the image data of different angles to the same size helps to improve the consistency of the model, which ensures that the deep learning model can process the input data with the same size in the training and predicting process, improves the adaptability of the system to images of different angles, and performs denoising processing helps to improve the quality of the images, which is very critical to training and feature extraction of the deep learning model, because the clean image can better reflect the actual features of the device, improves the learning effect of the model, and ensures that the brightness value in the image is within a certain range by performing brightness standardization processing on each pixel point in the denoised image data, such standardization helps to better adapt the model to the images under different illumination conditions, improves the robustness of the system to illumination changes, and calculates the logic of brightness standardization of the pixel value of each pixel point: the method comprises the steps of carrying out difference calculation on an original pixel value and an average pixel value of a pixel point, multiplying the difference by a scaling factor, adding a target pixel value to obtain a pixel value of the pixel point with standardized brightness, introducing the scaling factor and the target pixel value, carrying out adaptability adjustment on the brightness standardization in logic, wherein the flexibility is beneficial to adapting a model to image brightness change under different scenes, improving the universality of a system, enabling the system to be more suitable for various shooting environments, using the scaling factor in the logic, enabling an algorithm to be more flexible, adjusting according to specific requirements and scenes, and improving the adaptability of the system to image features of different electronic equipment, so that the system has more universality.
Specifically, as shown in fig. 6, the calculation of the average pixel value in the a-th image data is as follows: respectively acquiring the number and the pixel value of pixel points on a red channel, a green channel and a blue channel in the a-th image data; the average pixel value in the a-th image data is calculated based on the number of pixel points on each channel and the pixel value, and the calculation formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>For the pixel value of the F-th pixel point in the red channel in the a-th image data, f=1, 2, 3..f, F is the number of pixels in the red channel, +.>For the pixel value of the g-th pixel point in the green channel in the a-th image data, g=1, 2, 3.G, G is the number of pixel points in the green channel, < >>The pixel value of the H pixel point in the blue channel in the a-th image data, h=1, 2,3,..h, H is the number of the pixel points in the blue channel, and the sum of the three is the total number of the pixel points in the a-th image data.
In this embodiment, the logic for calculating the average pixel value is: the method comprises the steps of respectively obtaining the number of pixel points on red, green and blue channels and the pixel value of each pixel point in a first image data, respectively calculating the average value on each channel based on the number of pixel points on each channel and the pixel value of each pixel point, and calculating the average pixel value based on the average value on each channel.
Specifically, the calculation formula of the characteristic loss function is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>For the feature loss function, k=1, 2, 3..u, U is the number of samples trained, e is a natural constant, +.>For the kth actual characteristic data value, +.>Predicted feature data values predicted for the kth model.
In this embodiment, the logic for calculating the feature loss function is: the method comprises the steps of carrying out difference calculation on an actual characteristic data value and a predicted characteristic data value predicted by a model, squaring the difference, and then carrying out mean calculation, wherein the method aims at enabling the predicted characteristic data value predicted by the model to be consistent with the actual characteristic data value by continuously training the difference to be approximately zero, enabling a loss function to quantify the prediction accuracy of the model by calculating the square of the difference between the actual characteristic data value and the predicted characteristic data value predicted by the model, enabling larger errors to be more obvious relative to small errors by squaring operation, highlighting the deviation of the model in prediction, facilitating more accurate measurement of model performance, enabling the calculation result of the characteristic loss function to be used for optimizing model parameters, enabling the model to adjust own parameters to improve the prediction accuracy of the actual characteristics by minimizing the loss function, updating model parameters through optimization algorithms such as back propagation and the like, designing a characteristic loss function is beneficial to improving the generalization capability of the model, namely the performance on unseen data, the loss function is more sensitive to larger errors by considering square deviation, the model is beneficial to preventing the model from being overfitted on training data, the adaptability of the model to unknown data is improved, square operation has robustness to extremely large or extremely small differences, even if some outliers exist, the influence of the outliers on the loss function is relatively weakened through square operation, the model is more robust in the face of noise or abnormal conditions, the square loss function has good mathematical properties such as micromanipulation, which is very important for model training by using optimization algorithms such as gradient descent, the micromanipulation enables the application of gradient information to back propagate, thereby effectively adjusting the model parameters.
In summary, the present application has at least the following effects:
by acquiring the shape, size and color information of the electronic cigarette, the atomizer and the battery rod, the system improves the comprehensive recognition capability of the equipment, captures the shape information through the curvature value, acquires the size information such as the length, the width, the height and the like, and the RGB value of the color information, so that the system can consider the contribution of different characteristics more comprehensively and flexibly, and the accuracy and the adaptability of the comprehensive recognition are improved.
The calculation logic of the feature similarity score considers shape, size and color information, and weight values are introduced to carry out weighted calculation, so that the relative importance of different features can be comprehensively and flexibly considered in the recognition process of the system, the recognition accuracy is improved, the influence of the absolute difference of the feature values on the final similarity score is effectively reduced by introducing the logic of the contrast value and the weighted summation, and the adaptability of the system to the difference of the feature value ranges among different devices is enhanced.
Through calculation of curvature values, the system can capture the shape characteristics of the edge pixel points more sensitively, including micro bending and curve change, and the overall characteristic synthesis is helpful for evaluating the overall shape, so that the recognition capability of the overall shape of the device is improved, and the adaptability to shape complexity and variability can be enhanced.
By adopting the architecture of the cyclic neural network RNN and using the LSTM as a variant deep learning model, the system can better capture complex characteristics of the electronic cigarette, the atomizer and the battery rod, and the characteristic loss function used in the training process of the model is beneficial to model adjustment parameters so as to improve the prediction accuracy of actual characteristics. Through the preprocessing step in the model training process, the quality and consistency of input data can be improved, and the adaptability of the model is enhanced.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (8)

1. An identification method for an electronic cigarette, an atomizer and a battery rod is characterized by comprising the following steps:
acquiring characteristic data of the electronic cigarette, the atomizer and the battery rod and an image to be identified, and constructing a characteristic database based on the characteristic data;
inputting the image to be identified into the constructed feature extraction model to obtain identification feature data of the image to be identified;
reading the identification feature data, matching the identification feature data with a feature database, and calculating a feature similarity score;
reading the feature similarity score, and marking the identification feature data with the feature similarity score larger than a set threshold value as a corresponding object;
the characteristic data comprise shape information, size information and color information of the electronic cigarette, the atomizer and the battery rod, wherein the shape information is a curvature value of edge coordinates of the electronic cigarette, the atomizer and the battery rod, the size information is the length, the width and the height of the electronic cigarette, the atomizer and the battery rod, and the color information is an RGB value of each pixel point in the electronic cigarette, the atomizer and the battery rod;
the calculation formula of the feature similarity score is as follows:
wherein XS is a similarity score, XZ is a shape information value of the feature data,for identifying the shape information value of the characteristic data CX is the size information value of the characteristic data, +.>For identifying the size information value of the characteristic data, YS is the color information value of the characteristic data, ++>For identifying the color information value of the characteristic data, +.>、/>、/>Respectively->、/>、/>E is a natural constant.
2. The identification method for an electronic cigarette, a nebulizer and a battery stick according to claim 1, wherein: the shape information value of the characteristic data is consistent with the calculation step of the shape information value of the identification characteristic data, and the calculation step of the shape information value of the identification characteristic data is as follows:
acquiring curvature values of edge pixel points in the identification characteristic data;
the curvature value of each edge pixel point is read and calculated to obtain a shape information value, and the calculation formula is as follows:
wherein,curvature value for ith edge pixel,/-)>Slope of ith edge pixel, +.>I=1, 2,3, where N, N is the number of edge pixels.
3. The identification method for electronic cigarettes, atomizers and battery bars according to claim 2, wherein: the size information value of the characteristic data is consistent with the size information value of the identification characteristic data, and the size information value of the identification characteristic data is calculated as follows:
respectively acquiring the length, width and height of an image in the identification characteristic data;
the size information value is calculated based on the length, width and height of the image in the identification feature data, and the calculation formula is as follows:
wherein CD is the length of the image in the identification feature data, KD is the width of the image in the identification feature data, and GD is the height of the image in the identification feature data.
4. A method of identifying an electronic cigarette, a nebulizer and a battery stick according to claim 3, characterized in that: the color information value of the characteristic data is consistent with the calculation step of the color information value of the identification characteristic data, and the calculation step of the color information value of the identification characteristic data is as follows:
acquiring RGB values of each pixel point in the identification characteristic data;
reading RGB values of each pixel point and respectively distributing a weight value;
the color information value is calculated based on the RGB value and the weight value of each pixel point, and the calculation formula is as follows:
wherein,RGB value for jth pixel, < >>The weight value of RGB value of the j-th pixel point, j=1, 2,3>N, M is the number of pixel points.
5. The identification method for electronic cigarettes, atomizers and battery bars according to claim 4, wherein: the construction steps of the feature extraction model are as follows:
acquiring image data sets of the electronic cigarette, the atomizer and the battery rod at different angles and preprocessing the image data sets;
constructing an image data set based on the preprocessed image data of the electronic cigarette, the atomizer and the battery rod, and dividing the image data set into a training data set and a verification data set;
constructing a deep learning model taking a cyclic neural network as a framework and an LSTM as a variant, and taking the preprocessed image data sets of the electronic cigarette, the atomizer and the battery rod as input data and the characteristic data of the electronic cigarette, the atomizer and the battery rod as output data;
reading a training data set, training a deep learning model, and calculating to obtain a characteristic loss function;
and evaluating the performance of the model by using the verification data set, and adjusting the model parameters according to the verification result until the model prediction characteristic data accords with the actual characteristic data value.
6. The identification method for electronic cigarettes, atomizers and battery bars according to claim 5, wherein: image data of the electronic cigarette, the atomizer and the battery rod at different angles are obtained and preprocessed, and the method comprises the following steps: the method comprises the steps of adjusting image data of electronic cigarettes, atomizers and battery bars at different angles to be of the same size, denoising the adjusted image data, and standardizing pixel value brightness of each pixel point in the denoised image data, wherein the calculation formula is as follows:
wherein,is the normalized pixel value of the s-th pixel point in the a-th image data,/for the s-th pixel point>Is the original pixel value of the s-th pixel point in the a-th image data, +.>For the average pixel value in the a-th image data,/or->For scaling factor +.>E is a natural constant for a set target pixel value.
7. The identification method for electronic cigarettes, atomizers and battery bars according to claim 6, wherein: the calculation of the average pixel value in the a-th image data is as follows:
respectively acquiring the number and the pixel value of pixel points on a red channel, a green channel and a blue channel in the a-th image data;
the average pixel value in the a-th image data is calculated based on the number of pixel points on each channel and the pixel value, and the calculation formula is as follows:
wherein,for the pixel value of the F-th pixel point in the red channel in the a-th image data, f=1, 2, 3..f, F is the number of pixels in the red channel, +.>For the pixel value of the G-th pixel in the green channel in the a-th image data, g=1, 2,3, G, G is the number of pixel points in the green channel, < >>The pixel value of the H pixel point in the blue channel in the a-th image data, h=1, 2,3,..h, H is the number of the pixel points in the blue channel, and the sum of the three is the total number of the pixel points in the a-th image data.
8. The identification method for electronic cigarettes, atomizers and battery bars according to claim 7, wherein: the calculation formula of the characteristic loss function is as follows:
wherein,for the feature loss function, k=1, 2, 3..u, U is the number of samples trained, e is a natural constant, +.>For the kth actual characteristic data value, +.>Predicted feature data values predicted for the kth model.
CN202311848885.6A 2023-12-29 2023-12-29 Identification method for electronic cigarette, atomizer and battery rod Active CN117496201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311848885.6A CN117496201B (en) 2023-12-29 2023-12-29 Identification method for electronic cigarette, atomizer and battery rod

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311848885.6A CN117496201B (en) 2023-12-29 2023-12-29 Identification method for electronic cigarette, atomizer and battery rod

Publications (2)

Publication Number Publication Date
CN117496201A CN117496201A (en) 2024-02-02
CN117496201B true CN117496201B (en) 2024-04-05

Family

ID=89676834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311848885.6A Active CN117496201B (en) 2023-12-29 2023-12-29 Identification method for electronic cigarette, atomizer and battery rod

Country Status (1)

Country Link
CN (1) CN117496201B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114862858A (en) * 2022-07-08 2022-08-05 湖北省烟草科学研究院 Cigar harvesting maturity identification method and system based on ensemble learning
CN114973308A (en) * 2022-02-08 2022-08-30 西安交通大学 Finger vein identification method and system based on elastic weight solidification and multivariate similarity loss
CN116385707A (en) * 2023-04-04 2023-07-04 河海大学 Deep learning scene recognition method based on multi-scale features and feature enhancement

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109461168B (en) * 2018-10-15 2021-03-16 腾讯科技(深圳)有限公司 Target object identification method and device, storage medium and electronic device
TWI800975B (en) * 2021-11-09 2023-05-01 瑞昱半導體股份有限公司 Image recognition system and training method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114973308A (en) * 2022-02-08 2022-08-30 西安交通大学 Finger vein identification method and system based on elastic weight solidification and multivariate similarity loss
CN114862858A (en) * 2022-07-08 2022-08-05 湖北省烟草科学研究院 Cigar harvesting maturity identification method and system based on ensemble learning
CN116385707A (en) * 2023-04-04 2023-07-04 河海大学 Deep learning scene recognition method based on multi-scale features and feature enhancement

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于颜色与三维形状的水果识别算法;李慧栋;;中国科技信息;20200715(14);第82-86页 *

Also Published As

Publication number Publication date
CN117496201A (en) 2024-02-02

Similar Documents

Publication Publication Date Title
Zhao et al. Cloud shape classification system based on multi-channel cnn and improved fdm
US8983200B2 (en) Object segmentation at a self-checkout
CN109684922B (en) Multi-model finished dish identification method based on convolutional neural network
CN101563710B (en) Method and apparatus for identifying properties of an object detected by a video surveillance camera
CN103279765B (en) Steel wire rope surface damage detection method based on images match
CN106991370B (en) Pedestrian retrieval method based on color and depth
CN106610969A (en) Multimodal information-based video content auditing system and method
CN112200121B (en) Hyperspectral unknown target detection method based on EVM and deep learning
CN104166841A (en) Rapid detection identification method for specified pedestrian or vehicle in video monitoring network
CN101986348A (en) Visual target identification and tracking method
Yuan et al. Learning to count buildings in diverse aerial scenes
CN108073940B (en) Method for detecting 3D target example object in unstructured environment
CN111539330B (en) Transformer substation digital display instrument identification method based on double-SVM multi-classifier
CN114067444A (en) Face spoofing detection method and system based on meta-pseudo label and illumination invariant feature
CN113947570B (en) Crack identification method based on machine learning algorithm and computer vision
CN112115770A (en) Method and system for identifying autonomous inspection defects of unmanned aerial vehicle of overhead line
CN114863464B (en) Second-order identification method for PID drawing picture information
CN115995056A (en) Automatic bridge disease identification method based on deep learning
CN111178405A (en) Similar object identification method fusing multiple neural networks
CN109344758B (en) Face recognition method based on improved local binary pattern
CN111259736A (en) Real-time pedestrian detection method based on deep learning in complex environment
Chen et al. Fresh tea sprouts detection via image enhancement and fusion SSD
CN117333948A (en) End-to-end multi-target broiler behavior identification method integrating space-time attention mechanism
CN117496201B (en) Identification method for electronic cigarette, atomizer and battery rod
CN111046861B (en) Method for identifying infrared image, method for constructing identification model and application

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
GR01 Patent grant
GR01 Patent grant