A method and system for identifying flower species

Through image processing technology, including GrabCut segmentation, image enhancement and convolutional network integration, accurate identification of flower types is achieved, solving the problems of inaccuracy and labor intensity of traditional identification methods, and promoting the automation and information management of flower breeding. .

CN112116598BActive Publication Date: 2024-10-29BEIJING RES CENT FOR INFORMATION TECH & AGRI
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202010773803.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-04
Publication Date
2024-10-29
Estimated Expiration
2040-08-04

AI Technical Summary

Technical Problem

Traditional artificial flower species identification methods rely on the professional skills of breeding experts. They have problems such as inaccurate identification results, high labor intensity, and strong subjectivity. It is difficult to achieve automated, informatized, and intelligent management of flower breeding.

Method used

Use image acquisition equipment to collect color images of flowers, and achieve accurate identification of flower types through GrabCut segmentation, guided filtering image enhancement, bilinear interpolation normalization and convolution network integration, and associate the identification results with the breeding information management system .

Benefits of technology

It achieves rapid and accurate identification of flower types, overcomes the problems of inaccurate identification results and high labor intensity, and promotes information management and precise selection of flower breeding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112116598B_ABST
    Figure CN112116598B_ABST
Patent Text Reader

Abstract

The present invention provides a flower species identification method and system, including: collecting color images of flowers; using a GrabCut-based image segmentation method to perform image segmentation and accurately extract flower regions; using a guided filter-based image enhancement method to perform image preprocessing; normalizing the flower regions; using a convolutional network integration method to identify flower species; uploading the identification results and the flower color images to a flower breeding information management system for storage; and searching for breeding materials, experiments and other breeding information related to the flower breeding information management system based on the identification results, and associating them with the flower color images. The method provided by the present invention can overcome the problems of inaccurate flower species identification and high labor intensity in the existing technology, and can also be applied to mobile terminals such as smart phones, suitable for field operations, broaden the scope of application of the method, and advantageously promote the informatization and intelligent development of flower breeding management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital image processing, and in particular to a flower species recognition method and system. Background Art

[0002] Flower species identification is an important part of the information management of flower breeding. Traditional manual identification methods often require breeding experts to determine the genus of flowers by visually observing the overall morphological characteristics of flowers (including flower color, flower shape, flower quantity, etc.). This method has significant problems such as the recognition results relying on the professional and technical level of the breeders, high labor intensity, and strong subjectivity in identification, which can easily lead to inaccurate flower species identification.

[0003] With the rapid development of information technology, especially the popularization of mobile image acquisition terminals such as digital cameras and smart phones, it has become very convenient to collect flower images. Breeders can take flower images at will, analyze and process flower images through computer vision technology, and accurately identify the types of flowers. On this basis, the collected flower images are associated with relevant breeding materials, experiments and other information, so as to achieve accurate management of flower breeding.

[0004] Therefore, it is urgent to study a flower species identification method based on flower images with good stability and accurate recognition results, so as to realize the automation, informatization and intelligence of flower breeding management, and thus achieve the precise selection and breeding of flower varieties. Summary of the invention

[0005] The present invention provides a flower species identification method and system, which are used to solve the defect of low flower species identification accuracy in the prior art and realize accurate identification of flower species.

[0006] The present invention provides a method for identifying flower species, comprising:

[0007] Using image acquisition equipment to collect color images of flowers;

[0008] Segmenting the initial color image of the target flower to extract the flower region in the initial color image;

[0009] Based on an image enhancement algorithm, the flower region is processed to obtain an enhanced flower region;

[0010] Normalizing the enhanced flower region to obtain a normalized flower region;

[0011] Using a convolutional network integration method to identify the flower species in the normalized flower area, and obtaining the species of the target flower;

[0012] Uploading the recognition result of the flower image and the initial flower color image to a flower breeding information management system for storage;

[0013] According to the recognition result of the flower image, the breeding information such as breeding materials and experiments related thereto is searched in the flower breeding information management system, and is associated with the initial flower color image.

[0014] According to the flower species identification method of the present invention, the segmentation of the initial color image of the target flower is specifically implemented by the GrabCut image segmentation method, and the specific steps are as follows:

