A clothing classification method based on a point cloud file, a terminal device, and a storage medium
By adjusting the neighborhood radius and computational geometric features in the point cloud file, and combining them with a convolutional neural network, the problems of induction bias and noise sensitivity caused by a fixed neighborhood size are solved, and high-precision clothing classification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2026-03-24
AI Technical Summary
Existing point cloud classification algorithms introduce inductive bias into the point cloud structure due to the fixed neighborhood size, and the nearest neighbor algorithm and spherical query algorithm are sensitive to noise and outliers, resulting in classification errors.
By uniformly selecting seed points in the point cloud file, gradually adjusting the neighborhood radius, calculating color distance and geometric features, dividing the neighborhood points using an indicator function, and extracting high-level category features through a convolutional neural network for clothing classification.
It achieves high-precision clothing classification, reduces the impact of noise and outliers on classification, and improves classification accuracy.
Smart Images

Figure CN115661529B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer vision, and in particular to a clothing classification method based on a point cloud file, a terminal device and a storage medium. BACKGROUND
[0002] Compared with 2D images, point cloud data suffers more severe corruption in real deployment due to the inaccuracy of 3D sensors and the complexity of real-world 3D scenes. Robustness to common corruptions is crucial for point cloud classification.
[0003] Existing point cloud classification algorithms usually generalize convolution to the irregular point cloud field by a fixed receptive field, such as a fixed neighborhood size. However, points are unordered and unstructured, and a fixed neighborhood size leads to an inductive bias imposed on the point cloud structure. The k-nearest neighbor algorithm searches for the k nearest neighbors of each key point, and the grouping thus produced is sensitive to noise and outliers. The spherical query algorithm limits its view to a constant radius sphere, and using the same radius or view at each location can cause problems, such as parts with lower density being easily mistaken for noise. These can all cause errors in the point cloud classification task. SUMMARY
[0004] To solve the above problems, the present application provides a clothing classification method based on a point cloud file, a terminal device and a storage medium.
[0005] The specific scheme is as follows:
[0006] A clothing classification method based on a point cloud file, comprising the following steps:
[0007] S1: receiving a clothing point cloud file, and based on the number of color blocks contained in the point cloud file , uniformly selecting seed points in the point cloud file;
[0008] S2: in order of increasing neighborhood radius, sequentially determining a spherical neighborhood and two annular neighborhoods for each seed point, and respectively calculating the color distance between each neighbor point in the spherical neighborhood and the annular neighborhood and the seed point, selecting part of the neighbor points for each color block as reserved points in order of increasing color distance, and in order of increasing neighborhood radius, the percentage of the selected reserved points in the total number of neighbor points in the corresponding neighborhood gradually decreases;
[0009] S3: merging all reserved points in the three neighborhoods, and after dividing according to color blocks, obtaining color blocks corresponding to the reserved points; merging all non-reserved points in the three neighborhoods, and after dividing according to color blocks, obtaining color blocks corresponding to the non-reserved points;color blocks;
[0010] S4: calculating the linearity, planarity and scattering value of each point in the color block to which the point belongs, and obtaining geometric features representing the shape of the local neighborhood of each point based on the calculated linearity, planarity and scattering value;
[0011] S5: dividing the color block corresponding to the reserved points into finer partitions by an indicator function, and defining the constant connected component of the solution of the indicator function as a finer reserved point partition; S6: dividing the color block corresponding to the non-reserved points into finer partitions by an indicator function, and defining the constant connected component of the solution of the indicator function as a finer non-reserved point partition;
[0012] S7: inputting the two constant connected components and together into a convolutional neural network to extract high-level class features;
[0013] S8: realizing classification of the clothes through the high-level class features.
[0014] S8: realizing classification of the clothes through the high-level class features.
[0015] Further, the determination method of the spherical neighborhood and the two annular neighborhoods of each seed point in step S2 is as follows:
[0016] Set the neighborhood with the seed point as the center and the neighborhood radius r as the spherical neighborhood of the seed point;
[0017] Set the region with the seed point as the center and the neighborhood radius between and as the first annular neighborhood of the seed point;
[0018] Set the region with the seed point as the center and the neighborhood radius between 2 and as the second annular neighborhood of the seed point.
[0019] Further, the calculation formula of the color distance is as follows:
[0020]
[0021]
[0022]
[0023] wherein, represents the first color distance, represents the second color distance, respectively represent color values of the neighboring points in red, green and blue color channels, respectively represent color values of the seed points in red, green and blue color channels.
[0024] Further, the percentages of the selected reserved points in the spherical neighborhood and the two ring-shaped neighborhoods in the total number of all neighboring points in the corresponding neighborhood are 60%, 30% and 10% in turn.
[0025] Further, the calculation formulae of the linearity , the planeness and the scattering value of each point in the color block to which the point belongs in step S4 are as follows:
[0026]
[0027]
[0028]
[0029] wherein, all represent standard deviations along the corresponding feature vectors, denotes a normalization coefficient.
[0030] A clothing classification terminal device based on a point cloud file, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described above when executing the computer program.
[0031] A computer-readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps of the method described above.
[0032] The technical scheme is adopted, and the clothing classification method with iterative updating of the neighborhood is proposed to solve the problem of the fixed neighborhood range, so that high-precision clothing classification can be achieved. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 The flowchart of the embodiment one of the present application is shown. DETAILED DESCRIPTION
[0034] To further illustrate the embodiments, the present application provides accompanying drawings. These drawings are part of the disclosure of the present application, mainly used to illustrate the embodiments, and can be used to explain the operation principle of the embodiments in conjunction with the related description of the specification. Those skilled in the art should understand other possible embodiments and advantages of the present application by referring to these contents.
[0035] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0036] Example 1:
[0037] This invention provides a clothing classification method based on point cloud files, such as... Figure 1 As shown, the method includes the following steps:
[0038] S1: Receive the clothing point cloud file and determine the color based on the number of color blocks contained in the point cloud file. Select evenly in the point cloud file Seed points.
[0039] In this embodiment, the dataset corresponding to the point cloud file is set as follows: N represents the number of points in the point cloud. The dimension representing the data.
[0040] S2: In order of increasing neighborhood radius, determine one spherical neighborhood and two annular neighborhoods for each seed point, and calculate the color distance between each neighboring point in the spherical neighborhood and the annular neighborhood and the seed point. Select a portion of the neighbors for each color block as retained points in order of increasing color distance, and gradually decrease the percentage of the selected retained points relative to the total number of neighbors in the corresponding neighborhood in order of increasing neighborhood radius.
[0041] In this embodiment, the method for determining one spherical neighborhood and two annular neighborhoods for each seed point is as follows: A spherical neighborhood of the seed point is defined with radius r centered at the seed point; a spherical neighborhood of the seed point is defined with radius r centered at the seed point. and The region between the two points is designated as the first annular neighborhood of the seed point; the radius of the neighborhood is set to be within 2π / 2 of the seed point. and The region between the points is designated as the second annular neighborhood of the seed point. The size of the neighborhood radius r needs to be set in advance.
[0042] The color distance used in this embodiment The calculation formula is:
[0043]
[0044]
[0045]
[0046] in, Indicates the distance of the first color. Indicates the distance of the second color. These represent the color values of neighboring points in the red, green, and blue color channels, respectively. These represent the color values of the seed point in the red, green, and blue color channels, respectively.
[0047] In this embodiment, the percentages of the retained points in the spherical neighborhood and the two annular neighborhoods relative to the total number of neighboring points in the corresponding neighborhoods are preferably set to 60%, 30%, and 10%, respectively. In other embodiments, those skilled in the art may set other values, which are not limited here.
[0048] S3: Merge all retained points within the three neighborhoods, and then divide them according to color blocks to obtain the points corresponding to the retained points. Each color block is used to merge all non-reserved points within its three neighborhoods, and then the points are divided according to the color blocks to obtain the corresponding non-reserved points. A color block.
[0049] S4: Calculate the linearity of each point within its corresponding color block. Flatness and scattering value And based on the calculated linearity Flatness and scattering value Obtain the geometric features that characterize the local neighborhood shape of each point. .
[0050] In this embodiment, the linearity of each point within its corresponding color block Flatness and scattering value The calculation formulas are as follows:
[0051]
[0052]
[0053]
[0054] in, Each represents the standard deviation along the corresponding eigenvector. This represents the normalization coefficient.
[0055] S5: Use indicator functions to retain the corresponding points The color blocks are divided into finer partitions, connecting the constant components of the solution to the indicator function. Defined as a more granular reserved point partition.
[0056] The formula for calculating the indicator function used in this embodiment is as follows:
[0057]
[0058] in, It is a fidelity function, ensuring the constant component of which corresponds to the homogeneous value of is a regularizer that adds a penalty to each edge connecting two components with different values, which enforces the simplicity of the line segment shape; is the strength of the regularization, which determines the trade-off between fidelity and simplicity, and implicitly determines the number of clusters; is an edge; is an edge weight; is the Iverson bracket.
[0059] S6: Divide the color block corresponding to the non-preservation point into finer partitions by the indicator function, and define the constant connected component of the solution of the indicator function as the finer non-preservation point partitions. The indicator function used in step S6 is the same as that in step S5.
[0060] S7: Input the two constant connected components and
[0061] into a convolutional neural network to extract high-level class features. .
[0062] S8: Classify the clothes by the high-level class features , such as inputting the high-level class features into a fully connected layer to obtain the clothing classification result.
[0063] The embodiment of the present application is an effective improvement on the classification algorithm using a fixed neighborhood range, and proposes a clothing classification algorithm with continuously iterated and updated neighborhoods. In addition, the embodiment calculates the geometric characteristics of each point in the color block to which it belongs, and divides the color block into finer partitions by the indicator function, so as to extract high-level class features by a convolutional neural network. Therefore, high-precision clothing classification results can be obtained by a fully connected layer.
[0064] Embodiment Two:
[0065] The present application also provides a clothing classification terminal device based on a point cloud file, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the above method embodiments of the embodiment one of the present application when executing the computer program.
[0066] Further, as an executable solution, the point cloud file based clothing classification terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The point cloud file based clothing classification terminal device can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above-mentioned composition structure of the point cloud file based clothing classification terminal device is only an example of the point cloud file based clothing classification terminal device, and does not constitute a limitation on the point cloud file based clothing classification terminal device, and can include more or fewer components than the above, or combine certain components, or different components, for example, the point cloud file based clothing classification terminal device can also include an input / output device, a network access device, a bus and the like, and the embodiments of the present application do not limit this.
[0067] Further, as an executable solution, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The processor is the control center of the point cloud file based clothing classification terminal device, and connects various parts of the point cloud file based clothing classification terminal device through various interfaces and lines.
[0068] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the point cloud file based clothing classification terminal device by running or executing the computer program and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the mobile phone and the like. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.
[0069] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method of the above-mentioned embodiments of the application.
[0070] The modules / units of the clothing classification terminal device based on the point cloud file are stored in a computer readable storage medium if they are realized in the form of software function units and sold or used as independent products. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM) and a software distribution medium, etc.
[0071] Although the application is specifically shown and described in connection with the preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the spirit and scope of the application as defined by the appended claims.
Claims
1. A clothing classification method based on point cloud files, characterized in that, Includes the following steps: S1: Receive the clothing point cloud file and determine the color based on the number of color blocks contained in the point cloud file. Select evenly in the point cloud file Seed points; S2: In order of increasing neighborhood radius, determine one spherical neighborhood and two annular neighborhoods for each seed point, and calculate the color distance between each neighboring point in the spherical neighborhood and the annular neighborhood and the seed point respectively. Select a portion of the neighbors for each color block as retained points in order of increasing color distance, and in order of increasing neighborhood radius, the percentage of the selected retained points relative to the total number of neighbors in the corresponding neighborhood gradually decreases. S3: Merge all retained points within the three neighborhoods, and then divide them according to color blocks to obtain the points corresponding to the retained points. Each color block is used to merge all non-reserved points within its three neighborhoods, and then the points are divided according to the color blocks to obtain the corresponding non-reserved points. A color block; S4: Calculate the linearity, flatness, and scattering value of each point within its respective color patch, and based on the calculated linearity, flatness, and scattering values, obtain the geometric features characterizing the local neighborhood shape of each point. ; S5: Use indicator functions to retain the corresponding points The color blocks are divided into finer partitions, connecting the constant components of the solution to the indicator function. Defined as a more granular reserved point partition; The formula for calculating the indicator function is as follows: in, It is a fidelity function used to ensure The constant component corresponds to homogeneous values; It is a regularizer used to add a penalty to each edge that connects two components with different values; The strength of the regularization; For the edge; The edge weight; For Iverson (in brackets); S6: The non-reserved point is corresponding to the indicator function. The color blocks are divided into finer partitions, connecting the constant components of the solution to the indicator function. Defined as a more granular non-reserved point partition; S7: Connect two constant components and Common input convolutional neural networks extract high-level category features; S8: Classify clothing using advanced category features; The method for determining one spherical neighborhood and two annular neighborhoods for each seed point in step S2 is as follows: Define a spherical neighborhood of the seed point with a radius of r centered at the seed point; Define a circle centered at the seed point, with a neighborhood radius of... and The region between them is taken as the first annular neighborhood of the seed point; Define a circle centered at the seed point with a neighborhood radius of 2. and The region between them is taken as the second annular neighborhood of the seed point.
2. The clothing classification method based on point cloud files according to claim 1, characterized in that: Color distance The calculation formula is: in, Indicates the distance of the first color. Indicates the distance of the second color. These represent the color values of neighboring points in the red, green, and blue color channels, respectively. These represent the color values of the seed point in the red, green, and blue color channels, respectively.
3. The clothing classification method based on point cloud files according to claim 1, characterized in that: The percentages of the selected retained points in the spherical neighborhood and the two annular neighborhoods relative to the total number of neighboring points in the corresponding neighborhoods are 60%, 30%, and 10%, respectively.
4. The clothing classification method based on point cloud files according to claim 1, characterized in that: In step S4, the linearity of each point within its corresponding color block Flatness and scattering value The calculation formulas are as follows: in, Each represents the standard deviation along the corresponding eigenvector. This represents the normalization coefficient.
5. A clothing classification terminal device based on point cloud files, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 4.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Region segmentation method for colorful textile texture images
CN102629386A
Point Net-based large-scale point cloud semantic segmentation algorithm
CN110097556A