A method, device, equipment and storage medium for detecting mildew of tobacco leaves

By combining the convolution feature extraction head and multi-scale network with channel attention mechanism and a fully connected layer method, the problem of low accuracy of mold detection in tobacco leaves is solved, and more efficient and accurate detection results are achieved.

CN119741689APending Publication Date: 2025-04-01CHINA TOBACCO HUNAN IND CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411899351.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The prior art has low accuracy in tobacco leaf mold detection, and is greatly affected by external factors, making it difficult to effectively detect tobacco leaf mold phenomenon.

Method used

The convolutional feature extraction head and preset multi-scale network are used to extract and process the tobacco leaf images to be detected, and the channel attention mechanism and full connection layer are used to generate mold detection results, and the target detection threshold is set through the preset clustering algorithm and Gaussian distribution function.

Benefits of technology

It improves the accuracy and efficiency of tobacco leaf mold detection, enhances the speed and quality of tobacco leaf mold detection, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741689A_ABST
    Figure CN119741689A_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for detecting tobacco leaf mildew, which relates to the field of visual detection technology, including: extracting features of a tobacco leaf image to be detected by a convolutional feature extraction head to obtain sample features, and extracting sample features by using a preset multi-scale network to obtain a number of channel features; a target tobacco leaf mildew detection model includes a convolutional feature extraction head, a preset multi-scale network and a fully connected layer; splicing each channel feature by using a preset splicing rule to obtain a splicing feature to be processed, and processing the splicing feature to be processed by using a preset channel attention mechanism to obtain a target connection feature; processing the target connection feature based on a target detection threshold and using a fully connected layer to obtain a mildew detection result; the target detection threshold is a threshold obtained by processing a mildewed sample by using a preset clustering algorithm and a preset Gaussian distribution function. This can improve the efficiency of detecting tobacco leaf mildew.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual detection technology, and in particular to a tobacco leaf mildew detection method, device, equipment and storage medium. Background Art

[0002] In the tobacco industry, tobacco leaf mold quality inspection is a crucial link that directly affects the quality and safety of tobacco products. The morphology and characteristics of tobacco leaf mold are affected by many factors, including season, climate, and storage conditions. Changes in these factors can lead to differences in the type and degree of mold. In addition, new types or characteristics of mold may appear over time. At present, the accuracy of tobacco leaf mold detection using machine learning models is largely affected by external factors.

[0003] As can be seen from the above, how to improve the accuracy of tobacco leaf mildew detection in the process of tobacco leaf mildew detection is a problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a tobacco leaf mildew detection method, device, equipment and storage medium, which can improve the speed and quality of tobacco leaf mildew detection. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a method for detecting tobacco leaf mildew, comprising:

[0006] A convolutional feature extraction head is used to extract features of a tobacco leaf image to be detected in an input target tobacco leaf mildew detection model to obtain sample features, and several branch channel networks in a preset multi-scale network are used to extract the sample features respectively to obtain several channel features; the convolution kernel sizes corresponding to the branch channel networks are different; the target tobacco leaf mildew detection model includes the convolutional feature extraction head, the preset multi-scale network and a fully connected layer;

[0007] Using a preset splicing rule to splice the channel features to obtain a splicing feature to be processed, and using a preset channel attention mechanism to process the splicing feature to be processed to obtain a target connection feature;

[0008] Based on the target detection threshold and using the fully connected layer to process the target connection feature, a mold detection result corresponding to the tobacco leaf image to be detected is obtained; the target detection threshold is a threshold obtained by processing the moldy sample using a preset clustering algorithm and a preset Gaussian distribution function.

[0009] Optionally, before using the convolution feature extraction head to extract features from the tobacco leaf image to be detected in the target tobacco leaf mildew detection model, the method further includes:

[0010] Using a preset sample qualified detection model to screen a number of tobacco leaf images to be screened according to preset screening conditions to obtain a number of tobacco leaf images to be detected;

[0011] Each of the tobacco leaf images to be inspected is annotated using a preset annotation technology to obtain a number of annotated tobacco leaf images, and each of the annotated tobacco leaf images is transmitted to the target tobacco leaf mildew detection model; each of the tobacco leaf images to be screened is an image obtained after a preset industrial camera collects images of the tobacco leaves in a tobacco leaf production environment.

[0012] Optionally, before using the convolution feature extraction head to extract features from the tobacco leaf image to be detected in the target tobacco leaf mildew detection model, the method further includes:

[0013] Divide the preset data set into a training set, a validation set, and a test set according to the preset division rules, and use the preset hyperparameter adaptive adjustment mechanism to adjust the initial hyperparameters to obtain the target hyperparameters;

[0014] Training a plurality of initial tobacco leaf mildew detection models using the training set, the validation set, and the target hyperparameters to obtain a plurality of tobacco leaf mildew detection models to be tested, and storing each of the tobacco leaf mildew detection models to be tested and the corresponding model metadata in a preset model registry;

[0015] The test set is used to test each of the tobacco leaf mildew detection models to be tested in the preset model registration table to obtain corresponding test scores, and the tobacco leaf mildew detection model to be tested corresponding to the test score with the largest value among the test scores is set as the target tobacco leaf mildew detection model.

[0016] Optionally, the adjusting the initial hyperparameters by using a preset hyperparameter adaptive adjustment mechanism to obtain target hyperparameters includes:

[0017] Using preset experience information to set the type and value range corresponding to the initial hyperparameter to obtain the corresponding hyperparameter type and hyperparameter value range;

[0018] Determine a target hyperparameter type and a target hyperparameter value range from the hyperparameter type and the hyperparameter value range based on tobacco production batches, tobacco production scenarios, and tobacco production lines, and combine the target hyperparameter type and the target hyperparameter value range to obtain a target hyperparameter;

[0019] The target hyperparameters include learning rate, optimizer, batch size, network structure, regularization, number of training rounds, Dropout rate, activation function and loss function.