[0015] S11, manually marking the largest rectangular area including the flower in the initial color image Img1 to form a first color image Img 1-1 ;

[0016] S12, in the first color image Img 1-1 In the process, the flower position and the background position are manually marked and set as the initial value of the GrabCut algorithm;

[0017] S13, using the GrabCut algorithm to segment the initial color image Img1 to form a second color image Img 1-2 ;

[0018] S14: if the second color image Img 1-2 The background area is no longer included in the second color image Img, that is, there is no background area to be identified. 1-2 That is the segmented flower area Img2;

[0019] Otherwise, the second color image Img 1-2 Instead of the first color image Img 1-1 , repeat S12 to S14 until the second color image Img is finally obtained 1-2 The background area is no longer included in the second color image Img 1-2 As the segmented flower area Img2.

[0020] According to the flower species identification method of the present invention, the flower region is processed based on the image enhancement algorithm, which is specifically implemented by an image enhancement method based on guided filtering. The specific steps are as follows:

[0021] S21, convert the segmented flower area Img2 from RGB color space to CIEL * a * b * Color space;

[0022] S22, using the brightness distribution characteristics to calculate the enhancement weight w of the detail image, the calculation formula is as follows:

[0023]

[0024] in, and They are the brightness space L * The maximum and average brightness values ​​of all pixels in the image, δ is a fixed constant;

[0025] S23, using a guided filtering algorithm to smooth the segmented flower region Img2, and divide it into a detail image d and a basic image q;

[0026] S24, the weighted detail image is fused with the basic image, and the fusion formula is as follows:

[0027] Img2=w×d+q,

[0028] The segmented flower region Img2 is enhanced to obtain an enhanced flower region Img3.

[0029] According to the flower species identification method of the present invention, the enhanced flower region is normalized to obtain the normalized flower region, and the specific steps are as follows:

[0030] S31, using a bilinear interpolation method to normalize the enhanced flower region Img3 into an image of size m×n to form a third color image Img 3-1 , where m and n are the width and height of the normalized image, respectively, and the unit is pixel;

[0031] S32, the third color image Img 3-1 Convert the color image into TFRecord format to form a normalized color image Img4.

[0032] According to the flower species identification method of the present invention, the convolutional network integration method mainly includes the following steps:

[0033] S41, select a deep network model pre-trained on the ILSVRC-2012-CLS dataset, such as the MobileNet network, as a single classifier model;

[0034] S42, constructing a flower type image sample set, which is divided into a training set, a validation set, and a test set, wherein the training set includes flower samples of different categories and a label for each flower sample;

[0035] S43, retraining each pre-trained single classifier based on the resampling technology and the training set to form K single classifiers with differences;

[0036] S44, counting the recognition rate of each single classifier on the verification set, and calculating the integration weight of the convolutional network based on the recognition rate, and the calculation formula is as follows:

[0037]

[0038] Among them, R i is the recognition rate of the i-th single classifier on the validation set, λ i is the weight corresponding to the i-th single classifier;

[0039] S45, each single classifier recognizes the normalized flower region respectively, and the recognition results of each single classifier are integrated using a linear weighted method, and the calculation formula is as follows:

[0040]

[0041] Among them, x is the normalized flower area, f i (x) is the recognition result of the i-th single classifier on image x, λ i is the weight corresponding to the i-th single classifier, and F(x) is the integrated recognition result;

[0042] S46, outputting the recognition result of the type of the target flower.

[0043] The embodiment of the present invention further provides a flower species identification system, comprising:

[0044] An acquisition module, used for acquiring an initial color image of a target flower;

[0045] A segmentation module, used to segment the initial color image and extract the flower area in the initial color image;

[0046] An enhancement module, used for processing the flower region based on an image enhancement algorithm to obtain an enhanced flower region;

[0047] A normalization module, used for normalizing the enhanced flower region to obtain a normalized flower region;

[0048] An identification module, used to identify the normalized flower area using a convolutional network integration method to obtain the type of the target flower;

[0049] A saving module, used for uploading the identification result of the type of the target flower and the initial color image to a flower breeding information management system for saving;

