A target identification method and system based on unmanned aerial vehicle inspection
By filtering out garbage pixels and determining garbage connected components during drone inspections, and combining the ICA algorithm with the spectral curves of background pixels, the garbage spectral database is adaptively supplemented, solving the problem of low garbage identification accuracy in drone inspections and achieving dynamic updates and high-accuracy garbage identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WALLI ENVIRONMENTAL ENGINEERING CO LTD
- Filing Date
- 2025-09-30
- Publication Date
- 2026-06-19
Smart Images

Figure CN121280940B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and specifically to a target recognition method and system based on unmanned aerial vehicle (UAV) inspection. Background Technology
[0002] The identification of garbage during drone inspections relies on the captured garbage images. Existing technologies typically compare the spectral curves of each pixel in the spectral image captured by the drone with standard spectral curves in a garbage spectral database to identify garbage during drone inspections.
[0003] However, the existing technology uses a fixed garbage spectral database during drone inspections, which cannot be updated according to changes in the inspection scenario. This results in significant limitations in garbage identification based on a fixed garbage spectral database, leading to low accuracy in garbage identification. Summary of the Invention
[0004] To address the technical problem that existing technologies use a fixed garbage spectral database during drone inspections, making it impossible to update the database according to changes in the inspection scenario, this application aims to provide a target recognition method and system based on drone inspections. The specific technical solution adopted is as follows:
[0005] The first aspect of this application provides a target identification method based on unmanned aerial vehicle (UAV) inspection, including:
[0006] Obtain the spectral curve of each pixel in the spectral image captured by the drone;
[0007] Based on the overall deviation of the spectral curves of each pixel in the spectral image captured by the UAV, all garbage pixels are identified; based on the connectivity of the garbage pixels in the spectral image captured by the UAV, garbage connected regions are identified.
[0008] Based on the component correlation between the spectral curves of each garbage pixel in the garbage connected domain and the standard spectral curves in the garbage spectral database, as well as the spectral curves of the background pixels outside the garbage connected domain, the garbage component vector of each garbage pixel is determined.
[0009] Based on the distribution of waste component vectors in each waste connectivity domain, the waste identification integrity of the spectral image captured by the UAV is determined; waste spectral database data is supplemented based on the waste identification integrity; and waste identification regions are determined based on the waste connectivity domains and the supplemented waste spectral database.
[0010] Furthermore, the process of obtaining the garbage pixels includes:
[0011] Anomaly detection is performed on the spectral curves of all pixels in the spectral image captured by the UAV using a single-class support vector machine to filter out abnormal spectral curves; the pixels corresponding to the abnormal spectral curves are regarded as garbage pixels.
[0012] Furthermore, the process of obtaining the garbage connected component includes:
[0013] An initial connected component is determined based on the connected components composed of all the junk pixels in the spectral image captured by the UAV; the initial connected component with a number of junk pixels greater than a preset threshold is taken as the junk connected component.
[0014] Furthermore, the process of obtaining the garbage component vector includes:
[0015] The spectral curve of each pixel in the spectral image captured by the UAV and each standard spectral curve in the garbage spectral database are used as target curves in sequence; the reflectance of all wavelengths on the target curves are arranged in ascending order of wavelength to determine the corresponding reference vectors.
[0016] Construct the corresponding abnormal spectral matrix by horizontally arranging the reference vectors of the spectral curves of all garbage pixels in each garbage connected component;
[0017] Other pixels outside the garbage connected domain in the spectral image captured by the UAV are taken as background pixels; a background database matrix is constructed based on the reference vectors of all background pixels and the reference vectors of all standard spectral curves in the garbage spectral database.
[0018] Based on the ICA algorithm, the component matrix of each garbage connected component is determined according to the abnormal spectral matrix and the background database matrix; wherein, the abnormal spectral matrix is obtained by matrix multiplication of the background database matrix and the component matrix.
[0019] Based on the row vectors in the component matrix, the garbage component vector of each garbage pixel in the garbage connected domain is determined; wherein, the index value of the reference vector of each garbage pixel in the abnormal spectral matrix is the same as the column index value of its corresponding garbage component vector in the component matrix.
[0020] Furthermore, the process of obtaining the background database matrix includes:
[0021] The background vector is determined based on the mean vector of all reference vectors corresponding to all background pixels; the background vector and the reference vectors of all standard spectral curves in the garbage spectral database are arranged sequentially to construct the corresponding background database matrix.
[0022] Furthermore, the process of obtaining the integrity of the garbage identification includes:
[0023] In each garbage connected component, each garbage pixel is taken as the target pixel, and all garbage pixels within the preset neighborhood of the target pixel are taken as reference pixels.
[0024] The corresponding reference similarity is determined based on the cosine similarity between the garbage component vector of the target pixel and the garbage component vector of each corresponding reference pixel.
[0025] Based on the mean curve of the spectral curves of all background pixels, determine the corresponding background reference curve; based on the garbage component vector of the target pixel, the background reference curve, and each standard spectral curve, construct the corresponding reconstruction reference curve; based on the relative deviation between the spectral curve of the target pixel and the reconstruction reference curve, determine the corresponding degree of spectral missing representation.
[0026] The reference recognition integrity between the target pixel and each reference pixel is determined based on the normalized value of the product between the reference similarity and the degree of spectral missing representation.
[0027] The local recognition integrity of the target pixel is determined based on the average of the reference recognition integrity between the target pixel and all reference pixels; the corresponding garbage recognition integrity is determined based on the average of the local recognition integrity of all garbage pixels.
[0028] Furthermore, the process of obtaining the reconstructed reference curve includes:
[0029] Obtain the standard spectral curve corresponding to each element in the garbage component vector of the target pixel in the garbage spectral database; weight the corresponding standard spectral curve by each element in the garbage component vector of the target pixel to determine the weighted standard curve; weight the background reference curve by the first element in the garbage component vector of the target pixel to determine the weighted background curve; superimpose all the weighted standard curves in the garbage component vector of the target pixel with the weighted background curve to determine the corresponding reconstruction reference curve.
[0030] Furthermore, the process of obtaining the degree of spectral missingness includes:
[0031] The spectral curve of the target pixel is subtracted from the reconstruction reference curve to determine the corresponding reconstruction error curve; the reconstruction error curve of the target pixel is divided by the reconstruction error curve of each reference pixel to determine the corresponding feature curve; the degree of spectral missing performance is determined based on the standard deviation of the ordinate values corresponding to all wavelengths on the feature curve.
[0032] Furthermore, the process of supplementing the waste spectral database with data based on the waste identification integrity includes:
[0033] When the waste identification integrity is greater than or equal to the preset integrity threshold, no data supplementation is performed on the waste spectral database;
[0034] When the garbage identification integrity is less than a preset integrity threshold, the supplementary spectral curve is added to the garbage spectral database as a new standard spectral curve; wherein, the ratio between the garbage identification integrity calculated after the reference vector of the supplementary spectral curve is added to the background database matrix and the garbage identification integrity of the spectral image captured by the UAV is greater than a preset improvement threshold.
[0035] Secondly, this application provides a target identification system based on unmanned aerial vehicle (UAV) inspection, the system comprising:
[0036] The data acquisition module is used to acquire the spectral curve of each pixel in the spectral image captured by the drone;
[0037] The first determining module is used to determine all garbage pixels based on the overall deviation of the spectral curves of each pixel in the spectral image captured by the UAV; and to determine garbage connected regions based on the connectivity of the garbage pixels in the spectral image captured by the UAV.
[0038] The second determining module is used to determine the garbage component vector of each garbage pixel based on the component correlation between the spectral curve of each garbage pixel in the garbage connected domain and the standard spectral curve in the garbage spectral database, as well as the spectral curve of the background pixel outside the garbage connected domain.
[0039] The waste identification module is used to determine the waste identification integrity of the spectral image captured by the UAV based on the distribution of waste component vectors in each waste connected domain; supplement the waste spectral database based on the waste identification integrity; and determine the waste identification region based on the waste connected domains and the supplemented waste spectral database.
[0040] Thirdly, this application provides a computer device including a memory and a processor. The memory is used to store computer program code, and the processor is used to call and run the computer program code from the memory to perform the method as described in the first aspect of this application or any embodiment of the first aspect.
[0041] Fourthly, this application provides a computer program product comprising computer program code, which, when executed, performs the method as described in the first aspect of this application or any embodiment thereof.
[0042] Fifthly, this application provides a computer-readable storage medium that stores computer program code, which, when executed, performs the method as described in the first aspect of this application or any embodiment thereof.
[0043] This application has the following beneficial effects:
[0044] This application first identifies the garbage connected components based on the significant spectral discrepancy between the garbage region and the background region. Then, based on the component correlation between the spectral curves of garbage pixels within the garbage connected components and the standard spectral curves in the garbage spectral database, combined with the spectral curves of the background pixels, it determines the garbage component vectors representing the spectral components of the garbage. Finally, based on the characteristic that garbage component vectors at adjacent locations are usually similar and that spectral error distributions are similar, it determines the garbage identification completeness of the spectral images captured by the drone. Finally, based on the garbage identification completeness after introducing the spectral curves, it adaptively supplements the garbage spectral database, resulting in higher accuracy in garbage identification. Attached Figure Description
[0045] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart of a target identification method based on unmanned aerial vehicle (UAV) inspection, provided in one embodiment of the present invention.
[0047] Figure 2 A schematic diagram of a spectral curve provided in one embodiment of the present invention;
[0048] Figure 3 This is a structural diagram of a target recognition system based on unmanned aerial vehicle (UAV) inspection, provided in one embodiment of the present invention.
[0049] Figure 4 This is a schematic diagram of a computer device structure provided in one embodiment of the present invention. Detailed Implementation
[0050] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a target identification method and system based on unmanned aerial vehicle (UAV) inspection proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment, and specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0052] The following description, in conjunction with the accompanying drawings, details a specific scheme for a target identification method and system based on unmanned aerial vehicle (UAV) inspection provided by this invention.
[0053] This application provides a target identification method based on unmanned aerial vehicle (UAV) inspection. Please refer to [link / reference]. Figure 1 The diagram illustrates a flowchart of a target identification method based on unmanned aerial vehicle (UAV) inspection, according to an embodiment of the present invention. The method includes:
[0054] Step S101: Obtain the spectral curve of each pixel in the spectral image captured by the drone.
[0055] By equipping a drone with a multispectral camera and taking pictures during drone inspections, spectral images of the area to be analyzed are obtained. Then, the spectral curve of each pixel in the drone-captured spectral images is acquired; where the horizontal axis of the spectral curve represents wavelength and the vertical axis represents reflectance. (See also...) Figure 2 This diagram illustrates a spectral curve provided by an embodiment of the present invention. The solid line represents the spectral curve of waste corresponding to PET material, while the dashed line represents the spectral curve of waste corresponding to PE material. It should be noted that the horizontal and vertical axis value ranges of all spectral curves in this embodiment are the same to avoid calculation errors caused by different value ranges; this will not be further elaborated upon here. Furthermore, it should be noted that the waste spectral database mentioned later in this embodiment includes previously obtained standard spectral curves labeled as waste, representing the spectral performance of pixels corresponding to waste; this will not be further elaborated upon here either.
[0056] Step S102: Based on the overall deviation of the spectral curves of each pixel in the spectral image captured by the UAV, determine all the garbage pixels; based on the connectivity of the garbage pixels in the spectral image captured by the UAV, determine the garbage connected components.
[0057] Based on objective facts, it is known that in spectral images captured by drones, the closer the spectral curve of a pixel matches the standard spectral curve in a garbage spectral database, the more likely the corresponding pixel is a garbage pixel. Furthermore, since there is a significant difference between garbage pixels and normal pixels in the background, garbage pixels can be screened based on the relative anomalies in the overall spectral curves of all garbage pixels. Therefore, this embodiment of the invention first determines all garbage pixels based on the overall deviation of the spectral curves of each pixel in the spectral image captured by the drone.
[0058] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining garbage pixels includes:
[0059] Anomaly detection is performed on the spectral curves of all pixels in the spectral image captured by the drone using a single-class support vector machine to filter out abnormal spectral curves. The pixels corresponding to the abnormal spectral curves are regarded as garbage pixels. Considering that the background pixels occupy the majority of the time during the high-altitude flight of the drone, the detected normal pixels occupy the majority of the time. Therefore, garbage pixels usually represent the pixels corresponding to garbage.
[0060] Furthermore, considering that junk pixels are usually concentrated in one area, while discretely sparsely distributed pixels typically correspond to noise, the connected components of the junk pixels are further determined based on their connectivity in the spectral image captured by the UAV. Preferably, in some possible implementations of this invention, the process of obtaining the connected components of the junk pixels includes: determining an initial connected component based on the connected components formed by all junk pixels in the spectral image captured by the UAV; and using the initial connected component where the number of junk pixels is greater than a preset threshold as the junk connected component. In a specific implementation of this invention, the preset threshold is set to 5, which can be adjusted according to the specific implementation environment. The connected component method eliminates the interference of noise on the identification of junk pixels, making the subsequent analysis process more accurate.
[0061] Step S103: Determine the garbage component vector of each garbage pixel based on the component correlation between the spectral curves of each garbage pixel in the garbage connected domain and the standard spectral curves in the garbage spectral database, as well as the spectral curves of the background pixels outside the garbage connected domain.
[0062] Traditional methods for identifying waste types rely on similarity assessments between spectral curve p and spectral curve f in a database to classify and identify target waste. However, this overlooks the fact that in real-world scenarios, waste may not be a single type but a mixture of various types. Therefore, for a pixel representing mixed waste, its corresponding spectral curve is typically a superposition of standard spectral curves representing multiple types of waste. This invention further determines the waste component vector for each pixel based on the component correlation between the spectral curves of each waste pixel within the waste connected domain and the standard spectral curves in the waste spectral database, as well as the spectral curves of background pixels outside the waste connected domain. This allows for the determination of the waste component distribution corresponding to the mixed waste based on the waste component vector, providing a data foundation for subsequent assessment of the completeness of waste identification.
[0063] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the garbage component vector includes:
[0064] The spectral curves of each pixel in the spectral image captured by the drone and each standard spectral curve in the garbage spectral database are used as target curves. The reflectance of all wavelengths on the target curves is arranged in ascending order of wavelength to determine the corresponding reference vectors. The corresponding abnormal spectral matrix is constructed by horizontally arranging the reference vectors of the spectral curves of all garbage pixels in each garbage connected domain.
[0065] Pixels outside the connected components of garbage in the spectral image captured by the drone are designated as background pixels. A background database matrix is constructed based on the reference vectors of all background pixels and the reference vectors of all standard spectral curves in the garbage spectral database. In a specific implementation of this invention, the process of obtaining the background database matrix includes: determining a background vector based on the mean vector of all reference vectors corresponding to all background pixels; and sequentially arranging the background vector and the reference vectors of all standard spectral curves in the garbage spectral database to construct the corresponding background database matrix.
[0066] In one specific implementation of this invention, the background vector has an index value of 1 in the background database matrix, and the abnormal spectral matrix is further represented as follows: The background database matrix is represented as follows: ;in, For garbage connectivity domain The abnormal spectral matrix; Background vector; For garbage connectivity domain The reference vector of the first garbage pixel in the middle; For garbage connectivity domain The reference vector of the second garbage pixel in the middle; For garbage connectivity domain The reference vector of the third garbage pixel in the middle; For garbage connectivity domain The reference vector of the nth garbage pixel; This is the reference vector for the first standard spectral curve in the garbage spectral database; This is the reference vector for the second standard spectral curve in the garbage spectral database; This is the reference vector for the m-th standard spectral curve in the garbage spectral database.
[0067] During drone inspection flights, sunlight is present, resulting in a uniform background light across the entire multispectral image. The spectral curves of the corresponding pixels representing waste will contain components corresponding to this background light. Therefore, by using the spectral features of the current image's background region as the background spectrum, these background spectra can be analyzed and calculated more accurately. This involves determining the background vector based on the mean vector of all reference vectors corresponding to all background pixels. Combining this background vector with reference vectors from standard spectral curves in a waste spectral database serves as a benchmark, thereby determining the component distribution.
[0068] Furthermore, based on the ICA algorithm, the component matrix of each waste connected component is determined according to the anomalous spectral matrix and the background database matrix. The anomalous spectral matrix is obtained by matrix multiplication of the background database matrix and the component matrix. It should be noted that the ICA algorithm is a well-known technique in the art and will not be further limited or elaborated upon here. Unlike traditional ICA decomposition, which does not know the anomalous spectral matrix corresponding to the independent source signals, this invention, due to the need to verify the composition of the target waste, uses the background database matrix composed of the reference vectors of the spectral curves of various types of waste in the database and the background vectors as independent sources, without needing to solve for the independent source signals, thereby determining the component matrix.
[0069] According to the matrix calculation principle, the result of multiplying each column of the background database matrix and the component matrix is each reference vector in the anomalous spectral matrix. That is, the index value of the reference vector in the anomalous spectral matrix corresponds one-to-one with the column index value in the component matrix. Since all spectral curves have the same wavelength range, each element in the resulting component matrix corresponds to a numerical value. Therefore, based on the row vectors in the component matrix, the garbage component vector of each garbage pixel in the garbage connected component is determined. The index value of the reference vector of each garbage pixel in the anomalous spectral matrix is the same as the column index value of its corresponding garbage component vector in the component matrix. In other words, in this embodiment of the invention, the garbage component vector of each garbage pixel represents the proportion of the corresponding garbage pixel in each type of garbage component.
[0070] Step S104: Determine the garbage identification integrity of the spectral images captured by the UAV based on the distribution of garbage component vectors in each garbage connected domain; supplement the garbage spectral database based on the garbage identification integrity; determine the garbage identification region based on the garbage connected domains and the supplemented garbage spectral database.
[0071] In each garbage connected component, adjacent pixels typically represent the spectrum generated by the same garbage. Therefore, the spectra of adjacent positions are usually consistent, and the corresponding component vectors should be close. If there are large differences in the component vectors corresponding to pixels at different positions, it indicates that the current ICA decomposition is inaccurate. According to the principle of the ICA algorithm, if the background database matrix representing independent source signals is inaccurate, it indicates that there is unknown garbage in the current target garbage identification, and the garbage identification integrity is low, requiring supplementation of the garbage spectral database. Therefore, this embodiment of the invention further determines the garbage identification integrity of the spectral image captured by the UAV based on the distribution of garbage component vectors in each garbage connected component.
[0072] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the integrity of garbage identification includes:
[0073] In each garbage connected component, each garbage pixel is sequentially designated as the target pixel, and all garbage pixels within a preset neighborhood of the target pixel are designated as reference pixels. In one specific implementation of this invention, the preset neighborhood is set to an eight-neighborhood, which will not be elaborated further here. The corresponding reference similarity is determined based on the cosine similarity between the garbage component vector of the target pixel and the garbage component vector of each corresponding reference pixel. The lower the reference similarity, the more inconsistent the spectra of the adjacent pixel positions, the less accurate the corresponding ICA decomposition process, and the lower the completeness of garbage identification.
[0074] However, relying solely on the spectral consistency of adjacent garbage pixel locations to analyze the accuracy of ICA decomposition ignores the difference between the pixel spectrum and the combined spectrum obtained from the database during the ICA algorithm's solution process. This can lead to situations where, despite adjacent pixels having similar component vectors, the reconstructed signal still contains significant errors, thus interfering with the assessment of the completeness of garbage identification. Therefore, it is further necessary to determine the spectral missing characteristics based on the deviation between the pixel spectrum during the solution process and the combined spectrum obtained from the database.
[0075] Based on the mean curve of the spectral curves of all background pixels, a corresponding background reference curve is determined; based on the garbage component vector of the target pixel, the background reference curve, and each standard spectral curve, a corresponding reconstruction reference curve is constructed; preferably, in some possible implementations of this invention, the process of obtaining the reconstruction reference curve includes:
[0076] Obtain the standard spectral curve corresponding to each element in the garbage component vector of the target pixel in the garbage spectral database; weight the corresponding standard spectral curve by each element in the garbage component vector of the target pixel to determine the weighted standard curve; weight the background reference curve by the first element in the garbage component vector of the target pixel to determine the weighted background curve; superimpose all the weighted standard curves and weighted background curves in the garbage component vector of the target pixel to determine the corresponding reconstruction reference curve.
[0077] According to the calculation principle of matrices, the number of vectors in the background database matrix (including the background vector and the reference vectors of each standard spectral curve) is the same as the number of elements in the garbage component vector of each garbage pixel, and there is a one-to-one correspondence. Therefore, the background reference curve should correspond to the first element in the garbage component vector, and the other elements correspond one-to-one according to the arrangement order of the standard spectral curves. Specifically, the a-th element in the garbage component vector corresponds to the a-th vector in the background database matrix, where a is an integer greater than or equal to 1. Furthermore, the standard spectral curve corresponding to each element can be determined based on the vector corresponding to each element.
[0078] Based on the relative deviation between the spectral curve of the target pixel and the reconstructed reference curve, the degree of spectral missing representation is determined; preferably, in some possible implementations of this invention, the process of obtaining the degree of spectral missing representation includes:
[0079] The reconstruction error curve is determined by subtracting the spectral curve of the target pixel from the reconstruction reference curve. The corresponding feature curve is then determined by dividing the reconstruction error curve of the target pixel from the reconstruction error curve of each reference pixel. The degree of spectral missing representation is determined based on the standard deviation of the ordinate values corresponding to all wavelengths on the feature curve. It should be noted that the specific process of obtaining the reconstruction error curve by curve subtraction involves subtracting the values of the corresponding ordinate values of the reconstruction reference curve from the values of each abscissa in the spectral curve of the target pixel. Similarly, the curve division operation involves calculating the division results of the two ordinate values corresponding to the same abscissa on the reconstruction error curves of the target pixel and each reference pixel, arranging the division results of all abscissas, and then determining the feature curve. Further details are omitted here.
[0080] When there are unknown spectral components of garbage in the garbage connected domain, it will cause adjacent garbage to follow each other but all have spectral deviations. Therefore, for the target pixel and each reference pixel, the more similar the shapes of their corresponding two spectral deviation curves, the less likely the garbage spectral database is to have unknown spectral components corresponding to garbage, and the lower the garbage identification completeness.
[0081] Therefore, the reference recognition integrity between the target pixel and each reference pixel is further determined by the normalized value of the product between the reference similarity and the degree of spectral missing representation.
[0082] In one specific implementation of this invention, the process of obtaining reference identification integrity is expressed by the following formula: ;in, For target pixel With the corresponding first Reference identification integrity between reference pixels; For target pixel The garbage component vector and the corresponding first The cosine similarity between the garbage component vectors of each reference pixel, also known as the reference similarity; For target pixel With the corresponding first The standard deviation of the ordinate values of all wavelengths on the feature curve between each reference pixel, which is the degree of spectral missing representation. This is a minimum-maximum normalization function, which can be adjusted according to the specific implementation environment, and will not be elaborated further here.
[0083] The local recognition integrity of the target pixel is determined based on the average of the reference recognition integrity between the target pixel and all reference pixels. Similarly, the corresponding garbage recognition integrity is determined based on the average of the local recognition integrity of all garbage pixels. A higher garbage recognition integrity indicates a higher probability of missing spectral components corresponding to unknown garbage, thus necessitating supplementation of the garbage spectral database. Therefore, the garbage spectral database is finally supplemented based on the garbage recognition integrity.
[0084] Preferably, in some possible implementations of the embodiments of the present invention, the process of supplementing the waste spectral database with data based on the waste identification integrity includes: when the waste identification integrity is greater than or equal to a preset integrity threshold, no data supplementation is performed on the waste spectral database;
[0085] In one specific implementation of this invention, the preset integrity threshold is set to 0.8, which can be adjusted according to the specific implementation environment. If the waste identification integrity is greater than or equal to the preset integrity threshold, it indicates that the current waste spectral database has identified relatively complete waste components, and there is no need to supplement the waste spectral database.
[0086] Conversely, if the value is less than the preset integrity threshold, it indicates that the current garbage spectral database does not fully identify the garbage components, and the garbage spectral database needs to be supplemented. For the spectral curve that needs supplementation, if adding the spectral curve to the garbage spectral database significantly improves the garbage identification integrity, then the spectral curve belongs to the garbage component and needs to be added to the garbage spectral database. Therefore, when the garbage identification integrity is less than the preset integrity threshold, the spectral curve to be supplemented is added to the garbage spectral database as a new standard spectral curve. The ratio between the garbage identification integrity calculated after adding the reference vector of the spectral curve to be supplemented to the background database matrix and the garbage identification integrity of the spectral image captured by the drone is greater than the preset improvement threshold. In a specific implementation of this invention, the preset improvement threshold is set to 1.2, which can be adjusted according to the specific implementation environment and will not be further elaborated here.
[0087] In another specific implementation of this invention, the process of obtaining the spectral curve to be supplemented includes: using the spectral curve of each background pixel in the spectral image captured by the UAV as a screening spectral curve; using the garbage identification integrity calculated after adding the reference vector of each screening spectral curve to the background database matrix as the updated identification integrity; using the ratio between the updated identification integrity and the garbage identification integrity of the spectral image captured by the UAV as the corresponding identification improvement degree; and using the screening spectral curve whose corresponding identification improvement degree is greater than a preset improvement threshold as the spectral curve to be supplemented. It should be noted that the garbage identification integrity of the spectral image captured by the UAV is the same as the garbage identification integrity calculated using the original background database matrix; and in this embodiment of the invention, when adding the reference vector of the spectral curve to the background database matrix, the added position is always the last position of the background database matrix.
[0088] Preferably, in some possible implementations of the embodiments of the present invention, the process of determining the waste identification region based on the waste connected components and the supplemented waste spectral database includes:
[0089] Obtain a new garbage spectrum database after supplementing the spectral curves to be supplemented; perform negative correlation mapping between the DTW distance of each background pixel's spectral curve and each standard spectral curve in the new garbage spectrum database to determine the corresponding curve similarity; according to the definition of DTW distance in the dynamic time warping algorithm, the smaller the DTW distance, the higher the similarity between the two corresponding spectral curves, that is, the higher the matching degree between the corresponding background pixel and the standard spectral curve representing the garbage spectrum, so the greater the curve similarity.
[0090] Therefore, the garbage evaluation value is further determined based on the maximum curve similarity between each background pixel and all standard spectral curves. A higher garbage evaluation value indicates a greater likelihood that the corresponding background pixel is a garbage pixel. Therefore, background pixels with garbage evaluation values greater than a preset garbage threshold are designated as suspected garbage pixels. Connected regions formed by the number of suspected garbage pixels are designated as suspected connected regions. Suspected connected regions with a number of suspected garbage pixels greater than a preset threshold are designated as real garbage regions. The real garbage regions and all regions corresponding to the previously analyzed garbage connected regions are designated as garbage identification regions. In a specific implementation of this invention, the preset garbage threshold is set to 0.8, which can be adjusted according to the specific implementation environment and will not be further elaborated here.
[0091] In one specific implementation of this invention, the method for negative correlation mapping of DTW distance is as follows: The DTW distance between the spectral curve of each background pixel and each standard spectral curve in the garbage spectral database is normalized to obtain a corresponding normalized value. The normalized value is then subtracted from the real number 1 to obtain the result of the negative correlation mapping, i.e., the curve similarity. Other negative correlation mapping methods can be used depending on the specific implementation environment, which will not be further elaborated here. It should be noted that, unless otherwise specified, the normalization method in this embodiment of the invention uses the minimum-maximum normalization method. Implementers can adjust this method according to the specific implementation environment, which will not be further elaborated here.
[0092] In summary, a target recognition method based on UAV inspection first identifies connected components of the garbage area based on the significant spectral discrepancy between the garbage area and the background area. Then, it determines garbage component vectors representing the spectral composition of the garbage by analyzing the component correlation between the spectral curves of garbage pixels within these connected components and the standard spectral curves in the garbage spectral database, combined with the spectral curves of the background pixels. Finally, based on the similarity of garbage component vectors in adjacent locations and the similarity of spectral error distributions, it determines the garbage recognition integrity of the UAV-captured spectral images. Finally, it adaptively supplements the garbage spectral database based on the garbage recognition integrity after introducing spectral curves, resulting in higher accuracy in garbage recognition.
[0093] This application also provides a target recognition system based on unmanned aerial vehicle (UAV) inspection. Please refer to [link / reference]. Figure 3 The diagram shows a structural diagram of a target identification system based on unmanned aerial vehicle (UAV) inspection according to an embodiment of the present invention. The system includes: a data acquisition module 301, a first determination module 302, a second determination module 303, and a garbage identification module 304.
[0094] Data acquisition module 301 is used to acquire the spectral curve of each pixel in the spectral image captured by the UAV;
[0095] The first determining module 302 is used to determine all garbage pixels based on the overall deviation of the spectral curves of each pixel in the spectral image captured by the UAV; and to determine the garbage connected domain based on the connectivity of the garbage pixels in the spectral image captured by the UAV.
[0096] The second determining module 303 is used to determine the garbage component vector of each garbage pixel based on the component correlation between the spectral curve of each garbage pixel in the garbage connected domain and the standard spectral curve in the garbage spectral database, as well as the spectral curve of the background pixel outside the garbage connected domain.
[0097] The waste identification module 304 is used to determine the waste identification integrity of the spectral image captured by the UAV based on the distribution of waste component vectors in each waste connected domain; supplement the waste spectral database based on the waste identification integrity; and determine the waste identification area based on the waste connected domains and the supplemented waste spectral database.
[0098] It should be noted that the system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the target recognition system based on UAV inspection and the target recognition method based on UAV inspection provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0099] This application also provides a computer device; please refer to [link / reference]. Figure 4 The illustration shows a schematic diagram of a computer device structure provided by an embodiment of the present invention. The computer device includes a memory 401, a processor 402, and a computer program 403 stored in the memory 401 and running on the processor 402. When the processor 402 executes the computer program 403, the computer device can execute any of the aforementioned target recognition methods based on UAV inspection.
[0100] This application also provides a computer program product that, when run on a computer device, enables the computer device to execute any of the aforementioned target recognition methods based on UAV inspection.
[0101] This application also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer device, the computer device can execute any of the aforementioned target identification methods based on UAV inspection.
[0102] In the embodiments provided in this application, it should be understood that the computer device, computer program product and computer-readable storage medium provided are all used to perform the corresponding methods provided above, and therefore the beneficial effects they can achieve can be referred to the beneficial effects of the methods provided above, which will not be repeated here.
[0103] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0104] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A target identification method based on unmanned aerial vehicle (UAV) inspection, characterized in that, The method includes: Obtain the spectral curve of each pixel in the spectral image captured by the drone; Based on the overall deviation of the spectral curves of each pixel in the spectral image captured by the UAV, all garbage pixels are identified; based on the connectivity of the garbage pixels in the spectral image captured by the UAV, garbage connected regions are identified. Based on the component correlation between the spectral curves of each garbage pixel in the garbage connected domain and the standard spectral curves in the garbage spectral database, as well as the spectral curves of the background pixels outside the garbage connected domain, the garbage component vector of each garbage pixel is determined. Based on the characteristics that the component vectors of waste in adjacent locations are usually similar and that the spectral error distribution is similar, the waste identification integrity of the spectral images captured by the UAV is determined; the waste spectral database is supplemented according to the waste identification integrity; and the waste identification region is determined according to the waste connected components and the supplemented waste spectral database.
2. The target identification method based on UAV inspection according to claim 1, characterized in that, The process of obtaining the garbage pixels includes: Anomaly detection is performed on the spectral curves of all pixels in the spectral image captured by the UAV using a single-class support vector machine to filter out abnormal spectral curves; the pixels corresponding to the abnormal spectral curves are regarded as garbage pixels.
3. The target identification method based on UAV inspection according to claim 1, characterized in that, The process of obtaining the garbage connected component includes: An initial connected component is determined based on the connected components composed of all the junk pixels in the spectral image captured by the UAV; the initial connected component with a number of junk pixels greater than a preset threshold is taken as the junk connected component.
4. The target identification method based on UAV inspection according to claim 1, characterized in that, The process of obtaining the garbage component vector includes: The spectral curve of each pixel in the spectral image captured by the UAV and each standard spectral curve in the garbage spectral database are used as target curves in sequence; the reflectance of all wavelengths on the target curves are arranged in ascending order of wavelength to determine the corresponding reference vectors. Construct the corresponding abnormal spectral matrix by horizontally arranging the reference vectors of the spectral curves of all garbage pixels in each garbage connected component; Other pixels outside the garbage connected domain in the spectral image captured by the UAV are taken as background pixels; a background database matrix is constructed based on the reference vectors of all background pixels and the reference vectors of all standard spectral curves in the garbage spectral database. Based on the ICA algorithm, the component matrix of each garbage connected component is determined according to the abnormal spectral matrix and the background database matrix; wherein, the abnormal spectral matrix is obtained by matrix multiplication of the background database matrix and the component matrix. Based on the row vectors in the component matrix, the garbage component vector of each garbage pixel in the garbage connected domain is determined; wherein, the index value of the reference vector of each garbage pixel in the abnormal spectral matrix is the same as the column index value of its corresponding garbage component vector in the component matrix.
5. A target identification method based on unmanned aerial vehicle (UAV) inspection according to claim 4, characterized in that, The process of obtaining the background database matrix includes: The background vector is determined based on the mean vector of all reference vectors corresponding to all background pixels; the background vector and the reference vectors of all standard spectral curves in the garbage spectral database are arranged sequentially to construct the corresponding background database matrix.
6. The target identification method based on UAV inspection according to claim 4, characterized in that, The process of obtaining the integrity of the garbage identification includes: In each garbage connected component, each garbage pixel is taken as the target pixel, and all garbage pixels within the preset neighborhood of the target pixel are taken as reference pixels. The corresponding reference similarity is determined based on the cosine similarity between the garbage component vector of the target pixel and the garbage component vector of each corresponding reference pixel. Based on the mean curve of the spectral curves of all background pixels, determine the corresponding background reference curve; based on the garbage component vector of the target pixel, the background reference curve, and each standard spectral curve, construct the corresponding reconstruction reference curve; based on the relative deviation between the spectral curve of the target pixel and the reconstruction reference curve, determine the corresponding degree of spectral missing representation. The reference recognition integrity between the target pixel and each reference pixel is determined based on the normalized value of the product between the reference similarity and the degree of spectral missing representation. The local recognition integrity of the target pixel is determined based on the average of the reference recognition integrity between the target pixel and all reference pixels; the corresponding garbage recognition integrity is determined based on the average of the local recognition integrity of all garbage pixels.
7. A target identification method based on unmanned aerial vehicle (UAV) inspection according to claim 6, characterized in that, The process of obtaining the reconstructed reference curve includes: Obtain the standard spectral curve corresponding to each element in the garbage component vector of the target pixel in the garbage spectral database; weight the corresponding standard spectral curve by each element in the garbage component vector of the target pixel to determine the weighted standard curve; weight the background reference curve by the first element in the garbage component vector of the target pixel to determine the weighted background curve; superimpose all the weighted standard curves in the garbage component vector of the target pixel with the weighted background curve to determine the corresponding reconstruction reference curve.
8. A target identification method based on unmanned aerial vehicle (UAV) inspection according to claim 6, characterized in that, The process of obtaining the degree of spectral missingness includes: The spectral curve of the target pixel is subtracted from the reconstruction reference curve to determine the corresponding reconstruction error curve; the reconstruction error curve of the target pixel is divided by the reconstruction error curve of each reference pixel to determine the corresponding feature curve; the degree of spectral missing performance is determined based on the standard deviation of the ordinate values corresponding to all wavelengths on the feature curve.
9. A target identification method based on unmanned aerial vehicle (UAV) inspection according to claim 4, characterized in that, The process of supplementing the waste spectral database with data based on the waste identification integrity includes: When the waste identification integrity is greater than or equal to the preset integrity threshold, no data supplementation is performed on the waste spectral database; When the garbage identification integrity is less than a preset integrity threshold, the supplementary spectral curve is added to the garbage spectral database as a new standard spectral curve; wherein, the ratio between the garbage identification integrity calculated after the reference vector of the supplementary spectral curve is added to the background database matrix and the garbage identification integrity of the spectral image captured by the UAV is greater than a preset improvement threshold.
10. A target recognition system based on unmanned aerial vehicle (UAV) inspection, characterized in that, The system includes: The data acquisition module is used to acquire the spectral curve of each pixel in the spectral image captured by the drone; The first determining module is used to determine all garbage pixels based on the overall deviation of the spectral curves of each pixel in the spectral image captured by the UAV; and to determine garbage connected regions based on the connectivity of the garbage pixels in the spectral image captured by the UAV. The second determining module is used to determine the garbage component vector of each garbage pixel based on the component correlation between the spectral curve of each garbage pixel in the garbage connected domain and the standard spectral curve in the garbage spectral database, as well as the spectral curve of the background pixel outside the garbage connected domain. The waste identification module is used to determine the waste identification integrity of the spectral images captured by the UAV based on the characteristics that the component vectors of waste at adjacent locations are usually similar and the spectral error distributions are similar; to supplement the waste spectral database based on the waste identification integrity; and to determine the waste identification region based on the waste connected components and the supplemented waste spectral database.