[0020] Optionally, the convolutional feature extraction head is used to extract features of the tobacco leaf image to be detected in the target tobacco leaf mildew detection model to obtain sample features, and several branch channel networks in the preset multi-scale network are used to extract the sample features respectively to obtain several channel features, including:

[0021] Using the convolutional feature extraction head to extract features from the tobacco leaf image to be detected input into the target tobacco leaf mildew detection model to obtain sample features;

[0022] Extracting the sample features using a first branch channel network and a first preset residual module in the preset multi-scale network to obtain a first channel feature;

[0023] Extracting the sample features using a second branch channel network and a second preset residual module in the preset multi-scale network to obtain second channel features;

[0024] Extracting the sample features using a third branch channel network and a third preset residual module in the preset multi-scale network to obtain a third channel feature;

[0025] Among them, the convolution kernel sizes corresponding to the first branch channel network, the second branch channel network and the third branch channel network are different; the scales of the first channel feature, the second channel feature and the third channel feature are different; the first preset residual module, the second preset residual module and the third preset residual module all use jump connections.

[0026] Optionally, the splicing of the channel features using a preset splicing rule to obtain a splicing feature to be processed, and processing the splicing feature to be processed using a preset channel attention mechanism to obtain a target connection feature, including:

[0027] Splicing the first channel feature with the second channel feature to obtain a splicing result, and splicing the splicing result with the third channel feature to obtain a splicing feature to be processed;

[0028] Based on user needs and using a preset channel attention mechanism, weights are set for the first channel feature, the second channel feature, and the third channel feature included in the splicing feature to be processed, and the splicing feature to be processed is processed based on the corresponding weights to obtain the target connection feature.

[0029] Optionally, before processing the target connection feature based on the target detection threshold and using the fully connected layer, the method further includes:

[0030] Acquire a number of moldy samples from a preset moldy sample library, and process each of the moldy samples to obtain moldy area coordinate information corresponding to each of the moldy samples; each of the moldy samples corresponds to a different tobacco production cycle, tobacco production season, and tobacco variety;

[0031] Using the preset clustering algorithm to process the moldy area coordinate information respectively to obtain sample data corresponding to the moldy sample;

[0032] The sample data is fitted using the preset Gaussian distribution function to obtain a corresponding fitting result, and a peak value in the fitting result is set as a target detection threshold.

[0033] In a second aspect, the present application provides a tobacco leaf mildew detection device, comprising:

[0034] A feature extraction module, used for extracting features of a tobacco leaf image to be detected in an input target tobacco leaf mildew detection model using a convolutional feature extraction head to obtain sample features, and extracting the sample features respectively using a plurality of branch channel networks in a preset multi-scale network to obtain a plurality of channel features; the convolution kernel sizes corresponding to the branch channel networks are different; the target tobacco leaf mildew detection model includes the convolutional feature extraction head, the preset multi-scale network and a fully connected layer;

[0035] A feature splicing module, used for splicing the channel features using a preset splicing rule to obtain a splicing feature to be processed, and processing the splicing feature to be processed using a preset channel attention mechanism to obtain a target connection feature;

[0036] The detection result determination module is used to process the target connection features based on the target detection threshold and using the fully connected layer to obtain a mold detection result corresponding to the tobacco leaf image to be detected; the target detection threshold is a threshold obtained by processing the moldy sample using a preset clustering algorithm and a preset Gaussian distribution function.

[0037] In a third aspect, the present application provides an electronic device, including:

[0038] Memory, used to store computer programs;

[0039] The processor is used to execute the computer program to implement the aforementioned tobacco leaf mildew detection method.

[0040] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned tobacco leaf mildew detection method.

[0041] As can be seen from the above, before performing tobacco leaf mildew detection, the present application needs to use a convolutional feature extraction head to extract features of the tobacco leaf image to be detected in the input target tobacco leaf mildew detection model to obtain sample features, and use several branch channel networks in the preset multi-scale network to extract the sample features respectively to obtain several channel features; the convolution kernel sizes corresponding to each of the branch channel networks are different; the target tobacco leaf mildew detection model includes the convolutional feature extraction head, the preset multi-scale network and the fully connected layer; the channel features are spliced ​​using a preset splicing rule to obtain a spliced ​​feature to be processed, and the spliced ​​feature to be processed is processed using a preset channel attention mechanism to obtain a target connection feature; a target detection threshold is obtained from a preset database, and the target connection feature is processed based on the target detection threshold and using the fully connected layer to obtain a mildew detection result corresponding to the tobacco leaf image to be detected; the target detection threshold is a threshold obtained by processing the moldy sample using a preset clustering algorithm and a preset Gaussian distribution function.

[0042] It can be seen that the present application uses a convolutional feature extraction head to extract features from the tobacco leaf image to be detected in the input target tobacco leaf mildew detection model to obtain sample features, and uses several branch channel networks in the preset multi-scale network to extract sample features respectively to obtain several channel features; then, the channel features are spliced ​​using the preset splicing rules to obtain the splicing features to be processed, and the splicing features to be processed are processed using the preset channel attention mechanism to obtain the target connection features; finally, the target detection threshold is obtained from the preset database, and the target connection features are processed based on the target detection threshold and using the fully connected layer to obtain the mildew detection result corresponding to the tobacco leaf image to be detected. In this way, the speed and quality of detecting tobacco leaf mildew phenomena are improved, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0044] Figure 1 This is a flow chart of a tobacco leaf mildew detection method disclosed in this application;

[0045] Figure 2 A schematic diagram of the overall architecture of an integrated deep learning training and reasoning platform disclosed in this application;

[0046] Figure 3A schematic diagram of a flow chart of a full-process integrated model integration disclosed in this application;

[0047] Figure 4 A schematic diagram of a specific process for collecting and judging tobacco leaf images disclosed in this application;