[0050] The association module is used to search for relevant breeding information such as breeding materials and experiments in the flower breeding information management system according to the identification result of the type of the target flower, and associate it with the initial color image.

[0051] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned flower species identification methods are implemented.

[0052] An embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any of the above-mentioned flower species identification methods are implemented.

[0053] The embodiments of the present invention provide a flower species identification method and system, which can realize rapid and accurate identification of flower species, and overcome the problems of inaccurate identification results and high labor intensity in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] Figure 1 A flow chart of a flower species identification method provided by an embodiment of the present invention;

[0056] Figure 2 A schematic diagram of the training and recognition process of a convolutional network provided in an embodiment of the present invention;

[0057] Figure 3 A structural schematic diagram of a flower species identification system provided by an embodiment of the present invention;

[0058] Figure 4 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0060] Figure 1 A flow chart of a method for identifying flower species provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes:

[0061] S1, collect the initial color image of the target flower;

[0062] Specifically, firstly, an initial color image of the target flower is collected, and the initial color image of the target flower can be obtained through a device such as a camera or a mobile phone.

[0063] S2, segmenting the initial color image to extract the flower area in the initial color image;

[0064] Specifically, the initial color image includes flowers and background. By segmenting the initial color image, the flowers and the background can be distinguished and the flower area can be extracted.

[0065] S3, processing the flower region based on an image enhancement algorithm to obtain an enhanced flower region;

[0066] Specifically, the useful information in the image can be enhanced through the image enhancement algorithm, which can be a distortion process, the purpose of which is to improve the visual effect of the image for the application of a given image.

[0067] Image enhancement algorithms can be used to purposefully emphasize the overall or local characteristics of an image, making an originally unclear image clear or emphasizing certain features of interest, expanding the differences between features of different objects in the image, and suppressing features of no interest, thereby improving image quality, enriching the amount of information, and enhancing image interpretation and recognition effects to meet the needs of certain special analyses.

[0068] It should be noted that, by placing the image enhancement algorithm after image segmentation, only the extracted flower area needs to be enhanced, without the need to enhance the entire initial color image, which reduces the computational complexity of the algorithm to a certain extent, thereby improving computational efficiency.

[0069] S4, performing normalization processing on the enhanced flower region to obtain a normalized flower region;

[0070] Since the formats and sizes of the initial color images taken by different devices are different, in order to facilitate subsequent processing, this scheme can adapt to images of different sizes and formats, normalize the images, convert the flower area into a standard format and standard size, and finally obtain the normalized flower area.

[0071] S5, using a convolutional network integration method to identify the normalized flower region to obtain the type of the target flower;

[0072] By inputting the normalized flower area into each single convolutional network (single convolutional network can also be called a single classifier), the recognition results of each single classifier for the type of the target flower can be obtained, and the type of the target flower can be obtained by linearly integrating the recognition results of each single classifier. Among them, the convolutional network integration in the embodiment of the present invention is composed of several single classifiers, the number of single classifiers can be pre-set, and the final recognition result of the target flower type is obtained by integrating the recognition results of each single classifier.

[0073] Among them, the type of each single classifier can be the same or different. For example, commonly used single classifiers include AlexNet network, Inception network, Resnet network, Desnet network and MobileNet network, etc. The convolutional network ensemble in the embodiment of the present invention can be composed of several AlexNet networks, or it can be composed of three types of networks: AlexNet network, Inception network, and Resnet network, or several MobileNet networks can be used, etc., which is determined according to the actual situation.

[0074] S6, uploading the recognition result and the initial color image to the flower breeding information management system for storage.

[0075] Specifically, the "Golden Seed" breeding cloud platform is preferred as the flower breeding information management system.

[0076] S7, according to the recognition result, searching for breeding information such as breeding materials and experiments related to the flower breeding information management system, and associating the information with the initial color image.

[0077] The embodiment of the present invention provides a flower species identification method, which can realize rapid and accurate identification of flower species, and overcome the problems of inaccurate identification results and high labor intensity in the prior art.

