Data labeling method and device, electronic equipment and storage medium
By storing and compressing point cloud data in a backend cache database and utilizing Netty multiplexing technology, the problem of low data annotation efficiency in multi-sensor fusion in autonomous vehicles is solved, data reading speed and annotation efficiency are improved, and user experience is enhanced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA AUTOMOTIVE INNOVATION CORP
- Filing Date
- 2023-08-31
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the data annotation efficiency of multi-sensor fusion data is relatively low. Especially in the environmental perception system of autonomous vehicles, traditional methods lead to large front-end computation, memory waste, and latency issues.
The target point cloud data is stored in the backend cache database and can be directly obtained through data request information. Compression algorithms and key-value pair storage structures are used to reduce front-end reading and caching. Netty multiplexing technology is used for data transmission to improve data reading speed and annotation efficiency.
It improves the efficiency of data annotation, reduces the computational burden on the front end, enhances the user experience, and solves the latency and lag issues caused by massive amounts of annotated data.
Smart Images

Figure CN117290389B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a data annotation method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of artificial intelligence technology, autonomous vehicles have gained widespread attention. Key technologies for autonomous vehicles mainly include environmental perception, localization and navigation, planning and decision-making, and vehicle control. Among these, environmental perception first requires various sensors to acquire information about the surrounding environment. Specifically, autonomous vehicles can use onboard cameras, LiDAR, millimeter-wave radar, and other sensors to perceive the surrounding environment, thereby monitoring changes in the vehicle in real time and making decisions based on the acquired environmental information to formulate safe and reasonable path plans.
[0003] In related technologies, since perception systems have a great need for data annotation, more specifically, obstacle recognition and tracking require automatic annotation of multi-sensor fusion data collected by different sensors, that is, by using mutual annotation between different sensors, so as to train and test machine learning-based perception systems.
[0004] However, traditional data annotation methods are inefficient for annotating multi-sensor fusion data. Summary of the Invention
[0005] This invention aims to at least solve the technical problems existing in the prior art. To this end, the first aspect of this invention proposes a data annotation method, which includes:
[0006] Obtain data request information for the target point cloud data;
[0007] Based on the data request information, retrieve the target point cloud data corresponding to the data request information from the cache database;
[0008] Perform coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled;
[0009] Based on multiple annotation locations, generate target annotation boxes in the image to be annotated.
[0010] In one possible implementation, the data request information includes first attribute information of the target dataset to which the target point cloud data belongs, and second attribute information of the target frame point cloud file to which the target point cloud data belongs. Based on the data request information, the target point cloud data corresponding to the data request information is retrieved from the cache database, including:
[0011] The first attribute information and the second attribute information are concatenated to generate the target keyword;
[0012] Based on the target keyword, the target value corresponding to the target keyword is obtained from the cache database as the target point cloud data.
[0013] In one possible implementation, the method further includes:
[0014] Obtain raw point cloud data from a pre-set point cloud database;
[0015] The original point cloud data is compressed using a preset compression algorithm to generate compressed point cloud data.
[0016] The compressed point cloud data is saved to the cache database according to the first preset storage structure; wherein, the keywords in the first preset storage structure are determined based on the first attribute information and the second attribute information, and the value corresponding to the keywords in the first preset storage structure is the compressed point cloud data.
[0017] Accordingly, based on the target keyword, the target value corresponding to the target keyword is retrieved from the cache database as the target point cloud data, including:
[0018] Based on the target keyword, retrieve the compressed point cloud data corresponding to the target keyword from the cache database;
[0019] The compressed point cloud data corresponding to the target keyword is decompressed to generate the target point cloud data.
[0020] In one possible implementation, the method further includes:
[0021] For multi-frame point cloud files in different datasets, obtain the first attribute information of each dataset and the second attribute information of each frame point cloud file;
[0022] Based on the first attribute information and the second attribute information, the original point cloud data is stored in the preset point cloud database according to the second preset storage structure.
[0023] In one possible implementation, the method further includes:
[0024] For each frame of point cloud file, obtain the first data format information of the point cloud file;
[0025] Based on the first preset mapping relationship, the data read / write method corresponding to the first data format information is obtained, and the point cloud file is read through the data read / write method to obtain the original point cloud data.
[0026] In one possible implementation, the labeled location points include first-type labeled location points and second-type labeled location points. Based on multiple labeled location points, a target labeled bounding box in the image to be labeled is generated, including:
[0027] Connect the first type of labeled points in a preset order to obtain the first rectangle; connect the second type of labeled points in a preset order to obtain the second rectangle.
[0028] Connect the vertices at the preset corresponding positions in the first rectangle and the second rectangle to generate the target annotation box in the image to be annotated.
[0029] In one possible implementation, a coordinate transformation is performed on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled, including:
[0030] For a preset number of labeled point cloud data, obtain the first coordinate information of each labeled point cloud data in the world coordinate system;
[0031] Perform coordinate transformation on the first coordinate information to generate the second coordinate information in the pixel coordinate system;
[0032] Based on the second coordinate information, multiple annotation location points are generated in the image to be annotated.
[0033] In one possible implementation, the first coordinate information is transformed to generate second coordinate information in the pixel coordinate system, including:
[0034] Based on the second preset mapping relationship, obtain the camera parameter information corresponding to the target frame point cloud file to which the target point cloud data belongs from the preset point cloud database;
[0035] Based on the camera parameter information, the first coordinate information is transformed to generate the second coordinate information.
[0036] In one possible implementation, the method further includes:
[0037] For each frame point cloud file, obtain the second data format information of the camera parameter file;
[0038] Based on the third preset mapping relationship, the data parsing method corresponding to the second data format information is obtained, and the camera parameter file is parsed through the data parsing method to obtain the camera parameter information;
[0039] The parameter information of each camera and the point cloud file of each frame are stored in the preset point cloud database according to the second preset mapping relationship.
[0040] A second aspect of the present invention provides a data annotation apparatus, the apparatus comprising:
[0041] The first acquisition module is used to acquire data request information for the target point cloud data;
[0042] The second acquisition module is used to obtain target point cloud data corresponding to the data request information from the cache database based on the data request information;
[0043] The conversion module is used to perform coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled.
[0044] The generation module is used to generate target bounding boxes in the image to be annotated based on multiple annotation location points.
[0045] In one possible implementation, the data request information includes first attribute information of the target dataset to which the target point cloud data belongs, and second attribute information of the target frame point cloud file to which the target point cloud data belongs. The second acquisition module is specifically used for:
[0046] The first attribute information and the second attribute information are concatenated to generate the target keyword;
[0047] Based on the target keyword, the target value corresponding to the target keyword is obtained from the cache database as the target point cloud data.
[0048] In one possible implementation, the data annotation device described above is further used for:
[0049] Obtain raw point cloud data from a pre-set point cloud database;
[0050] The original point cloud data is compressed using a preset compression algorithm to generate compressed point cloud data.
[0051] The compressed point cloud data is saved to the cache database according to the first preset storage structure; wherein, the keywords in the first preset storage structure are determined based on the first attribute information and the second attribute information, and the value corresponding to the keywords in the first preset storage structure is the compressed point cloud data.
[0052] Accordingly, the second acquisition module described above is also used for:
[0053] Based on the target keyword, retrieve the compressed point cloud data corresponding to the target keyword from the cache database;
[0054] The compressed point cloud data corresponding to the target keyword is decompressed to generate the target point cloud data.
[0055] In one possible implementation, the data annotation device described above is further used for:
[0056] For multi-frame point cloud files in different datasets, obtain the first attribute information of each dataset and the second attribute information of each frame point cloud file;
[0057] Based on the first attribute information and the second attribute information, the original point cloud data is stored in the preset point cloud database according to the second preset storage structure.
[0058] In one possible implementation, the data annotation device described above is further used for:
[0059] For each frame of point cloud file, obtain the first data format information of the point cloud file;
[0060] Based on the first preset mapping relationship, the data read / write method corresponding to the first data format information is obtained, and the point cloud file is read through the data read / write method to obtain the original point cloud data.
[0061] In one possible implementation, the labeled location points include first-type labeled location points and second-type labeled location points, and the aforementioned generation module is specifically used for:
[0062] Connect the first type of labeled points in a preset order to obtain the first rectangle; connect the second type of labeled points in a preset order to obtain the second rectangle.
[0063] Connect the vertices at the preset corresponding positions in the first rectangle and the second rectangle to generate the target annotation box in the image to be annotated.
[0064] In one possible implementation, the above-mentioned conversion module is specifically used for:
[0065] For a preset number of labeled point cloud data, obtain the first coordinate information of each labeled point cloud data in the world coordinate system;
[0066] Perform coordinate transformation on the first coordinate information to generate the second coordinate information in the pixel coordinate system;
[0067] Based on the second coordinate information, multiple annotation location points are generated in the image to be annotated.
[0068] In one possible implementation, the conversion module is further configured to:
[0069] Based on the second preset mapping relationship, obtain the camera parameter information corresponding to the target frame point cloud file to which the target point cloud data belongs from the preset point cloud database;
[0070] Based on the camera parameter information, the first coordinate information is transformed to generate the second coordinate information.
[0071] In one possible implementation, the data annotation device described above is further used for:
[0072] For each frame point cloud file, obtain the second data format information of the camera parameter file;
[0073] Based on the third preset mapping relationship, the data parsing method corresponding to the second data format information is obtained, and the camera parameter file is parsed through the data parsing method to obtain the camera parameter information;
[0074] The parameter information of each camera and the point cloud file of each frame are stored in the preset point cloud database according to the second preset mapping relationship.
[0075] A third aspect of the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the data annotation method as described in the first aspect.
[0076] A fourth aspect of the present invention provides a computer-readable storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the data annotation method as described in the first aspect.
[0077] The embodiments of the present invention have the following beneficial effects:
[0078] This invention provides a data annotation method, apparatus, electronic device, and storage medium. The method includes: acquiring data request information for target point cloud data; acquiring target point cloud data corresponding to the data request information from a cache database based on the data request information; performing coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be annotated; and generating a target annotation box in the image to be annotated based on the multiple labeled location points. This solution stores the target point cloud data in a backend cache database. Based on the data request information, the corresponding point cloud data can be directly obtained from the cache database, eliminating the need for reading and caching large amounts of point cloud data on the front end (browser). This avoids the impact on device performance caused by the large computational load when reading point cloud data on the front end, and also avoids wasting browser memory space when caching the read point cloud data. Simultaneously, storing the target point cloud data in a cache database improves the speed of reading the target point cloud data, thereby improving the efficiency of data annotation. Furthermore, single-frame point clouds are stored in the point cloud database in a striped hierarchy, and hot data is transmitted to the front end via multiplexing based on Netty. It reduces the computational burden on the front end, making the annotation interaction experience smoother and solving the latency and lag problems caused by massive annotation data. Attached Figure Description
[0079] Figure 1 A block diagram of a computer device provided in an embodiment of this application;
[0080] Figure 2 A flowchart illustrating the steps of a data annotation method provided in an embodiment of the present invention;
[0081] Figure 3 A flowchart illustrating the steps of storing data to a preset point cloud database, as provided in an embodiment of the present invention;
[0082] Figure 4 A flowchart illustrating the steps for acquiring target point cloud data is provided in this embodiment of the invention.
[0083] Figure 5 A flowchart illustrating the steps for obtaining raw point cloud data is provided in this embodiment of the invention.
[0084] Figure 6 A flowchart illustrating the steps for storing raw point cloud data, provided in an embodiment of the present invention;
[0085] Figure 7 This is a schematic diagram illustrating the storage of raw point cloud data according to an embodiment of the present invention;
[0086] Figure 8 A flowchart illustrating the steps for storing camera parameter information provided in an embodiment of the present invention;
[0087] Figure 9 A flowchart illustrating the steps for generating second coordinate information provided in an embodiment of the present invention;
[0088] Figure 10 A flowchart illustrating another step for generating second coordinate information provided in an embodiment of the present invention;
[0089] Figure 11 A flowchart illustrating the steps for generating target annotation boxes provided in an embodiment of the present invention;
[0090] Figure 12 A schematic diagram of a target annotation box provided in an embodiment of the present invention;
[0091] Figure 13 An overall framework diagram for data annotation provided in an embodiment of the present invention;
[0092] Figure 14 This is a structural block diagram of a data annotation device provided in an embodiment of the present invention. Detailed Implementation
[0093] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0094] In related technologies, perception systems have a high demand for data annotation. More specifically, obstacle recognition and tracking require automatic annotation of multi-sensor fusion data collected by different sensors, i.e., mutual annotation between different sensors, to train and test machine learning-based perception systems. In autonomous driving scenarios, point cloud data generated by LiDAR can be used to measure the shape and contour of objects and estimate the position and velocity of surrounding objects. However, because LiDAR-generated point cloud data lacks the texture and color information present in RGB data, it cannot accurately identify cars, pedestrians, obstacles, traffic lights, etc. on the road. 2D visual images contain rich semantic information and can be fused with 3D point cloud data, enabling autonomous driving systems to accurately understand their surroundings and make accurate decisions. Therefore, current autonomous driving data annotation projects have shifted from separate annotation of 2D images and 3D point clouds to a 2D-3D fusion annotation process. Regarding 2D-3D fusion annotation projects, the degree of customer customization is high. In the future, annotation requirements will change due to algorithm improvements.
[0095] The differences in sensor models, specifications, and data preprocessing formats result in various point cloud file formats, and camera parameter files also vary. Currently, there is no universal data adaptation tool to parse these different formats. Furthermore, the sheer volume of single-frame point cloud data generated daily, along with externally acquired data, leads to significant computational and caching demands on the front-end (browser), wasting time and space, impacting performance and user experience. The lack of data storage capabilities on the front-end limits its ability to read and write various point cloud files. Finally, the computational complexity and frequency of 3D-to-2D conversion during 2D-3D fusion annotation cause delays and stuttering in automatic annotation. All of these factors contribute to the low efficiency of automatic annotation of multi-sensor fusion data.
[0096] In view of this, this application provides a data annotation method, apparatus, electronic device, and storage medium. By storing the target point cloud data in a backend cache database, the corresponding point cloud data can be directly obtained from the cache database based on the data request information. This eliminates the need to read and cache large amounts of point cloud data on the front end (i.e., the browser), avoiding the impact on device performance caused by the large amount of computation when reading point cloud data on the front end, and also avoiding the waste of browser memory space when caching the read point cloud data. At the same time, storing the target point cloud data in the cache database increases the speed of reading the target point cloud data, thereby improving the efficiency of data annotation.
[0097] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more. Furthermore, the use of "based on" or "according to" implies openness and inclusiveness, because processes, steps, calculations, or other actions "based on" or "according to" one or more of the stated conditions or values may in practice be based on additional conditions or beyond the stated values.
[0098] The data annotation method provided in this application can be applied to computer equipment (electronic devices). The computer equipment can be a server or a terminal. The server can be a single server or a server cluster composed of multiple servers. This application does not specifically limit this. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets and portable wearable devices.
[0099] Taking a computer device as an example, Figure 1 A block diagram of a server is shown, such as Figure 1 As shown, the server may include a processor and memory connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. When the computer program is executed by the processor, it implements a data annotation method.
[0100] Those skilled in the art will understand that Figure 1The structure shown is merely a block diagram of a portion of the structure related to the solution of this application and does not constitute a limitation on the server to which the solution of this application is applied. Optionally, the server may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0101] It should be noted that the execution subject of the embodiments of this application can be a computer device or a data annotation device. The following method embodiments will be described with a computer device as the execution subject.
[0102] Figure 2 This is a flowchart illustrating the steps of a data annotation method provided in an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:
[0103] Step 202: Obtain data request information for the target point cloud data.
[0104] When the front-end, i.e. the browser, needs to annotate data, it first needs to send a data request message, i.e., send a WebSocket request. WebSocket is a real-time communication protocol used by browsers, which can achieve real-time data push.
[0105] The data request information may include the first attribute information of the target dataset to which the target point cloud data belongs, and the second attribute information of the target frame point cloud file to which the target point cloud data belongs. The first attribute information may include, but is not limited to, the ID information of the target dataset, and the second attribute information may include, but is not limited to, the time point information and file header description information of the target frame point cloud file.
[0106] Step 204: Based on the data request information, retrieve the target point cloud data corresponding to the data request information from the cache database.
[0107] After obtaining the data request information, a pre-built point cloud preloading push microservice can be used to retrieve the target point cloud data corresponding to the data request information from the cache database.
[0108] Optionally, the point cloud preloading and push microservice can employ Netty's epoll-based multiplexed I / O model to handle a large number of WebSocket requests. In short, it uses one or more threads to process multiple WebSocket requests, thereby enabling rapid acquisition of the target point cloud data. Netty is an open-source Java framework that provides an asynchronous, event-driven network application framework and tools for rapidly developing high-performance, highly reliable network server and client programs. epoll is an I / O event notification mechanism in the Linux kernel that can monitor multiple I / O events and notify the application to handle them when they occur.
[0109] The cache database can be a Redis cache database. Redis is an open-source, high-performance key-value database developed in C, where the key is the keyword and the value is the corresponding value. In actual business applications, multi-frame point cloud files collected can be preprocessed to obtain raw point cloud data, which is then stored in a pre-defined point cloud database, and finally compressed before being stored in the cache database.
[0110] In some alternative embodiments, such as Figure 3 As shown, Figure 3 A flowchart illustrating the steps of storing data to a preset point cloud database, as provided in this embodiment of the invention, includes:
[0111] Step 302: Obtain raw point cloud data from the preset point cloud database.
[0112] Step 304: Compress the original point cloud data using a preset compression algorithm to generate compressed point cloud data.
[0113] Step 306: Save the compressed point cloud data to the cache database according to the first preset storage structure.
[0114] The preset point cloud database is used to store the raw point cloud data after preprocessing of multi-frame point cloud files collected in actual business operations. The acquired raw point cloud data can be compressed using a preset compression algorithm to generate compressed point cloud data. The preset compression algorithm can be the Zstd (Zstandard, abbreviated as Zstd) compression algorithm, which is a highly efficient and lossless compression algorithm. The specific compression process can be found in existing theoretical knowledge and will not be elaborated here. Of course, the preset compression algorithm can also be other types of compression algorithms; the optimal algorithm can be selected based on the compression effect. This application embodiment does not specifically limit this.
[0115] The key in the first preset storage structure is determined based on the first attribute information and the second attribute information. The value corresponding to the key in the first preset storage structure is the compressed point cloud data. The compressed point cloud data can be stored in a distributed Redis cache database in the form of a hash table HASH(indexed,data), where HASH(indexed,data) is a structure that stores data through key-value pairs.
[0116] Accordingly, retrieving the target value corresponding to the target keyword from the cache database as the target point cloud data based on the target keyword may include: retrieving the compressed point cloud data corresponding to the target keyword from the cache database based on the target keyword, decompressing the compressed point cloud data corresponding to the target keyword, and generating the target point cloud data.
[0117] The process involves quickly retrieving compressed point cloud data corresponding to a target keyword from a cached database. Next, a preset decompression algorithm is used to decompress the compressed point cloud data corresponding to the target keyword, generating the target point cloud data. No specific limitation is placed on the preset decompression algorithm; an optimal algorithm can be selected based on the decompression effect.
[0118] In addition, the compressed point cloud data in the cache database can be automatically cleaned up after the data annotation process is completed and the corresponding business project is finished. Since the original point cloud data is also stored in the preset point cloud database, it can be reloaded into the cache database in the above manner when the point cloud data is used again. The compressed point cloud data in the cache database is called hot data, and the original point cloud data in the preset point cloud database is cold data. This can achieve the purpose of separating hot and cold data and ensure the reliability and security of the data.
[0119] In this embodiment, the raw point cloud data is compressed and stored in the cache database, reducing the amount of raw point cloud data and enabling rapid storage in the cache database. Furthermore, storing the raw point cloud data using a key-value pair structure facilitates quick retrieval of the corresponding target point cloud data, thereby improving the efficiency of subsequent data annotation. This also solves the latency and lag issues caused by annotating massive amounts of point cloud data, resulting in a smoother interactive experience for data annotation.
[0120] In some optional embodiments, when retrieving target point cloud data from a cached database based on data request information, such as Figure 4 As shown, Figure 4 A flowchart of steps for acquiring target point cloud data provided in an embodiment of the present invention includes:
[0121] Step 402: Concatenate the first attribute information and the second attribute information to generate the target keyword.
[0122] Step 404: Based on the target keyword, retrieve the target value corresponding to the target keyword from the cache database as the target point cloud data.
[0123] The point cloud preloading push microservice can concatenate the first and second attribute information in the data request information to generate the target keyword. Since the original point cloud data in the cache database is stored in a key-value pair structure, the target value corresponding to the target keyword can be directly obtained from the cache database as the target point cloud data based on the target keyword.
[0124] In this embodiment, the corresponding target point cloud data can be quickly found using target keywords, thereby improving the efficiency of subsequent data annotation. Furthermore, compared to directly reading disk files from a preset point cloud database to obtain target point cloud data, the data from the cache database is stored in the cache and not on disk, significantly reducing the data reading time and improving the efficiency of obtaining target point cloud data.
[0125] In some optional embodiments, multi-frame point cloud files collected in actual business operations can be preprocessed to obtain raw point cloud data. When storing the raw point cloud data in a preset point cloud database, optionally, after the data files collected by the data acquisition personnel are uploaded to the annotation platform, the data files and directory structure are saved in the preset point cloud database PostgreSQL. PostgreSQL is an object-relational database and is currently the most powerful, feature-rich, and complex free software database system. The specific data files are uploaded to Object Storage Service (OBS). These data files can include multi-frame point cloud files, as well as images and camera parameter files. Administrators can first create single-frame continuous frame point cloud preprocessing tasks, that is, preprocess each frame of the point cloud file sequentially. After publishing the task, a message is sent to Kafka, and the point cloud service consumes the message for preprocessing. Kafka is a distributed stream processing platform; its core is a high-throughput publish-subscribe messaging system.
[0126] During preprocessing, data files can be downloaded from OBS to a newly created mesh folder on the local machine according to the storage path corresponding to the preprocessing task. The data provider will configure the point cloud files, camera parameter files, relative paths of images, and point cloud file formats of this dataset in advance in the registration configuration center, and push the configuration information of the camera parameter files to the registration configuration center.
[0127] In some alternative embodiments, when obtaining raw point cloud data through a preprocessing task, such as Figure 5 As shown, Figure 5 A flowchart of steps for obtaining raw point cloud data provided in an embodiment of the present invention includes:
[0128] Step 502: For each frame of point cloud file, obtain the first data format information of the point cloud file.
[0129] Step 504: Based on the first preset mapping relationship, obtain the data read / write method corresponding to the first data format information, and read the point cloud file through the data read / write method to obtain the original point cloud data.
[0130] The first data format information of the point cloud file may include, but is not limited to, formats such as pcd, bin, and text. After obtaining the first data format information from the registration configuration center, the data read / write method corresponding to the first data format information is obtained based on the first preset mapping relationship. The point cloud file is then read using the data read / write method to obtain the raw point cloud data. Optionally, a pre-built corresponding point cloud read / write tool in the Python service can be called to read the point cloud file. The first preset mapping relationship is a pre-set correspondence between the first data format information and the data read / write method.
[0131] In this embodiment, by selecting the corresponding data reading method based on different first data format information, point cloud files of different formats are parsed, which improves the flexibility of parsing point cloud files and thus improves the efficiency of obtaining raw point cloud data, thereby laying the foundation for improving the efficiency of data annotation in the future.
[0132] In other alternative embodiments, when storing the raw point cloud data into a preset point cloud database, such as... Figure 6 As shown, Figure 6 A flowchart of steps for storing raw point cloud data provided in an embodiment of the present invention includes:
[0133] Step 602: For multi-frame point cloud files in different datasets, obtain the first attribute information of each dataset and the second attribute information of each frame point cloud file.
[0134] Step 604: Based on the first attribute information and the second attribute information, store the original point cloud data into the preset point cloud database according to the second preset storage structure.
[0135] The first attribute information may include, but is not limited to, the ID information of the target dataset, and the second attribute information may include, but is not limited to, the time point information of the target frame point cloud file, and the descriptive information of the file header. The first attribute information can be stored in a mesh table, the second attribute information can be stored in an index table, and the actual raw point cloud data can be stored in a patch table. Thus, all point cloud files under a dataset are stored in a preset point cloud database according to three dimensions: the mesh table, the index table, and the patch table. The second preset storage structure is the storage structure composed of these three dimensions. Figure 7 As shown, Figure 7 This is a schematic diagram of storing raw point cloud data according to an embodiment of the present invention. Mesh1 and mesh2 are two different datasets. Index1 and index2 store the point cloud files under dataset mesh1, and index3 and index4 store the point cloud files under dataset mesh2. Each of them has a corresponding patch table that stores the raw point cloud data.
[0136] Alternatively, the latitude and longitude of raw point cloud data can be stored in a pre-defined point cloud database using the geometry type provided by the pgpointcloud plugin for the object-relational database PostGIS. PostGIS is an extension of the object-relational database system PostgreSQL, possessing the ability to manage spatial databases. Pgpointcloud is a plugin that stores multiple points in a point set. The geometry type is a field type used to store the latitude and longitude of raw point cloud data.
[0137] In addition, when storing raw point cloud data, multi-threaded parallel processing can be used to improve the efficiency of storing raw point cloud data.
[0138] In this embodiment, by storing the original point cloud data into a preset point cloud database according to a second preset storage structure based on the first attribute information and the second attribute information, the original point cloud data can be managed and maintained more conveniently and uniformly. In addition, the second preset storage structure can also improve the efficiency of subsequent queries of the original point cloud data.
[0139] In some optional embodiments, the above preprocessing task further includes preprocessing of the camera parameter file, such as... Figure 8 As shown, Figure 8 A flowchart illustrating steps for storing camera parameter information, provided in an embodiment of the present invention, includes:
[0140] Step 802: For the camera parameter file corresponding to each frame point cloud file, obtain the second data format information of the camera parameter file.
[0141] Step 804: Based on the third preset mapping relationship, obtain the data parsing method corresponding to the second data format information, and parse the camera parameter file through the data parsing method to obtain the camera parameter information.
[0142] Step 806: Store the camera parameter information and the point cloud files of each frame in the preset point cloud database according to the second preset mapping relationship.
[0143] The camera parameter file may include camera intrinsic and extrinsic parameters, as well as distortion parameters. The specific content of these parameters is based on existing theoretical knowledge and will not be elaborated here. Each point cloud file has corresponding camera parameter information, meaning there is a second preset mapping relationship.
[0144] The second data format information of the camera parameter file can be obtained from the schema configuration information of the camera parameter file pushed by the configuration center. The schema configuration information typically defines the format of the data file, including the definition of field types, the definition of search types, etc.
[0145] After obtaining the schema configuration information from the registration configuration center and thus the second data format information, the data parsing method corresponding to the second data format information is obtained based on the third preset mapping relationship. The camera parameter file is then parsed using this data parsing method to obtain the camera parameter information. Optionally, after obtaining the schema configuration information, it can be parsed using json-schema technology to obtain the second data format information. Then, the camera parameter file under the specified relative path is parsed based on the corresponding data parsing method to obtain the camera parameter information. Finally, the camera parameter information and each frame point cloud file are stored in the preset point cloud database according to the second preset mapping relationship.
[0146] In this embodiment, by selecting the corresponding data parsing method based on different second data format information, camera parameter files of different formats are parsed, improving the flexibility of parsing camera parameter files and thus increasing the efficiency of subsequent data annotation. Furthermore, by storing each camera parameter information and each frame point cloud file according to a second preset mapping relationship, when using camera parameter information of the corresponding specifications later, it can be directly retrieved from the database without needing to re-adapt and parse the changed data format, thus improving the convenience of using camera parameter information.
[0147] Step 206: Perform coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled.
[0148] After obtaining the target point cloud data, a 3D point cloud can be rendered on the front-end browser page. Then, a 3D bounding box can be annotated on the point cloud, i.e., a 3D bounding box is drawn in the 3D point cloud. Based on this annotated 3D bounding box, a preset number of annotated point cloud data points are determined from the target point cloud data. Optionally, when annotating data on the front end, since point cloud target recognition is annotated according to physical 3D bounding boxes, it can be represented by 8 points. The front end can send 8 sets of annotated point cloud data back to the back end in the format {front: [1,2,3,4]}{back: [1,2,3,4]}. The back end performs coordinate transformation on each annotated point cloud data point, i.e., performs 3D to 2D calculation, thereby generating multiple annotation location points in the image to be annotated.
[0149] In some alternative embodiments, such as Figure 9 As shown, Figure 9 A flowchart of steps for generating second coordinate information provided in an embodiment of the present invention includes:
[0150] Step 902: For a preset number of labeled point cloud data, obtain the first coordinate information of each labeled point cloud data in the world coordinate system.
[0151] Step 904: Perform coordinate transformation on the first coordinate information to generate the second coordinate information in the pixel coordinate system.
[0152] Step 906: Based on the second coordinate information, generate multiple annotation location points in the image to be annotated.
[0153] The first coordinate information (Xw, Yw, Zw) of each labeled point cloud data in the world coordinate system can be obtained from a preset point cloud database or calculated. For example, if the collected labeled point cloud data is not in the world coordinate system, a coordinate system transformation is required to obtain the first coordinate information. After transforming the first coordinate information, the second coordinate information (u, v) in the pixel coordinate system can be generated.
[0154] In some optional embodiments, when performing coordinate transformation on the first coordinate information, the camera parameter information corresponding to the target frame point cloud file to which the target point cloud data belongs can be used as a basis, and the data parsing method corresponding to the second data format information of the camera parameter information can be obtained based on the third preset mapping relationship. The camera parameter file can be parsed in real time through the data parsing method to obtain the specific camera parameter information, thereby performing coordinate transformation on the first coordinate information based on the camera parameter information to generate the second coordinate information in the pixel coordinate system.
[0155] In other alternative embodiments, such as Figure 10 As shown, Figure 10Another flowchart for generating second coordinate information provided in an embodiment of the present invention includes:
[0156] Step 1002: Based on the second preset mapping relationship, obtain the camera parameter information corresponding to the target frame point cloud file to which the target point cloud data belongs from the preset point cloud database.
[0157] Step 1004: Perform coordinate transformation on the first coordinate information based on the camera parameter information to generate the second coordinate information.
[0158] Among them, the camera parameter information corresponding to the target frame point cloud file to which the target point cloud data belongs can be directly obtained from the preset point cloud database based on the second preset mapping relationship, so as to perform coordinate transformation on the first coordinate information based on formula (1) to generate the second coordinate information.
[0159]
[0160] Among them, Z c dx is the value on the Z-axis in the camera coordinate system, f is the camera focal length, dx is the physical size of the pixel in the u-axis direction, dy is the physical size of the pixel in the v-axis direction, (u0,v0) are the coordinates of the center point of the image plane, R is the rotation matrix, and T is the translation matrix.
[0161] The world coordinate system can be transformed into the camera coordinate system, the camera coordinate system into the image coordinate system, and finally the image coordinate system into the pixel coordinate system, thus obtaining the final formula (1), which can be used to calculate the second coordinate information. The calculation process involves homogenizing the world coordinate system coordinates of the labeled point cloud data, transforming the extrinsic and intrinsic parameters (distortion processing), and obtaining the pixel coordinate system coordinates of the image. In addition, based on the column, the points with a depth Z < 0 in the projected image (points behind the projected image) are deleted. Then, the projection range is fixed, points that exceed the image range are filtered, and points on the pixel coordinate axis are filled in. This is the entire calculation process. The specific transformation process between the various coordinate systems can be found in existing theoretical knowledge and will not be elaborated here.
[0162] In this embodiment, by directly obtaining data from the database based on the second preset mapping relationship, there is no need to re-adapt and parse the changed data format, which improves the convenience of using camera parameter information, thereby improving the efficiency of coordinate transformation and subsequently improving the efficiency of data annotation.
[0163] Step 208: Generate target bounding boxes in the image to be annotated based on multiple annotation location points.
[0164] After obtaining multiple annotation location points, the front end can connect the multiple annotation location points using the corresponding connection rules to generate the target annotation box in the image to be annotated.
[0165] In some alternative embodiments, such as Figure 11 As shown, Figure 11 A flowchart of steps for generating target annotation boxes provided in an embodiment of the present invention includes:
[0166] Step 1102: Connect the first type of annotation points in a preset order to obtain the first rectangle; connect the second type of annotation points in a preset order to obtain the second rectangle.
[0167] Step 1104: Connect the vertices at the preset corresponding positions in the first rectangle and the second rectangle to generate the target annotation box in the image to be annotated.
[0168] The labeled location points can include both first-type and second-type labeled location points. Since the front-end transmits the 8 sets of labeled point cloud data to the back-end for coordinate transformation calculation according to the agreed format {front: [1,2,3,4]}{back: [1,2,3,4]}, {front: [1,2,3,4]} represents the first-type labeled location points, and {back: [1,2,3,4]} represents the second-type labeled location points. Please refer to [link / reference needed]. Figure 12 , Figure 12 This is a schematic diagram of a target annotation box provided in an embodiment of the present invention. The target annotation box is used to annotate target vehicles. After the front end obtains multiple annotation position points, since the front end knows the front and rear positions of the target vehicle in advance, abcd are the first type of annotation position points, and they correspond to the annotation point cloud data in {front: [1,2,3,4]}. a′b′c′d′ are the second type of annotation position points, and they correspond to the annotation point cloud data in {back: [1,2,3,4]}.
[0169] Therefore, on the image to be labeled, the front end automatically connects the four labeling points (abcd) in a preset order for both the first and second type of labeling points to obtain the first rectangle; and connects the second type of labeling points in the same preset order to obtain the second rectangle. The preset order can be either clockwise or counter-clockwise.
[0170] Next, the vertices at preset corresponding positions in the first and second rectangles can be connected to generate the target annotation boxes in the image to be annotated. The vertices at the preset corresponding positions are determined according to the order in which the front-end transmits data to the back-end in an agreed format. That is, the first data in the first type of annotation position point corresponds to the first data in the second type of annotation position point, and so on. The vertices at the preset corresponding positions correspond to a and a′, b and b′, c and c′, and d and d′. These correspondences are also known to the front-end, so the corresponding vertices in the first and second rectangles can be automatically connected to obtain the target annotation boxes on the image to be annotated.
[0171] Please continue to refer to this. Figure 12 The generated target bounding boxes are called pseudo-3D boxes because the image to be labeled is a two-dimensional plane. To represent the shape of a 3D box, the invisible areas can be connected with dashed lines, i.e. Figure 12 There is a position connected by three dotted lines.
[0172] In addition, when drawing a 3D bounding box in a 3D point cloud, you can arbitrarily select the point cloud data to be labeled. The backend will then perform coordinate transformation on the labeled point cloud data in real time, thereby displaying the corresponding labeled position points on the image to be labeled in real time.
[0173] In this embodiment, two rectangles are first obtained by using the first type of annotation location points and the second type of annotation location points respectively, and then the final target annotation box is obtained based on the two rectangles. These processes are all completed automatically by the front end, without the need for manual drawing of the target annotation box on the image to be annotated, which improves the efficiency and accuracy of data annotation. In addition, the process of generating the target annotation box using this method is simple and easy to operate, which further improves the efficiency of data annotation.
[0174] The data annotation method provided in this invention includes: obtaining data request information for target point cloud data; obtaining target point cloud data corresponding to the data request information from a cache database based on the data request information; performing coordinate transformation on a preset number of annotated point cloud data in the target point cloud data to generate multiple annotation location points in the image to be annotated; and generating target annotation boxes in the image to be annotated based on the multiple annotation location points. This solution stores the target point cloud data in a backend cache database. Based on the data request information, the corresponding point cloud data can be directly obtained from the cache database, eliminating the need for reading and caching large amounts of point cloud data on the front end (browser). This avoids the impact on device performance caused by the large computational load when reading point cloud data on the front end, and also avoids wasting browser memory space when caching the read point cloud data. Simultaneously, storing the target point cloud data in a cache database improves the speed of reading the target point cloud data, thereby increasing the efficiency of data annotation.
[0175] Figure 13 This invention provides an overall framework diagram for data annotation. By storing target point cloud data in a backend cache database, the corresponding point cloud data can be directly retrieved from the cache database based on data request information. This eliminates the need for reading and caching large amounts of point cloud data on the front end (browser), avoiding the impact on device performance caused by the large amount of computation when reading point cloud data on the front end, and also avoiding the waste of browser memory space when caching the read point cloud data. At the same time, storing target point cloud data in a cache database improves the speed of reading target point cloud data, thereby improving the efficiency of data annotation.
[0176] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0177] Figure 14 This is a structural block diagram of a data annotation device provided in an embodiment of the present invention.
[0178] like Figure 14 As shown, the data annotation device 1400 includes:
[0179] The first acquisition module 1402 is used to acquire data request information for the target point cloud data.
[0180] The second acquisition module 1404 is used to acquire target point cloud data corresponding to the data request information from the cache database based on the data request information.
[0181] The conversion module 1406 is used to perform coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled.
[0182] The generation module 1408 is used to generate target bounding boxes in the image to be annotated based on multiple annotation location points.
[0183] Regarding the apparatus in the above embodiments, the specific methods by which each module performs its operations have been described in detail in the embodiments related to the method, and will not be elaborated upon here. Each module in the above data annotation apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in a computer device in hardware form, or it can be stored in the memory of a computer device in software form, so that the processor can call and execute the operations of each module.
[0184] In one embodiment of this application, a computer device is provided, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0185] Obtain data request information for the target point cloud data;
[0186] Based on the data request information, retrieve the target point cloud data corresponding to the data request information from the cache database;
[0187] Perform coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled;
[0188] Based on multiple annotation locations, generate target annotation boxes in the image to be annotated.
[0189] In one embodiment of this application, the data request information includes first attribute information of the target dataset to which the target point cloud data belongs, and second attribute information of the target frame point cloud file to which the target point cloud data belongs. When the processor executes the computer program, it further implements the following steps:
[0190] The first attribute information and the second attribute information are concatenated to generate the target keyword;
[0191] Based on the target keyword, the target value corresponding to the target keyword is obtained from the cache database as the target point cloud data.
[0192] In one embodiment of this application, the processor further performs the following steps when executing the computer program:
[0193] Obtain raw point cloud data from a pre-set point cloud database;
[0194] The original point cloud data is compressed using a preset compression algorithm to generate compressed point cloud data.
[0195] The compressed point cloud data is saved to the cache database according to the first preset storage structure; wherein, the keywords in the first preset storage structure are determined based on the first attribute information and the second attribute information, and the value corresponding to the keywords in the first preset storage structure is the compressed point cloud data.
[0196] Accordingly, based on the target keyword, the target value corresponding to the target keyword is retrieved from the cache database as the target point cloud data, including:
[0197] Based on the target keyword, retrieve the compressed point cloud data corresponding to the target keyword from the cache database;
[0198] The compressed point cloud data corresponding to the target keyword is decompressed to generate the target point cloud data.
[0199] In one embodiment of this application, the processor further performs the following steps when executing the computer program:
[0200] For multi-frame point cloud files in different datasets, obtain the first attribute information of each dataset and the second attribute information of each frame point cloud file;
[0201] Based on the first attribute information and the second attribute information, the original point cloud data is stored in the preset point cloud database according to the second preset storage structure.
[0202] In one embodiment of this application, the processor further performs the following steps when executing the computer program:
[0203] For each frame of point cloud file, obtain the first data format information of the point cloud file;
[0204] Based on the first preset mapping relationship, the data read / write method corresponding to the first data format information is obtained, and the point cloud file is read through the data read / write method to obtain the original point cloud data.
[0205] In one embodiment of this application, the labeled location points include first-type labeled location points and second-type labeled location points. When the processor executes the computer program, it further implements the following steps:
[0206] Connect the first type of labeled points in a preset order to obtain the first rectangle; connect the second type of labeled points in a preset order to obtain the second rectangle.
[0207] Connect the vertices at the preset corresponding positions in the first rectangle and the second rectangle to generate the target annotation box in the image to be annotated.
[0208] In one embodiment of this application, the processor further performs the following steps when executing the computer program:
[0209] For a preset number of labeled point cloud data, obtain the first coordinate information of each labeled point cloud data in the world coordinate system;
[0210] Perform coordinate transformation on the first coordinate information to generate the second coordinate information in the pixel coordinate system;
[0211] Based on the second coordinate information, multiple annotation location points are generated in the image to be annotated.
[0212] In one embodiment of this application, the processor further performs the following steps when executing the computer program:
[0213] Based on the second preset mapping relationship, obtain the camera parameter information corresponding to the target frame point cloud file to which the target point cloud data belongs from the preset point cloud database;
[0214] Based on the camera parameter information, the first coordinate information is transformed to generate the second coordinate information.
[0215] In one embodiment of this application, the processor further performs the following steps when executing the computer program:
[0216] For each frame point cloud file, obtain the second data format information of the camera parameter file;
[0217] Based on the third preset mapping relationship, the data parsing method corresponding to the second data format information is obtained, and the camera parameter file is parsed through the data parsing method to obtain the camera parameter information;
[0218] The parameter information of each camera and the point cloud file of each frame are stored in the preset point cloud database according to the second preset mapping relationship.
[0219] The computer device provided in the above embodiments has similar implementation principles and technical effects to the above method embodiments, and will not be described again here.
[0220] In one embodiment of this application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps:
[0221] Obtain data request information for the target point cloud data;
[0222] Based on the data request information, retrieve the target point cloud data corresponding to the data request information from the cache database;
[0223] Perform coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled;
[0224] Based on multiple annotation locations, generate target annotation boxes in the image to be annotated.
[0225] In one embodiment of this application, the data request information includes first attribute information of the target dataset to which the target point cloud data belongs, and second attribute information of the target frame point cloud file to which the target point cloud data belongs. When the computer program is executed by the processor, it further implements the following steps:
[0226] The first attribute information and the second attribute information are concatenated to generate the target keyword;
[0227] Based on the target keyword, the target value corresponding to the target keyword is obtained from the cache database as the target point cloud data.
[0228] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps:
[0229] Obtain raw point cloud data from a pre-set point cloud database;
[0230] The original point cloud data is compressed using a preset compression algorithm to generate compressed point cloud data.
[0231] The compressed point cloud data is saved to the cache database according to the first preset storage structure; wherein, the keywords in the first preset storage structure are determined based on the first attribute information and the second attribute information, and the value corresponding to the keywords in the first preset storage structure is the compressed point cloud data.
[0232] Accordingly, based on the target keyword, the target value corresponding to the target keyword is retrieved from the cache database as the target point cloud data, including:
[0233] Based on the target keyword, retrieve the compressed point cloud data corresponding to the target keyword from the cache database;
[0234] The compressed point cloud data corresponding to the target keyword is decompressed to generate the target point cloud data.
[0235] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps:
[0236] For multi-frame point cloud files in different datasets, obtain the first attribute information of each dataset and the second attribute information of each frame point cloud file;
[0237] Based on the first attribute information and the second attribute information, the original point cloud data is stored in the preset point cloud database according to the second preset storage structure.
[0238] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps:
[0239] For each frame of point cloud file, obtain the first data format information of the point cloud file;
[0240] Based on the first preset mapping relationship, the data read / write method corresponding to the first data format information is obtained, and the point cloud file is read through the data read / write method to obtain the original point cloud data.
[0241] In one embodiment of this application, the labeled location points include first-type labeled location points and second-type labeled location points. When the computer program is executed by the processor, it further implements the following steps:
[0242] Connect the first type of labeled points in a preset order to obtain the first rectangle; connect the second type of labeled points in a preset order to obtain the second rectangle.
[0243] Connect the vertices at the preset corresponding positions in the first rectangle and the second rectangle to generate the target annotation box in the image to be annotated.
[0244] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps:
[0245] For a preset number of labeled point cloud data, obtain the first coordinate information of each labeled point cloud data in the world coordinate system;
[0246] Perform coordinate transformation on the first coordinate information to generate the second coordinate information in the pixel coordinate system;
[0247] Based on the second coordinate information, multiple annotation location points are generated in the image to be annotated.
[0248] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps:
[0249] Based on the second preset mapping relationship, obtain the camera parameter information corresponding to the target frame point cloud file to which the target point cloud data belongs from the preset point cloud database;
[0250] Based on the camera parameter information, the first coordinate information is transformed to generate the second coordinate information.
[0251] In one embodiment of this application, the computer program, when executed by a processor, further performs the following steps:
[0252] For each frame point cloud file, obtain the second data format information of the camera parameter file;
[0253] Based on the third preset mapping relationship, the data parsing method corresponding to the second data format information is obtained, and the camera parameter file is parsed through the data parsing method to obtain the camera parameter information;
[0254] The parameter information of each camera and the point cloud file of each frame are stored in the preset point cloud database according to the second preset mapping relationship.
[0255] The computer storage medium provided in the above embodiments has similar implementation principles and technical effects to the above method embodiments, and will not be described again here.
[0256] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs).
[0257] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered as the area recorded in this specification.
[0258] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of this application's patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data annotation method, characterized in that, The method includes: Obtain data request information for target point cloud data; the data request information includes first attribute information of the target dataset to which the target point cloud data belongs, and second attribute information of the target frame point cloud file to which the target point cloud data belongs; The system retrieves raw point cloud data from a preset point cloud database; compresses the raw point cloud data using a preset compression algorithm to generate compressed point cloud data; saves the compressed point cloud data to a cache database according to a first preset storage structure; wherein, the keywords in the first preset storage structure are determined based on the first attribute information and the second attribute information, and the value corresponding to the keywords in the first preset storage structure is the compressed point cloud data; and retrieves the target point cloud data corresponding to the data request information from the cache database based on the data request information. A preset number of labeled point cloud data in the target point cloud data are subjected to coordinate transformation to generate multiple labeled location points in the image to be labeled. Based on the multiple labeled location points, a target label box is generated in the image to be labeled.
2. The method according to claim 1, characterized in that, The step of retrieving target point cloud data corresponding to the data request information from the cache database based on the data request information includes: The first attribute information and the second attribute information are concatenated to generate the target keyword; Based on the target keyword, the target value corresponding to the target keyword is obtained from the cache database as the target point cloud data.
3. The method according to claim 2, characterized in that, The step of retrieving the target value corresponding to the target keyword from the cache database as the target point cloud data based on the target keyword includes: Based on the target keyword, retrieve the compressed point cloud data corresponding to the target keyword from the cache database; The compressed point cloud data corresponding to the target keyword is decompressed to generate the target point cloud data.
4. The method according to claim 3, characterized in that, The method further includes: For multiple frame point cloud files in different datasets, obtain the first attribute information of each dataset and the second attribute information of each frame point cloud file; Based on the first attribute information and the second attribute information, the original point cloud data is stored in the preset point cloud database according to the second preset storage structure.
5. The method according to claim 4, characterized in that, The method further includes: For each frame of the point cloud file, obtain the first data format information of the point cloud file; Based on the first preset mapping relationship, the data read / write method corresponding to the first data format information is obtained, and the point cloud file is read through the data read / write method to obtain the original point cloud data.
6. The method according to any one of claims 1-5, characterized in that, The labeled location points include first-type labeled location points and second-type labeled location points. The step of generating a target bounding box in the image to be labeled based on the plurality of labeled location points includes: Connect the first type of labeled points in a preset order to obtain a first rectangle; connect the second type of labeled points in a preset order to obtain a second rectangle. Connect the vertices at preset corresponding positions in the first rectangle and the second rectangle to generate the target annotation box in the image to be annotated.
7. The method according to any one of claims 1-5, characterized in that, The step of performing coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled includes: For the preset number of labeled point cloud data, obtain the first coordinate information of each labeled point cloud data in the world coordinate system; The first coordinate information is transformed to generate the second coordinate information in the pixel coordinate system; Based on the second coordinate information, multiple annotation location points are generated in the image to be annotated.
8. The method according to claim 7, characterized in that, The step of performing coordinate transformation on the first coordinate information to generate second coordinate information in the pixel coordinate system includes: Based on the second preset mapping relationship, the camera parameter information corresponding to the target frame point cloud file to which the target point cloud data belongs is obtained from the preset point cloud database; Based on the camera parameter information, the first coordinate information is transformed to generate the second coordinate information.
9. The method according to claim 8, characterized in that, The method further includes: For each frame point cloud file, obtain the second data format information of the camera parameter file; Based on the third preset mapping relationship, the data parsing method corresponding to the second data format information is obtained, and the camera parameter file is parsed through the data parsing method to obtain the camera parameter information; The camera parameter information and the point cloud files of each frame are stored in the preset point cloud database according to the second preset mapping relationship.
10. A data annotation device, characterized in that, The device includes: The first acquisition module is used to acquire data request information for the target point cloud data; the data request information includes the first attribute information of the target dataset to which the target point cloud data belongs, and the second attribute information of the target frame point cloud file to which the target point cloud data belongs; The second acquisition module is used to acquire raw point cloud data from a preset point cloud database; compress the raw point cloud data using a preset compression algorithm to generate compressed point cloud data; save the compressed point cloud data to a cache database according to a first preset storage structure; wherein, the keywords in the first preset storage structure are determined based on the first attribute information and the second attribute information, and the value corresponding to the keywords in the first preset storage structure is the compressed point cloud data; and acquire the target point cloud data corresponding to the data request information from the cache database based on the data request information. The conversion module is used to perform coordinate transformation on a preset number of labeled point cloud data in the target point cloud data to generate multiple labeled location points in the image to be labeled; The generation module is used to generate target annotation boxes in the image to be annotated based on the multiple annotation location points.
11. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set, or an instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by the processor to implement the steps of the method as described in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the steps of the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Three-dimensional point cloud labeling method, device, equipment and storage medium
CN111062255A
Data labeling method and device, electronic equipment and storage medium
CN116665167A