[0048] Figure 5 This is a schematic diagram of the structure of a target tobacco leaf mildew detection model disclosed in this application;

[0049] Figure 6 A schematic diagram of a process for labeling tobacco leaf images disclosed in this application;

[0050] Figure 7 A schematic diagram of a data set partitioning process disclosed in this application;

[0051] Figure 8 A flowchart for iterating and optimizing a target tobacco leaf mildew detection model disclosed in the present application;

[0052] Fig. 9 A flowchart of the working principle of adjusting initial hyperparameters using a preset hyperparameter adaptive adjustment mechanism disclosed in the present application;

[0053] Fig.10 This is a schematic diagram of the distribution of a moldy area disclosed in this application;

[0054] Fig.11 A schematic diagram of a model detection result determined based on preset thresholds corresponding to different production stages disclosed in the present application;

[0055] Fig.12 This is a schematic diagram of the structure of a tobacco leaf mildew detection device disclosed in this application;

[0056] Fig.13 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] In the tobacco industry, quality inspection of tobacco leaf mildew is a crucial link that directly affects the quality and safety of tobacco products. The morphology and characteristics of tobacco leaf mildew are affected by many factors, including season, climate, and storage conditions. Changes in these factors can lead to differences in the type and degree of mildew. In addition, new types or characteristics of mildew may appear over time. At present, the accuracy of tobacco leaf mildew detection using machine learning models is largely affected by external factors. To this end, the present application provides a tobacco leaf mildew detection method that can improve the speed and quality of tobacco leaf mildew detection.

[0059] See also Figure 1 As shown, the embodiment of the present invention discloses a method for detecting tobacco leaf mildew, comprising:

[0060] Step S11, using a convolutional feature extraction head to extract features of the tobacco leaf image to be detected in the input target tobacco leaf mildew detection model to obtain sample features, and using several branch channel networks in a preset multi-scale network to extract the sample features respectively to obtain several channel features; the convolution kernel sizes corresponding to each of the branch channel networks are different; the target tobacco leaf mildew detection model includes the convolutional feature extraction head, the preset multi-scale network and the fully connected layer.

[0061] In this embodiment, the overall architecture diagram of the integrated deep learning training and reasoning platform is as follows: Figure 2As shown. Among them, the overall architecture of the learning, training and reasoning platform consists of an AI (Artificial Intelligence) hub and an AI edge end. In a specific embodiment, in the AI ​​hub end, the AI ​​computing power base is a computing power base that integrates Kunpeng processors, Ascend processors, Euler processors, Megahan inference servers, Megahan training servers and Megahan storage, which has the advantages of high computing density, high energy efficiency, easy scalability and easy management, and can meet the deployment requirements of large-scale data center clusters deployed in enterprise computer rooms. Furthermore, the embodiment of the present application adopts a heterogeneous computing architecture and an AI computing framework, which can perform model training services and centralized reasoning services. In addition, the AI ​​enabling platform integrates data collection and labeling, model training and distribution, and version management functions, thereby realizing end-to-end model development services. In another specific embodiment, the AI ​​edge includes edge AI intelligence, edge AI station, imaging system, automation components, automated production lines and equipment, and operation execution system, wherein the edge AI station includes image processing function, model reasoning function, early warning prompt function, automation control function and processor. In a specific embodiment, the processor includes but is not limited to Kunpeng processor, Ascend processor and Euler processor, and the operation execution system includes but is not limited to MES (Manufacturing Execution System), SCADA (Supervisory Control And Data Acquisition) and PLC (Programmable Logic Controller).

[0062] That is, the embodiment of the present application first uses an optical imaging instrument to collect the transmitted cigarette packs, and after the preset image processing operation, the obtained cigarette pack image is pushed to the model for reasoning, and the cigarette pack image corresponding to the data representing the detection abnormality is used to generate warning information for prompting, so as to realize the online detection of tobacco leaf mold. In addition, after the cigarette pack image is detected and reasoned, the cigarette pack image and the corresponding detection results are uploaded to the data storage unit of the AI ​​center through the network for storage, so that the tobacco leaf mold detection model can use the above-mentioned cigarette pack image and the corresponding detection results for self-learning operation. Among them, on the reasoning side, the computing framework of the embodiment of the present application uses CANN (Compute Architecture for Neural Networks) native operators to realize reasoning.

[0063] It is worth mentioning that the process diagram of the full-process integrated model is as follows Figure 3As shown. Among them, the image acquisition module is used to collect tobacco leaf images; the data artificial intelligence annotation module is used to annotate tobacco leaf images using preset AI technology; the model training and development module is used to build and train the tobacco leaf mildew detection model; the model distribution and version management module is used to ensure the stable operation and rapid iteration of the tobacco leaf mildew detection model; the model continuous iteration optimization module is used to further improve the accuracy and robustness of the tobacco leaf mildew detection model by continuously providing feedback and optimizing the tobacco leaf mildew detection model.

[0064] In this embodiment, when collecting tobacco leaf images, the embodiment of the present application needs to judge the eligibility of the collected tobacco leaf images, wherein the specific process of collecting and judging the tobacco leaf images is as follows: Figure 4 Specifically, before using the convolution feature extraction head to extract features from the tobacco leaf images to be detected in the target tobacco leaf mildew detection model, the method may also include: using a preset sample qualified detection model to screen a number of tobacco leaf images to be screened according to preset screening conditions to obtain a number of tobacco leaf images to be detected.

[0065] In a specific embodiment, the camera used to collect tobacco leaf images in the image acquisition module is a Hikvision MV-CH120-10GC camera, so as to use the above camera to perform optical imaging of tobacco leaves. In addition, an AI sample qualified detection model is integrated to train the AI ​​sample qualified detection model with several qualified samples and several unqualified samples, so as to use the obtained trained AI sample qualified detection model to identify unqualified samples in tobacco leaf images, such as too small an area of ​​tobacco leaves in the image, background interference or foreign matter. Specifically, before using the convolution feature extraction head to extract features from the tobacco leaf images to be detected in the input target tobacco leaf mildew detection model, it can also include: using a preset annotation technology to annotate each of the tobacco leaf images to be detected to obtain several annotated tobacco leaf images, and transmitting each of the annotated tobacco leaf images to the target tobacco leaf mildew detection model; each of the tobacco leaf images to be screened is an image obtained after a preset industrial camera acquires images of tobacco leaves in a tobacco leaf production environment.