[0078] Based on the above embodiments, preferably, Figure 2 A schematic diagram of the training and recognition process of a convolutional network provided in an embodiment of the present invention, such as Figure 2 As shown, a deep convolutional network model pre-trained on the ILSVRC-2012-CLS dataset is selected as a pre-trained single classifier. Then, each single classifier is transferred to the training set of flower species images through transfer learning. Based on the resampling technology and the training set of the flower species images, each pre-trained single classifier is re-trained to obtain the final single classifiers, and each single classifier is used to identify the image to be identified, and the recognition results of each single classifier are integrated to obtain the final recognition result of the target flower species in the image.

[0079] Based on the above embodiment, preferably, the segmenting of the initial color image of the target flower specifically includes:

[0080] The initial color image of the target flower is segmented using the GrabCut image segmentation method.

[0081] Specifically, based on the GrabCut image segmentation method, the initial color image Img1 of the target flower is segmented, which mainly includes the following steps:

[0082] S11, manually mark the largest rectangular area containing the flower in the initial color image Img1 to form a first color image Img 1-1 .

[0083] S12, in the first color image Img 1-1 In the image above, manually mark the location of the flower and the background, and set them as the initial values ​​of GrabCut.

[0084] S13, using the GrabCut algorithm to segment the color image Img1 to form a second color image Img 1-2 .

[0085] S14: If the second color image Img 1-2 The background area is no longer included in the second color image Img, that is, there is no background area to be identified. 1-2 That is the segmented flower area Img2;

[0086] Otherwise, the second color image Img 1-2 Replace the first color image Img 1-1 , repeat S12 to S14, and the other processes are analogous.

[0087] Based on the above embodiment, preferably, the flower region is processed based on an image enhancement algorithm, specifically including:

[0088] The flower region is processed by an image enhancement method based on guided filtering.

[0089] Specifically, the image enhancement method based on guided filtering mainly includes the following steps:

[0090] S21, convert the segmented flower area Img2 from RGB color space to CIEL * a * b * Color space.

[0091] S22, using the brightness distribution characteristics to calculate the enhancement weight w of the detail image, the calculation formula is as follows:

[0092]

[0093] in, and They are the brightness space L * The maximum and average brightness values ​​of all pixels in the image are given in Figure 1. δ is a fixed constant whose value can be determined by experiment.

[0094] In the embodiment of the present invention, preferably δ=10.

[0095] S23, using a guided filtering algorithm to smooth the segmented flower region Img2, and divide it into a detail image d and a basic image q.

[0096] S24, the weighted detail image is fused with the basic image, and the fusion formula is as follows:

[0097] Img2=w×d+q,

[0098] The segmented flower region Img2 is enhanced to obtain an enhanced flower region Img3.

[0099] It should also be noted that the normalization process of the enhanced flower area mainly includes the following steps:

[0100] S31, using a bilinear interpolation method to normalize the enhanced flower region Img3 into an image of size m×n to form a third color image Img 3-1 , where m and n are the width and height of the scaled image, respectively, in pixels.

[0101] In this embodiment, preferably m=100 and n=100.

[0102] S32, the third color image Img 3-1 Convert the image into a color image in TFRecord format to form the normalized flower area Img4.

[0103] Based on the above embodiment, preferably, the method of using convolutional network integration to identify the type of target flowers comprises the following specific steps:

[0104] S41, select the deep network model pre-trained on the ILSVRC-2012-CLS dataset as the single classifier model;

[0105] Specifically, the pre-trained deep network model can be selected according to the actual application, such as AlexNet network, Inception network, Resnet network, Desnet network, etc., preferably MobileNet network.

[0106] S42, constructing a flower type image sample set, which is divided into a training set, a validation set, and a test set, wherein the training set includes flower samples of different categories and a label for each flower sample;

[0107] Specifically, the image samples in the training set have the same size and format as the images to be identified;

[0108] Specifically, the number of training samples is no less than 10,000.

[0109] S43, retraining each pre-trained single classifier based on the resampling technology and the training set to form K single classifiers with differences;

[0110] Specifically, by setting different batch_size values, the MobileNet network is trained using the resampling technique on the flower species image training set to form K single classifiers with differences;