[0066] It is worth mentioning that if the AI ​​sample qualification detection model detects samples that meet the requirements, it will upload the samples that meet the requirements to the preset AI central data storage unit, such as the cloud, through the network, and use the samples that meet the requirements as training data sets. At the same time, samples that do not meet the conditions will be automatically eliminated, thereby ensuring the quality of the data and the accuracy of subsequent analysis.

[0067] In this embodiment, after using the convolutional feature extraction head to extract features from the tobacco leaf image to be detected in the target tobacco leaf mildew detection model to obtain sample features, the embodiment of the present application needs to use several branch channel networks in the preset multi-scale network to extract sample features respectively to obtain several channel features. Among them, the structural schematic diagram of the target tobacco leaf mildew detection model is shown in FIG. Figure 5 First, a convolutional feature extraction head located at the model head of the target tobacco leaf mildew detection model is used to extract features of tobacco leaf samples input into the target tobacco leaf mildew detection model to obtain sample features.

[0068] In a specific implementation, the convolution kernel size of the convolution feature extraction head is 7x7, which can effectively increase the receptive field of the target tobacco leaf mildew detection model and improve the computational efficiency of the model. Subsequently, a multi-scale network is preset after the convolution feature extraction head to identify sample features.

[0069] It is worth mentioning that in order to solve the problem of vanishing model gradients, the embodiment of the present application introduces a residual module into the target tobacco leaf mildew detection model. Among them, the residual module adopts a jump connection in the forward propagation process of the model, so as to improve the model accuracy while alleviating the gradient vanishing situation. Specifically, the use of a convolutional feature extraction head to extract features of the tobacco leaf image to be detected input into the target tobacco leaf mildew detection model to obtain sample features, and using several branch channel networks in a preset multi-scale network to extract the sample features respectively to obtain several channel features, may include: using the convolutional feature extraction head to extract features of the tobacco leaf image to be detected input into the target tobacco leaf mildew detection model to obtain sample features; using the first branch channel network in the preset multi-scale network and the first preset residual module to extract the sample features to obtain the first channel features; using the preset multi-scale network The second branch channel network and the second preset residual module in the preset multi-scale network extract the sample features to obtain the second channel features; the third branch channel network and the third preset residual module in the preset multi-scale network are used to extract the sample features to obtain the third channel features; wherein the convolution kernel sizes corresponding to the first branch channel network, the second branch channel network and the third branch channel network are different; the scales of the first channel features, the second channel features and the third channel features are different; the first preset residual module, the second preset residual module and the third preset residual module all use jump connections.

[0070] Furthermore, in a specific embodiment, the preset multi-scale network includes three branch networks, and the convolution kernel sizes corresponding to the three branch networks are 3x3, 5x5 and 7x7, respectively, so as to use different convolution kernels to extract sample features respectively to obtain corresponding first channel features, second channel features and third channel features.

[0071] Step S12: splicing the channel features using a preset splicing rule to obtain a splicing feature to be processed, and processing the splicing feature to be processed using a preset channel attention mechanism to obtain a target connection feature.

[0072] It is worth mentioning that after obtaining the first channel features, the second channel features and the third channel features, the embodiment of the present application needs to fuse the features of different scales. Among them, in order to obtain the feature map of the same scale, the embodiment of the present application adopts a convolution method, that is, the first channel features are first spliced ​​with the second channel features, and then the spliced ​​results are spliced ​​with the third channel features. At the same time, in order to highlight the impact of different channels on the prediction results finally output by the model, a preset channel attention mechanism is connected to the output part to enhance or weaken the effects of different channels, thereby controlling the channel weights, and finally connecting a fully connected layer to output the results of the target tobacco leaf mildew detection model on the tobacco leaf image. Specifically, the splicing of each of the channel features using a preset splicing rule to obtain a splicing feature to be processed, and processing the splicing feature to be processed using a preset channel attention mechanism to obtain a target connection feature, may include: splicing the first channel feature with the second channel feature to obtain a splicing result, and splicing the splicing result with the third channel feature to obtain the splicing feature to be processed; based on user needs and using a preset channel attention mechanism, weighting the first channel feature, the second channel feature, and the third channel feature included in the splicing feature to be processed are respectively set, and the splicing feature to be processed is processed based on the corresponding weights to obtain the target connection feature.

[0073] In this embodiment, the process of labeling tobacco leaf images in the data labeling module is as follows: Figure 6 As shown:

[0074] First, the data set including several tobacco leaf images collected in the AI ​​central data storage unit is manually reviewed and annotated. In a specific embodiment, the data annotation module supports annotating tobacco leaf images into the XML (Extensible Markup Language) format of the Pascal VOC (Pattern Analysis, Statistical Modelling and Computational Learning VisualObject Classes, i.e., visual object classes for pattern analysis, statistical modeling and computational learning) data set or the TXT (Text File) format data set supported by YOLO (i.e., a target detection algorithm) to meet the needs of different deep learning models. In addition, the embodiment of the present application also integrates an artificial intelligence semi-supervised annotation model to fine-tune the artificial intelligence semi-supervised annotation model using manually annotated image data, so as to use the fine-tuned model to batch intelligently annotate image data. Among them, the artificial intelligence semi-supervised annotation model can be a deep learning model. It is worth mentioning that if the accuracy of the initial annotation of the tobacco leaf images by the annotation model fails to fully meet the use requirements, it can also be corrected by manual fine-tuning. In addition, the embodiment of the present application supports uploading already labeled image data and corresponding tags, and is compatible with the TXT mode of the YOLO structure and the XML format data set of Pascal VOC, thereby ensuring the flexibility and compatibility of data processing.

[0075] In this embodiment, in the process of training the target tobacco leaf mold detection model, the embodiment of the present application can configure the hyperparameters. It is understandable that the hyperparameters can be set according to industry experience, but the hyperparameters can also be adjusted according to specific needs. Among them, the embodiment of the present application can train the target tobacco leaf mold detection model and adjust the parameters based on the published data set. Among them, the above data set will be automatically divided into a training set, a validation set and a test set based on the preset division rules, such as Figure 7 As shown. First, select the computing power resources to be used in the AI ​​center to start the distributed training operation of several tobacco leaf mildew detection models to be trained, so as to obtain the corresponding tobacco leaf mildew detection models to be determined. Among them, during the training process, the embodiment of the present application supports real-time model verification to ensure the transparency and controllability of the training effect. Finally, the performance of several tobacco leaf mildew detection models to be determined is determined using the test set, so as to select the model with the best model performance and set it as the target tobacco leaf mildew detection model.

[0076] Specifically, before using the convolutional feature extraction head to extract features from the tobacco leaf image to be detected in the input target tobacco leaf mildew detection model, it can also include: dividing the preset data set into a training set, a validation set and a test set according to a preset division rule, and adjusting the initial hyperparameters using a preset hyperparameter adaptive adjustment mechanism to obtain target hyperparameters; using the training set, the validation set and the target hyperparameters to train several initial tobacco leaf mildew detection models to obtain several tobacco leaf mildew detection models to be tested, and storing each of the tobacco leaf mildew detection models to be tested and the corresponding model metadata to a preset model registry; using the test set to test each of the tobacco leaf mildew detection models to be tested in the preset model registry to obtain corresponding test scores, and setting the tobacco leaf mildew detection model to be tested corresponding to the test score with the largest value among the test scores as the target tobacco leaf mildew detection model.

[0077] It is worth mentioning that the model management module is responsible for selecting, issuing and versioning models, and can issue corresponding models to the end side for deployment according to user needs. In other words, the model management module provides centralized model management functions, making model rollback and training traceability simple and fast, and improving the efficiency and convenience of model management.

[0078] In this embodiment, after the target tobacco leaf mildew detection model is deployed online, the embodiment of the present application can continuously iterate the model according to a preset cycle, wherein the flowchart for iterating and optimizing the target tobacco leaf mildew detection model is as follows: Figure 8 As shown. First, the embodiment of the present application needs to continuously collect tobacco leaf sample images from the production environment to input the collected tobacco leaf sample images into the target tobacco leaf mildew detection model, so that the target tobacco leaf mildew detection model can detect the collected tobacco leaf sample images to obtain the detection results. While the target tobacco leaf mildew detection model is detecting the collected tobacco leaf sample images, the model performance monitoring module continues to monitor the target tobacco leaf mildew detection model to determine the moldy samples correctly detected by the model, the non-moldy samples correctly detected by the model, the samples missed by the model, and the samples falsely reported by the model, so as to display the abnormal data in the user interface in time for manual review and screening. It is worth mentioning that the screened samples can be uploaded to the AI ​​central data storage unit via the network to provide new samples for the continuous optimization of the model, thereby enhancing the generalization ability of the model.

[0079] In this embodiment, the selection and adjustment of hyperparameters have a decisive influence on the model detection performance of the target tobacco leaf mold detection model, wherein the model detection performance includes the convergence speed, accuracy and generalization ability of the model. The above-mentioned hyperparameters include learning rate, optimizer, batch size, network structure, regularization, number of training rounds, Dropout rate (i.e., the proportion of randomly discarded neurons), activation function and loss function. Therefore, the embodiment of the present application introduces a preset hyperparameter adaptive adjustment mechanism to adjust the initial hyperparameters. Among them, the working principle of adjusting the initial hyperparameters using the preset hyperparameter adaptive adjustment mechanism is as follows Fig. 9 As shown:

[0080] First, at the AI ​​center end of the system, the embodiment of the present application needs to obtain a pre-released sample set from the data storage unit, and set the type of hyperparameters to be tuned and the recommended value range of the hyperparameters. Among them, the recommended value range of the hyperparameters is a value range that is pre-set based on prior knowledge. Then, the model tuning process is started. In the process of tuning the initial hyperparameters, since the mildew characteristics are greatly affected by factors such as season, temperature and weather, fixed hyperparameters often cannot achieve the best results. Therefore, the embodiment of the present application needs to optimize the model based on different production batches, different production scenarios, and different production lines using an adaptive adjustment mechanism for model hyperparameters, thereby significantly improving the generalization performance of the model. Specifically, the use of a preset hyperparameter adaptive adjustment mechanism to adjust the initial hyperparameters to obtain target hyperparameters may include: using preset experience information to set the type and value range corresponding to the initial hyperparameters to obtain the corresponding hyperparameter type and hyperparameter value range; determining the target hyperparameter type and the target hyperparameter value range from the hyperparameter type and the hyperparameter value range based on tobacco production batches, tobacco production scenarios, and tobacco production lines, and combining the target hyperparameter type and the target hyperparameter value range to obtain the target hyperparameter.

[0081] Step S13, based on the target detection threshold and using the fully connected layer to process the target connection feature, to obtain a mold detection result corresponding to the tobacco leaf image to be detected; the target detection threshold is a threshold obtained by processing the moldy sample using a preset clustering algorithm and a preset Gaussian distribution function.