[0111] Specifically, the batch_size value can be set according to the computing power of the hardware device. The preferred batch_size values ​​are: 8, 16, 32, 50, 64, 100, 128, 150, 180, 200, etc.

[0112] Specifically, the K value can be set according to the needs of practical applications, preferably K=10.

[0113] S44, counting the recognition rate of each single classifier on the verification set, and calculating the weight corresponding to each single classifier in the convolutional network ensemble based on the recognition rate, and the calculation formula is as follows:

[0114]

[0115] Among them, R i is the recognition rate of the i-th single classifier on the validation set, λ i is the weight corresponding to the i-th single classifier;

[0116] S45, each single classifier recognizes the normalized flower region respectively, and the recognition results of each single classifier are integrated using a linear weighted method, and the calculation formula is as follows:

[0117]

[0118] Among them, x is the normalized flower area, f i (x) is the recognition result of the i-th single classifier on image x, λ i is the weight corresponding to the i-th single classifier, and F(x) is the integrated recognition result;

[0119] S46, outputting the recognition result of the type of the target flower.

[0120] Specifically, the flower type corresponding to the maximum probability value in the output identification results is selected, which is the flower type in the flower image.

[0121] In summary, the embodiments of the present invention can query the breeding materials, experiments and other breeding information of the type of flowers in the flower breeding information management system according to the type of flowers, and associate them with the initial flower image, thereby facilitating the precise management of flower breeding information, beneficially promoting the informatization development of flower breeding, and realizing the precise selection and breeding of flower varieties.

[0122] This method is fast, continuous, and convenient for accurate management of flower breeding information. It can also be applied to mobile terminals such as smart phones and corresponding commercial breeding software. It is suitable for field operations, which broadens the scope of application of this method.

[0123] Figure 3 A structural diagram of a flower species identification system provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the system includes: a collection module 301, a segmentation module 302, an enhancement module 303, a normalization module 304, a recognition module 305, a storage module 306 and an association module 307, wherein:

[0124] The acquisition module 301 is used to acquire the initial color image of the target flower;

[0125] The segmentation module 302 is used to segment the initial color image of the target flower and extract the flower area in the initial color image;

[0126] The enhancement module 303 is used to process the flower region based on an image enhancement algorithm to obtain an enhanced flower region;

[0127] The normalization module 304 is used to perform normalization processing on the enhanced flower region to obtain a normalized flower region;

[0128] The recognition module 305 is used to recognize the normalized flower region by using a convolutional network integration method to obtain the type of the target flower;

[0129] The saving module 306 is used to upload the identification result of the target flower species and the initial color image to the flower breeding information management system for saving;

[0130] The association module 307 is used to search for relevant breeding information such as breeding materials and experiments in the flower breeding information management system according to the identification result of the type of the target flower, and associate it with the initial color image.

[0131] This embodiment is a system embodiment corresponding to the above method embodiment. For details, please refer to the above method embodiment. This system embodiment will not be described in detail here.

[0132] Figure 4 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention, such as Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communications interface 420 and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a flower species identification method, which includes:

[0133] Collecting the initial color image of the target flower;

[0134] Segmenting the initial color image to extract the flower region in the initial color image;

[0135] Based on an image enhancement algorithm, the flower region is processed to obtain an enhanced flower region;

[0136] Normalizing the enhanced flower region to obtain a normalized flower region;

[0137] Using a convolutional network integration method, the normalized flower region is identified to obtain the type of the target flower;

[0138] Uploading the identification result of the target flower species and the initial color image to a flower breeding information management system for storage;

[0139] According to the identification result of the target flower species, relevant breeding information such as breeding materials and experiments is searched in the flower breeding information management system and associated with the initial color image.

[0140] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0141] On the other hand, an embodiment of the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute a flower species identification method provided by each of the above method embodiments, the method comprising:

[0142] Collecting the initial color image of the target flower;

[0143] Segmenting the initial color image to extract the flower region in the initial color image;

[0144] Based on an image enhancement algorithm, the flower region is processed to obtain an enhanced flower region;

[0145] Normalizing the enhanced flower region to obtain a normalized flower region;

[0146] Using a convolutional network integration method, the normalized flower region is identified to obtain the type of the target flower;

[0147] Uploading the identification result of the target flower species and the initial color image to a flower breeding information management system for storage;

[0148] According to the identification result of the target flower species, relevant breeding information such as breeding materials and experiments is searched in the flower breeding information management system and associated with the initial color image.

[0149] In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, a flower species identification method provided in the above embodiments is implemented, the method comprising:

[0150] Collecting the initial color image of the target flower;

[0151] Segmenting the initial color image to extract the flower region in the initial color image;

[0152] Based on an image enhancement algorithm, the flower region is processed to obtain an enhanced flower region;

[0153] Normalizing the enhanced flower region to obtain a normalized flower region;

[0154] Using a convolutional network integration method, the normalized flower region is identified to obtain the type of the target flower;

[0155] Uploading the identification result of the target flower species and the initial color image to a flower breeding information management system for storage;

[0156] According to the identification result of the target flower species, relevant breeding information such as breeding materials and experiments is searched in the flower breeding information management system and associated with the initial color image.

[0157] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0158] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying flower species, characterized in that: include: Collecting the initial color image of the target flower; Segmenting the initial color image to extract the flower region in the initial color image; The segmentation of the initial color image is specifically implemented by the GrabCut image segmentation method, and the specific steps are as follows: S11, manually marking the largest rectangular area including the flower in the initial color image Img1 to form a first color image Img 1-1 ; S12, in the first color image Img 1-1 In the process, the flower position and the background position are manually marked and set as the initial value of the GrabCut algorithm; S13, using the GrabCut algorithm to segment the initial color image Img1 to form a second color image Img 1-2 ; S14: if the second color image Img 1-2 The background area is no longer included in the second color image Img, that is, there is no background area to be identified. 1-2 That is the segmented flower area Img2; Otherwise, the second color image Img 1-2 Instead of the first color image , repeat S12 to S14 until the second color image Img is finally obtained 1-2 The background area is no longer included in the second color image Img 1-2 As the segmented flower region Img2; Based on an image enhancement algorithm, the flower region is processed to obtain an enhanced flower region; Normalizing the enhanced flower region to obtain a normalized flower region; Using a convolutional network integration method, the normalized flower region is identified to obtain the type of the target flower; Uploading the identification result of the target flower species and the initial color image to a flower breeding information management system for storage; According to the identification result of the target flower species, relevant breeding materials and breeding information are searched in the flower breeding information management system, and associated with the initial color image; The method of using convolutional network integration to identify the normalized flower area and obtain the type of the target flower is specifically implemented by the following method: S41, selecting a deep network model pre-trained on the ILSVRC-2012-CLS dataset as a single classifier model, wherein the single classifier is at least one of an AlexNet network, an Inception network, a Resnet network, a Desnet network, and a MobileNet network; S42, constructing a flower type image sample set, which is divided into a training set, a validation set, and a test set, wherein the training set includes flower samples of different categories and a label for each flower sample; S43, by setting different batch_size values, retraining each pre-trained single classifier based on the resampling technology and the training set to form The batch_size value is set according to the computing power of the hardware device running the flower species identification method, and at least includes the following values: 8, 16, 32, 50, 64, 100, 128, 150, 180 and 200; K The value of is 10; S44, counting the recognition rate of each single classifier on the verification set, and calculating the integration weight of the convolutional network based on the recognition rate, and the calculation formula is as follows: , in, It is The recognition rate of a single classifier on the validation set, It is The weight corresponding to a single classifier; S45, each single classifier recognizes the normalized flower region respectively, and the recognition results of each single classifier are integrated using a linear weighted method, and the calculation formula is as follows: , in, is the normalized flower area, It is A single classifier for the image The recognition result of It is The weight corresponding to a single classifier is is the integrated recognition result; S46, outputting the recognition result of the type of the target flower.