[0082] Furthermore, when the tobacco leaf sample to be detected passes through the detection model, in order to balance the model recall rate and the false alarm rate, the embodiment of the present application needs to use a preset threshold to determine whether the tobacco leaf sample to be detected is moldy. Among them, the preset threshold is set according to prior knowledge or a commonly used default value, but such a setting does not conform to the actual situation of tobacco leaf detection. Therefore, the embodiment of the present application can obtain a number of moldy samples from the preset moldy sample library, and process each of the moldy samples to obtain the preset threshold. Specifically, before the target connection feature is processed based on the target detection threshold and using the fully connected layer, it may also include: obtaining a number of the moldy samples from a preset moldy sample library, and processing each of the moldy samples to obtain moldy area coordinate information corresponding to each of the moldy samples; each of the moldy samples corresponds to a different tobacco production cycle, tobacco production season and tobacco variety; using the preset clustering algorithm to process the moldy area coordinate information respectively to obtain sample data corresponding to the moldy samples; using the preset Gaussian distribution function to fit the sample data to obtain the corresponding fitting result, and setting the peak value in the fitting result as the target detection threshold.

[0083] When the mold feature value of a certain area in the tobacco leaf image to be detected exceeds a preset threshold, the embodiment of the present application may consider that the corresponding area has moldy, where the mold feature value includes but is not limited to the quantized value of color features, texture features, and shape features.

[0084] In a specific embodiment, the preset clustering algorithm is the DBSCAN algorithm (Density-Based Spatial Clustering of Applications with Noise, i.e., a density-based spatial clustering algorithm). The embodiment of the present application can first obtain the specific coordinate position of the moldy area based on the moldy sample identified by the target cigarette package mold detection model. Subsequently, the DBSCAN algorithm is used to eliminate the noise points in the moldy sample image to reduce the impact of the model's false detection area on the detection results. Then, a Gaussian distribution function is used to fit the data points, and the peak value of the central area of ​​the Gaussian distribution is used as the selected threshold. Among them, the core concept of the DBSCAN algorithm is to cluster based on the density of sample points, and to divide different clusters by identifying high-density areas in the sample space. Since the growth characteristics of mold in the moldy area are usually spreading growth and appearing in clusters, in a specific embodiment, the distribution diagram of the moldy area is as follows Fig.10 As shown, the embodiment of the present application first selects the moldy area, obtains the position coordinates of the center point of each moldy area, sets the neighborhood radius of DBSCAN to 1, the minimum number of points to 2, and performs clustering, and then classifies the coordinate points that meet the clustering conditions into the same cluster, while the noise points that do not meet the conditions are excluded. Fig.10 The four points in the upper left corner are clustered together, the two points in the lower left corner also form a cluster, and the isolated point in the lower right corner is removed.

[0085] Furthermore, after using the DBSCAN algorithm to process and remove the noise from the sample data, the embodiment of the present application uses a Gaussian function to fit the sample data, and sets the peak threshold of the Gaussian distribution as the preset threshold of the current stage. It is worth mentioning that when the preset threshold is adjusted accordingly at different production stages, the model detection results obtained are as follows: Fig.11 As shown in the figure, the line above the picture is the recognition rate, and the line below the picture is the false alarm rate.

[0086] As can be seen from the above, before performing tobacco leaf mildew detection, the embodiment of the present application needs to use a convolutional feature extraction head to extract features of the tobacco leaf image to be detected in the input target tobacco leaf mildew detection model to obtain sample features, and use several branch channel networks in the preset multi-scale network to extract the sample features respectively to obtain several channel features; the convolution kernel sizes corresponding to each of the branch channel networks are different; the target tobacco leaf mildew detection model includes the convolutional feature extraction head, the preset multi-scale network and the fully connected layer; the channel features are spliced ​​using a preset splicing rule to obtain a splicing feature to be processed, and the splicing feature to be processed is processed using a preset channel attention mechanism to obtain a target connection feature; a target detection threshold is obtained from a preset database, and the target connection feature is processed based on the target detection threshold and using the fully connected layer to obtain a mildew detection result corresponding to the tobacco leaf image to be detected; the target detection threshold is a threshold obtained by processing the moldy sample using a preset clustering algorithm and a preset Gaussian distribution function. In this way, the speed and quality of detecting tobacco leaf mold are improved, thereby enhancing the user experience.

[0087] Accordingly, see Fig.12 As shown, the present application also provides a tobacco leaf mildew detection device, comprising:

[0088] The feature extraction module 11 is used to extract features of the tobacco leaf image to be detected in the target tobacco leaf mildew detection model using a convolutional feature extraction head to obtain sample features, and to extract the sample features respectively using a plurality of branch channel networks in a preset multi-scale network to obtain a plurality of channel features; the convolution kernel sizes corresponding to the branch channel networks are different; the target tobacco leaf mildew detection model includes the convolutional feature extraction head, the preset multi-scale network and the fully connected layer;

[0089] A feature splicing module 12 is used to splice the channel features using a preset splicing rule to obtain a splicing feature to be processed, and to process the splicing feature to be processed using a preset channel attention mechanism to obtain a target connection feature;

[0090] The detection result determination module 13 is used to process the target connection feature based on the target detection threshold and using the fully connected layer to obtain a mold detection result corresponding to the tobacco leaf image to be detected; the target detection threshold is a threshold obtained by processing the moldy sample using a preset clustering algorithm and a preset Gaussian distribution function.

[0091] As can be seen from the above, before the tobacco leaf mildew detection is performed in the embodiment of the present application, it is necessary to use the convolutional feature extraction head to extract features of the tobacco leaf image to be detected in the input target tobacco leaf mildew detection model to obtain sample features, and use several branch channel networks in the preset multi-scale network to extract sample features respectively to obtain several channel features; then, use the preset splicing rules to splice the channel features to obtain the splicing features to be processed, and use the preset channel attention mechanism to process the splicing features to be processed to obtain the target connection features; finally, obtain the target detection threshold from the preset database, and process the target connection features based on the target detection threshold and using the fully connected layer to obtain the mildew detection result corresponding to the tobacco leaf image to be detected. In this way, the speed and quality of detecting tobacco leaf mildew phenomena are improved, thereby improving the user experience.