2. The flower species identification method according to claim 1, characterized in that: The flower region is processed based on the image enhancement algorithm, which is specifically implemented by an image enhancement method based on guided filtering, and the specific steps are as follows: S21, convert the segmented flower area Img2 from RGB color space to Color space; S22, using the brightness distribution characteristics to calculate the enhancement weight of the detail image , the calculation formula is as follows: , in, and Luminance space The maximum and average brightness values ​​of all pixels in is a fixed constant; S23, using the guided filtering algorithm to smooth the segmented flower region Img2, and divide it into detail images and the base image ; S24, the weighted detail image is fused with the basic image, and the fusion formula is as follows: , The segmented flower region Img2 is enhanced to obtain an enhanced flower region Img3.

3. The flower species identification method according to claim 1, characterized in that: The enhanced flower region is normalized to obtain the normalized flower region, and the specific steps are as follows: S31, for the enhanced flower area , and normalize it to size image to form a third color image ,in , They are the width and height of the normalized image, in pixels; S32, the third color image Convert to a color image in TFRecord format to form a normalized color image .

4. A flower species identification system, characterized in that: include: An acquisition module, used for acquiring an initial color image of a target flower; A segmentation module, used to segment the initial color image and extract the flower area in the initial color image; The segmentation of the initial color image is specifically implemented by the GrabCut image segmentation method, and the specific steps are as follows: S11, manually marking the largest rectangular area including the flower in the initial color image Img1 to form a first color image Img 1-1 ; S12, in the first color image Img 1-1 In the process, the flower position and the background position are manually marked and set as the initial value of the GrabCut algorithm; S13, using the GrabCut algorithm to segment the initial color image Img1 to form a second color image Img 1-2 ; S14: if the second color image Img 1-2 The background area is no longer included in the second color image Img, that is, there is no background area to be identified. 1-2 That is the segmented flower area Img2; Otherwise, the second color image Img 1-2 Instead of the first color image , repeat S12 to S14 until the second color image Img is finally obtained 1-2 The background area is no longer included in the second color image Img 1-2 As the segmented flower region Img2; An enhancement module, used for processing the flower region based on an image enhancement algorithm to obtain an enhanced flower region; A normalization module, used for normalizing the enhanced flower region to obtain a normalized flower region; The recognition module is used to recognize the normalized flower area by using the convolutional network integration method to obtain the type of the target flower, including: S41, selecting a deep network model pre-trained on the ILSVRC-2012-CLS dataset as a single classifier model, wherein the single classifier is at least one of an AlexNet network, an Inception network, a Resnet network, a Desnet network, and a MobileNet network; S42, constructing a flower type image sample set, which is divided into a training set, a validation set, and a test set, wherein the training set includes flower samples of different categories and a label for each flower sample; S43, by setting different batch_size values, retraining each pre-trained single classifier based on the resampling technology and the training set to form The batch_size value is set according to the computing power of the hardware device running the flower species identification method, and at least includes the following values: 8, 16, 32, 50, 64, 100, 128, 150, 180 and 200; K The value of is 10; S44, counting the recognition rate of each single classifier on the verification set, and calculating the integration weight of the convolutional network based on the recognition rate, and the calculation formula is as follows: , in, It is The recognition rate of a single classifier on the validation set, It is The weight corresponding to a single classifier; S45, each single classifier recognizes the normalized flower region respectively, and the recognition results of each single classifier are integrated using a linear weighted method, and the calculation formula is as follows: , in, is the normalized flower area, It is A single classifier for the image The recognition result of It is The weight corresponding to a single classifier is F ( x ) is the integrated recognition result; S46, outputting the recognition result of the type of the target flower; A saving module, used for uploading the identification result of the type of the target flower and the initial color image to a flower breeding information management system for saving; The association module is used to search for relevant breeding materials and breeding information in the flower breeding information management system according to the identification result of the type of the target flower, and associate them with the initial color image.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the flower species identification method according to any one of claims 1 to 3 are implemented.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the flower species identification method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Efficient promoting exercising method for discriminating human face

    CN101075291A

  • Interactive graph cutting method

    CN103559719A

  • Mid-air gesture roaming control method based on distance vector

    CN103793056A

  • FMRI dynamic brain function sub-network construction and parallel connection SVM weighted recognition method

    CN104715261A

  • Data drive system state model online distinguishing method based on multi-combination classifiers

    CN106156401A