[0092] In some specific embodiments, the tobacco leaf mildew detection device may further include:

[0093] An image screening unit, used to screen a number of tobacco leaf images to be screened according to preset screening conditions using a preset sample qualified detection model, so as to obtain a number of tobacco leaf images to be detected;

[0094] An image annotation unit is used to annotate each of the tobacco leaf images to be detected using a preset annotation technology to obtain a plurality of annotated tobacco leaf images, and transmit each of the annotated tobacco leaf images to the target tobacco leaf mildew detection model; each of the tobacco leaf images to be screened is an image obtained after a preset industrial camera collects images of the tobacco leaves in a tobacco leaf production environment.

[0095] In some specific embodiments, the tobacco leaf mildew detection device may further include:

[0096] A data set partitioning unit, used to partition a preset data set into a training set, a validation set, and a test set according to a preset partitioning rule, and to adjust the initial hyperparameters using a preset hyperparameter adaptive adjustment mechanism to obtain target hyperparameters;

[0097] A model training unit, used for training a plurality of initial tobacco leaf mildew detection models using the training set, the validation set and the target hyperparameters to obtain a plurality of tobacco leaf mildew detection models to be tested, and storing each of the tobacco leaf mildew detection models to be tested and the corresponding model metadata to a preset model registry;

[0098] The model testing unit is used to use the test set to test each of the tobacco leaf mildew detection models to be tested in the preset model registration table to obtain corresponding test scores, and set the tobacco leaf mildew detection model to be tested corresponding to the test score with the largest value among the test scores as the target tobacco leaf mildew detection model.

[0099] Accordingly, in some specific embodiments, the tobacco leaf mildew detection device may further include:

[0100] A hyperparameter setting unit, used to set the type and value range corresponding to the initial hyperparameter using preset experience information to obtain the corresponding hyperparameter type and hyperparameter value range;

[0101] A hyperparameter determination unit is used to determine a target hyperparameter type and a target hyperparameter value range from the hyperparameter type and the hyperparameter value range based on tobacco production batches, tobacco production scenarios, and tobacco production lines, and combine the target hyperparameter type and the target hyperparameter value range to obtain the target hyperparameter; wherein the target hyperparameter includes a learning rate, an optimizer, a batch size, a network structure, regularization, a number of training rounds, a Dropout rate, an activation function, and a loss function.

[0102] In some specific implementations, the feature extraction module 11 may specifically include:

[0103] A sample feature extraction unit, used for extracting features of the tobacco leaf image to be detected input into the target tobacco leaf mildew detection model using the convolution feature extraction head to obtain sample features;

[0104] A first channel feature extraction unit, configured to extract the sample feature by using a first branch channel network and a first preset residual module in the preset multi-scale network to obtain a first channel feature;

[0105] A second channel feature extraction unit, used to extract the sample features by using a second branch channel network and a second preset residual module in the preset multi-scale network to obtain a second channel feature;

[0106] A third channel feature extraction unit is used to extract the sample features using the third branch channel network and the third preset residual module in the preset multi-scale network to obtain a third channel feature; wherein the convolution kernel sizes corresponding to the first branch channel network, the second branch channel network and the third branch channel network are different; the scales of the first channel feature, the second channel feature and the third channel feature are different; the first preset residual module, the second preset residual module and the third preset residual module all use jump connections.

[0107] In some specific implementations, the feature splicing module 12 may specifically include:

[0108] A feature stitching unit, configured to stitch the first channel feature with the second channel feature to obtain a stitching result, and stitch the stitching result with the third channel feature to obtain a stitching feature to be processed;

[0109] A weight setting unit is used to set weights for the first channel feature, the second channel feature, and the third channel feature included in the splicing feature to be processed based on user needs and using a preset channel attention mechanism, and process the splicing feature to be processed based on the corresponding weights to obtain a target connection feature.

[0110] In some specific embodiments, the tobacco leaf mildew detection device may further include:

[0111] A moldy sample acquisition unit is used to acquire a number of moldy samples from a preset moldy sample library, and process each moldy sample to obtain moldy area coordinate information corresponding to each moldy sample; each moldy sample corresponds to a different tobacco production cycle, tobacco production season, and tobacco variety;

[0112] A sample data acquisition unit, used to process the moldy area coordinate information respectively by using the preset clustering algorithm to obtain sample data corresponding to the moldy sample;

[0113] The sample data fitting unit is used to fit the sample data using the preset Gaussian distribution function to obtain a corresponding fitting result, and set a peak value in the fitting result as a target detection threshold.

[0114] Furthermore, the present application also discloses an electronic device. Fig.13It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the tobacco leaf mildew detection method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0115] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0116] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0117] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the tobacco leaf mildew detection method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0118] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the tobacco leaf mildew detection method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.

[0119] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0120] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0121] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0122] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0123] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for detecting tobacco leaf mildew, characterized in that: include: A convolutional feature extraction head is used to extract features of a tobacco leaf image to be detected in an input target tobacco leaf mildew detection model to obtain sample features, and several branch channel networks in a preset multi-scale network are used to extract the sample features respectively to obtain several channel features; the convolution kernel sizes corresponding to the branch channel networks are different; the target tobacco leaf mildew detection model includes the convolutional feature extraction head, the preset multi-scale network and a fully connected layer; Using a preset splicing rule to splice the channel features to obtain a splicing feature to be processed, and using a preset channel attention mechanism to process the splicing feature to be processed to obtain a target connection feature; Based on the target detection threshold and using the fully connected layer to process the target connection feature, a mold detection result corresponding to the tobacco leaf image to be detected is obtained; the target detection threshold is a threshold obtained by processing the moldy sample using a preset clustering algorithm and a preset Gaussian distribution function.

2. The method for detecting tobacco leaf mildew according to claim 1, characterized in that: Before the convolution feature extraction head is used to extract features from the tobacco leaf image to be detected in the target tobacco leaf mildew detection model, the method further includes: Using a preset sample qualified detection model to screen a number of tobacco leaf images to be screened according to preset screening conditions to obtain a number of tobacco leaf images to be detected; Each of the tobacco leaf images to be inspected is annotated using a preset annotation technology to obtain a number of annotated tobacco leaf images, and each of the annotated tobacco leaf images is transmitted to the target tobacco leaf mildew detection model; each of the tobacco leaf images to be screened is an image obtained after a preset industrial camera collects images of the tobacco leaves in a tobacco leaf production environment.

3. The method for detecting tobacco leaf mildew according to claim 1, characterized in that: Before the convolution feature extraction head is used to extract features from the tobacco leaf image to be detected in the target tobacco leaf mildew detection model, the method further includes: Divide the preset data set into a training set, a validation set, and a test set according to the preset division rules, and use the preset hyperparameter adaptive adjustment mechanism to adjust the initial hyperparameters to obtain the target hyperparameters; Training a plurality of initial tobacco leaf mildew detection models using the training set, the validation set, and the target hyperparameters to obtain a plurality of tobacco leaf mildew detection models to be tested, and storing each of the tobacco leaf mildew detection models to be tested and the corresponding model metadata in a preset model registry; The test set is used to test each of the tobacco leaf mildew detection models to be tested in the preset model registration table to obtain corresponding test scores, and the tobacco leaf mildew detection model to be tested corresponding to the test score with the largest value among the test scores is set as the target tobacco leaf mildew detection model.

4. The method for detecting tobacco leaf mildew according to claim 3, characterized in that: The method of adjusting the initial hyperparameters by using a preset hyperparameter adaptive adjustment mechanism to obtain target hyperparameters includes: Using preset experience information to set the type and value range corresponding to the initial hyperparameter to obtain the corresponding hyperparameter type and hyperparameter value range; Determine a target hyperparameter type and a target hyperparameter value range from the hyperparameter type and the hyperparameter value range based on tobacco production batches, tobacco production scenarios, and tobacco production lines, and combine the target hyperparameter type and the target hyperparameter value range to obtain a target hyperparameter; The target hyperparameters include learning rate, optimizer, batch size, network structure, regularization, number of training rounds, Dropout rate, activation function and loss function.

5. The method for detecting tobacco leaf mildew according to claim 1, characterized in that: The convolution feature extraction head is used to extract features of the tobacco leaf image to be detected in the target tobacco leaf mildew detection model to obtain sample features, and several branch channel networks in the preset multi-scale network are used to extract the sample features respectively to obtain several channel features, including: Using the convolutional feature extraction head to extract features from the tobacco leaf image to be detected input into the target tobacco leaf mildew detection model to obtain sample features; Extracting the sample features using a first branch channel network and a first preset residual module in the preset multi-scale network to obtain a first channel feature; Extracting the sample features using a second branch channel network and a second preset residual module in the preset multi-scale network to obtain second channel features; Extracting the sample features using a third branch channel network and a third preset residual module in the preset multi-scale network to obtain a third channel feature; Among them, the convolution kernel sizes corresponding to the first branch channel network, the second branch channel network and the third branch channel network are different; the scales of the first channel feature, the second channel feature and the third channel feature are different; the first preset residual module, the second preset residual module and the third preset residual module all use jump connections.

6. The method for detecting tobacco leaf mildew according to claim 5, characterized in that: The method of splicing the channel features using a preset splicing rule to obtain a splicing feature to be processed, and processing the splicing feature to be processed using a preset channel attention mechanism to obtain a target connection feature, includes: Splicing the first channel feature with the second channel feature to obtain a splicing result, and splicing the splicing result with the third channel feature to obtain a splicing feature to be processed; Based on user needs and using a preset channel attention mechanism, weights are set for the first channel feature, the second channel feature, and the third channel feature included in the splicing feature to be processed, and the splicing feature to be processed is processed based on the corresponding weights to obtain the target connection feature.

7. The method for detecting tobacco leaf mildew according to any one of claims 1 to 6, characterized in that: Before processing the target connection feature based on the target detection threshold and using the fully connected layer, the method further includes: Acquire a number of moldy samples from a preset moldy sample library, and process each of the moldy samples to obtain moldy area coordinate information corresponding to each of the moldy samples; each of the moldy samples corresponds to a different tobacco production cycle, tobacco production season, and tobacco variety; Using the preset clustering algorithm to process the moldy area coordinate information respectively to obtain sample data corresponding to the moldy sample; The sample data is fitted using the preset Gaussian distribution function to obtain a corresponding fitting result, and a peak value in the fitting result is set as a target detection threshold.

8. A tobacco leaf mildew detection device, characterized in that: include: A feature extraction module, used for extracting features of a tobacco leaf image to be detected in an input target tobacco leaf mildew detection model using a convolutional feature extraction head to obtain sample features, and extracting the sample features respectively using a plurality of branch channel networks in a preset multi-scale network to obtain a plurality of channel features; the convolution kernel sizes corresponding to the branch channel networks are different; the target tobacco leaf mildew detection model includes the convolutional feature extraction head, the preset multi-scale network and a fully connected layer; A feature splicing module, used for splicing the channel features using a preset splicing rule to obtain a splicing feature to be processed, and processing the splicing feature to be processed using a preset channel attention mechanism to obtain a target connection feature; The detection result determination module is used to process the target connection features based on the target detection threshold and using the fully connected layer to obtain a mold detection result corresponding to the tobacco leaf image to be detected; the target detection threshold is a threshold obtained by processing the moldy sample using a preset clustering algorithm and a preset Gaussian distribution function.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the tobacco leaf mildew detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the steps of the tobacco leaf mildew detection method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Process parameter prediction control method and system in tobacco leaf feeding process, medium and terminal

    CN120802644A