Panoramic perception system, method and non-transitory computer readable medium thereof
The panoramic sensing model is optimized through a multi-step training method to generate a low-precision model, which solves the problem of insufficient multi-task processing performance of the panoramic sensing system in resource-limited environments, achieves efficient recognition and segmentation, and reduces computing costs.
Patent Information
- Application Number
- CN202311344382.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-03
- Filing Date
- 2023-10-17
- Publication Date
- 2024-10-29
AI Technical Summary
Existing panoramic sensing systems are difficult to efficiently handle multi-tasking, especially in resource-limited environments, where the performance of object detection and semantic segmentation is insufficient and the computational cost is high.
Using a multi-step training method, including first pre-training, data enhancement, combined training, quantization-aware training and post-training quantification, the model weights are optimized through the source database and target database to generate low-precision models to reduce power consumption and improve efficiency.
It achieves efficient identification of objects and segmentation of lane markings and feasible driving areas in an environment with limited resources, reduces computing costs, maintains detection and segmentation performance, and is suitable for self-driving and factory defect identification systems.
Smart Images

Figure CN118865288A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a panoramic perception system, method and non-transitory computer readable medium thereof. Background Art
[0002] Panoptic perception system is a key component of autonomous vehicles, enabling them to fully perceive and understand the surrounding environment. Panoptic perception system can perform object detection and segmentation. Object detection is used to find countable objects, such as but not limited to pedestrians, cars, motorcycles, bicycles, etc. Segmentation can be used to segment interesting regions, including, for example but not limited to, the main lane of the feasible driving area, the alternative lane of the feasible driving area, the lane divider of the opposite lane, the lane divider of the same lane, etc.
[0003] The panoramic perception system solves multiple visual tasks at the same time, including object detection, lane marking segmentation, and drivable areas segmentation, and generates a rich understanding of the road scene. How to efficiently handle and complete the multi-task of the panoramic perception system is one of the directions of the industry's efforts. Summary of the invention
[0004] According to one aspect of the present disclosure, a panoramic perception method is proposed, which is applied to a computer, the computer comprising a processing circuit and a storage device coupled to the processing circuit, the storage device comprising a plurality of hardware circuits for storing a source database and a target database, the panoramic perception method comprising: using the source database to perform a first pre-training on a plurality of weights of a training model; using the source database to perform a second pre-training with data enhancement on the weights of the training model; using the source database and the target database to perform a combined training on the weights of the training model; using the source database and the target database to perform a quantization perception training on the weights of the training model; using the target database to perform a post-training quantization on the training model; and performing panoramic perception with the training model.
[0005] According to another aspect of the present disclosure, a panoramic perception system is proposed, comprising: a processing circuit; and a storage device coupled to the processing circuit, the storage device comprising a plurality of hardware circuits for storing a source database and a target database. The processing circuit executes: using the source database to perform a first pre-training on a plurality of weights of a training model; using the source database to perform a second pre-training with data enhancement on the weights of the training model; using the source database and the target database to perform a combined training on the weights of the training model; using the source database and the target database to perform a quantization perception training on the weights of the training model; using the target database to perform a post-training quantization on the training model; and performing panoramic perception with the training model.
[0006] According to another aspect of the present disclosure, a non-transitory computer-readable medium is provided. When the non-transitory computer-readable medium is read by a computer, the computer executes the panoramic perception method as described above.
[0007] In order to better understand the above and other aspects of the present invention, embodiments are given below and described in detail with reference to the accompanying drawings: BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 A flowchart of a panoramic perception method according to an embodiment of the present disclosure is shown.
[0009] Figure 2 A detailed flowchart of quantization-aware training according to an embodiment of the present disclosure is shown.
[0010] Figure 3 A schematic diagram showing quantization (shifting) using a quantization scale according to an embodiment of the present disclosure.
[0011] Figure 4 A detailed flowchart of post-training quantization (PTQ) according to an embodiment of the present disclosure is shown.
[0012] Figure 5 A functional block diagram of a panoramic perception system according to an embodiment of the present disclosure is shown.
[0013]
Marking description
[0014] 110-160: Steps
[0015] 50: Source database
[0016] 60: Target database
[0017] 210, 225-255: Steps
[0018] 220: Weight
[0019] 410-440: Steps
[0020] 500: Panoramic Perception System
[0021] 510: Processing circuit
[0022] 520: Storage device DETAILED DESCRIPTION
[0023] The technical terms in this specification refer to the customary terms in the technical field. If some terms are explained or defined in this specification, the interpretation of these terms shall be based on the explanation or definition in this specification. Each embodiment of the present disclosure has one or more technical features. Under the premise of possible implementation, those skilled in the art may selectively implement some or all of the technical features in any embodiment, or selectively combine some or all of the technical features in these embodiments.
[0024] Figure 1A flowchart of a panoramic perception method according to an embodiment of the present disclosure is shown. In step 110, an artificial intelligence model (for example, but not limited to, a deep learning model) uses the data of the source database 50 to perform a first pre-training on multiple weights of a training model (for example, but not limited to, a deep learning model). The training model includes multiple operands and multiple weights. These operands of the training model can be classified into high-precision operands and low-precision operands. In the embodiment of the present disclosure, the low-precision operand can be referred to as the first target operand, and the high-precision operand can also be referred to as the second target operand. In addition, the precision of the operand, weight and input must match, for example, the low-precision operand can only operate the low-precision weight and the low-precision input to obtain a low-precision feature (low-precision output); and the high-precision operand can only operate the high-precision weight and the high-precision input to obtain a high-precision feature (high-precision output). In the embodiment of the present disclosure, "feature" and "operator output" have basically the same or similar meanings. In step 110, initially, the artificial intelligence model can randomly generate these weights of the training model. The artificial intelligence model uses the data of the source database 50 to perform the first pre-training on these randomly generated weights. Here, for example but not limited to, the source database 50 is the "BDD-100K" database (BDD-100K dataset) collected in the United States and Europe. The data volume of the "BDD-100K" database is large and it is a public database. The resolution of the "BDD-100K" database is 1280×720. The "BDD-100K" database includes 100,000 images. The data of the source database 50 is high-precision data. For example but not limited to, the data of the source database 50 is 32-bit floating point data (floating point data). In the first pre-training, after the high-precision data and high-precision weights of the source database 50 are input into the high-precision target operand, the high-precision target operand generates a high-precision feature. Here, for example but not limited to, the high-precision feature is a 32-bit floating point feature (floating point feature). The training of step 110 can be regarded as high-precision training. The details of the first pre-training of step 110 are not particularly limited here.
[0025] In step 120, the artificial intelligence model uses the data from the source database 50 to perform a second pre-training with data augmentation on these weights of the training model. Here, data augmentation is, for example but not limited to, mosaic data augmentation, Gaussian blur, contrast adjustment, saturation adjustment, hue adjustment, crop or rotation, etc. For example, a plurality of images (for example but not limited to, 4 images) are selected from the "BDD-100K" database to combine a new image. Then, the artificial intelligence model uses the new image combined by the data augmentation technology (such as mosaic technology) to perform the second pre-training on these weights. Similarly, in the second pre-training, after the high-precision data (that is, the combined new image) and the high-precision weight are input into the high-precision target operand, the high-precision target operand generates a high-precision feature. The training of step 120 is also high-precision training. The details of the second pre-training in step 120 are not particularly limited.
[0026] In step 130, the artificial intelligence model uses the data of the source database 50 and the data of a target database 60 to perform combined training on the weights of the training model. Here, for example but not limited to, the target database 60 is the "iVS" database (iVS dataset) collected locally in Taiwan, China. The data volume of the "iVS" database is small and it is a private database. The resolution of the "iVS" database is 1920×1080. The "iVS" database includes 49 videos, each of which is 75 seconds, that is, the "iVS" database is equivalent to including 49×75=3675 images. The data of the target database 60 is low-precision data. For example but not limited to, the data of the target database 60 is 32-bit floating point data. In the combined training, after the high-precision data (from the source database 50) and the high-precision weights are input to the high-precision target operand, the high-precision target operand generates high-precision features; and after the low-precision data (from the target database 60) and the low-precision weights are input to the low-precision target operand, the low-precision target operand generates low-precision features. The details of the combined training in step 130 are not particularly limited here.
[0027] In step 140, the artificial intelligence model uses the data of the source database 50 and the data of the target database 60 to perform quantization-aware training (QAT) on the weights of the training model. In one embodiment of the present disclosure, quantization-aware training finds the optimal weights to be suitable for quantization operations. Quantization-aware training is a deep learning model training technique that aims to simulate the behavior of the model after quantization and take these behaviors into account during the training process. This allows the model to remain highly efficient after quantization. Quantization is the conversion of floating-point parameters in the model into low-bit integers (such as 8-bit integers), which can reduce the size and running speed of the model. Quantization-aware training is a technique that enables deep learning models to remain highly efficient after quantization. Quantization-aware training simulates the effects of quantization during training and attempts to correct the errors introduced thereby.
[0028] Figure 2 A detailed flowchart of quantization-aware training according to an embodiment of the present disclosure is shown. Figure 2 Indicates the training process of each layer of the training model. Here, "one layer" means that the "input" and "weight" are passed through the "operator" to generate the "output". Figure 2 In step 210 , the quantized input is passed to a low-precision target operator, wherein the quantized input is, for example but not limited to, the quantized output of the previous layer or the quantized data of the source database 50 .
[0029] The weights (high-precision type) 220 are read from a layer (e.g., a convolutional layer, a fully connected layer, etc.) of the training model. In step 225, a first quantization scale is found. In step 230, the weights 220 are quantized using the found first quantization scale to quantize the high-precision weights 220 into low-precision weights, and the operation is performed using the low-precision weights. For example, the high-precision weights 220 are scaled and translated using the found first quantization scale to scale and translate into low-precision weights, such as Figure 3 shown. Figure 3 A schematic diagram showing quantization (scaling and translation) using a quantization scale according to an embodiment of the present disclosure is shown. When quantization (scaling and translation) is performed, the maximum value (floating point data) and the minimum value (floating point data) of all data of the layer of the target operand are found: the appropriate quantization size and zero point are calculated; and the low-precision data (integer data) after quantization of any high-precision data (floating point data) is calculated using a known formula. In an embodiment of the present disclosure, after quantization, the output is still similar to the output before quantization.
[0030] In step 240, in the layer of the training model, the target operand operates on the quantized input and the quantized weight to obtain an operation result, and stores the operation result as a high-precision feature. In one embodiment of the present disclosure, it is assumed that the operand is a multiplication and addition of multiple low-precision values. When the numerical format of the low-precision value is integer 8 (int8), the numerical range of integer 8 is -128 to 127, but the result of the operation may exceed this range (-128 to 127). For example, when the operation is 127×127=16129, the operation result 16129 exceeds the range -128 to 127. Therefore, in step 240, the operation result is stored in a high-precision data format, and then the operation result is quantized to a low-precision feature through a quantization scale.
[0031] In step 245, the high-precision output (high-precision feature) is translated (quantized) using the first quantization scale found to obtain a quantized low-precision output. Figure 2 The process can iteratively train these weights (i.e., iteratively generate / change weights).
[0032] Please return to Figure 1 . In step 150, the artificial intelligence model performs posttraining quantization (PTQ) on the trained model. The advantage of PTQ is that there is no need to retrain the weights, and only a small portion needs to be sampled from the database as a calibration library. Posttraining quantization is a technique for quantizing a model after it has been trained. The purpose of posttraining quantization is to reduce the size and inference time of the model while maintaining the accuracy of the model as much as possible. Posttraining quantization does not require retraining the model, so it is simpler and faster.
[0033] Figure 4 A detailed flowchart of post-training quantization (PTQ) according to an embodiment of the present disclosure is shown. Figure 4As shown, in step 410, the input data (high-precision data) before quantization is input to the high-precision target operand (also referred to as the second target operand) to obtain a first feature (high-precision feature), which is used as a benchmark for feature comparison, wherein the high-precision target operand (the second target operand) has a higher precision than the low-precision target operand (the first target operand). The high-precision target operand is, for example but not limited to, convolution, batch normalization, addition, multiplication, etc. In step 415, the input data (high-precision data) before quantization is input to the first quantization scale to obtain the input data after quantization (low-precision input data). In step 420, the input data after quantization is input to the low-precision target operand (the first target operand) to obtain a second feature (low-precision feature). In step 430, the second quantization scale is found. In step 440, the second feature (low-precision feature) is scaled and translated into a third feature (high-precision feature) using the found second quantization scale, and the first feature is compared with the third feature. If the first feature matches the third feature, it means that the accuracy of the second quantization scale found is sufficient. If the first feature does not match the third feature, it means that the accuracy of the second quantization scale found is insufficient, and the second quantization scale is changed until the second quantization scale meets the requirements.
[0034] In step 160, the trained training model can be obtained, wherein the training model is a low-precision model.
[0035] In one embodiment of the present disclosure, Figure 1 Steps 140 and 150 are low-precision training.
[0036] exist Figure 1 In the process of steps 110 to 150, low-precision weights can be obtained, that is, low-precision weights are obtained using low-precision representation (not limited to integers, but can be integers or fixed-point numbers).
[0037] In one embodiment of the present disclosure, the reason for performing QAT and PTQ is to transfer the weights trained on the source database to the target database for deployment. Therefore, in one embodiment of the present disclosure, in step 130, the weights trained in step 120 are combined and trained using the data of the source database 50 and the data of the target database 60. In step 140, the weights are trained using QAT. In step 150, the appropriate quantization scale and zero point are found on the target database using PTQ.
[0038] Figure 5The functional block diagram of a panoramic perception system according to an embodiment of the present disclosure is shown. The panoramic perception system 500 according to an embodiment of the present disclosure includes: a processing circuit 510 and a storage device 520. The processing circuit 510 is coupled to the storage device 520. The storage device 520 stores the source database 50 and the target database 60. The storage device 520 is, for example but not limited to, a hard disk, a solid state drive (SSD), an optical disk, a flash drive, etc. The processing circuit 510 can execute the following operations: Figures 1 to 4 The processing circuit 510 is, for example but not limited to, a central processing unit (CPU) or a graphics processing unit (GPU). The panoramic perception system 500 according to an embodiment of the present disclosure can be executed by a computer. The storage device 520 includes a plurality of hardware circuits to store the source database 50 and the target database 60.
[0039] Another embodiment of the present disclosure discloses a non-transitory computer-readable medium. When the non-transitory computer-readable medium is read by a computer, the computer may execute the following Figures 1 to 4 Panoramic perception method.
[0040] An embodiment of the present disclosure proposes an efficient and effective panoramic perception method and system, which uses the trained training model to perform object detection, semantic segmentation, and panoptic segmentation for self-driving cars, including but not limited to the segmentation of lane markings and feasible driving areas. That is, in an embodiment of the present disclosure, the trained training model performs panoramic perception.
[0041] In one embodiment of the present disclosure, performing QAT on a hybrid database (a hybrid target database and a source database) not only adapts the quantized weights, but also maintains the performance of detection and segmentation. In addition, in one embodiment of the present disclosure, PTQ optimizes the quantization scale and zero point of the target database.
[0042] In the above embodiments of the present disclosure, during the training phase, the proportion of the source database is gradually reduced, and the proportion of the target database is increased.
[0043] The trained model of the above-mentioned embodiment of the present disclosure can be applied to self-driving car systems and factory defect identification systems.
[0044] In the above embodiments of the present disclosure, the trained weights are low-precision weights, and the trained model is a low-precision model. Therefore, the model to be trained can use low-precision operators to perform calculations, which requires lower power consumption and can increase the calculation speed.
[0045] In order to solve the multi-tasking problem of the panoramic perception system, the embodiments of the present disclosure disclose a panoramic perception system, method and non-temporary computer-readable medium thereof. The panoramic perception system, method and non-temporary computer-readable medium of the embodiments of the present disclosure can tailor a low-power multi-tasking model for traffic scenarios, solving the challenges of object detection and semantic segmentation. The panoramic perception system and method of the embodiments of the present disclosure can create an efficient algorithm, accurately identify objects, segment lane markings and feasible driving areas, and maintain minimal computing costs, so as to perform well in resource-limited environments such as mobile devices, Internet of Things (IoT) devices and embedded systems.
[0046] In summary, although the present invention has been disclosed by way of embodiments, it is not intended to limit the present invention. A person skilled in the art of the present invention may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the scope of the attached claims.
Claims
1. A panoramic perception method, characterized in that: Applied to a computer, the computer includes a processing circuit and a storage device coupled to the processing circuit, the storage device includes a plurality of hardware circuits to store a source database and a target database, the panoramic perception method includes: Performing a first pre-training on a plurality of weights of a training model using the source database; Using the source database, performing a second pre-training with data augmentation on the weights of the training model; Perform a combined training on the weights of the training model using the source database and the target database; Performing a quantization-aware training on the weights of the training model using the source database and the target database; Performing a post-training quantization on the training model using the target database; and Use the trained model for panoramic perception.
2. The panoramic perception method according to claim 1, wherein: Initially, the weights of the training model are generated randomly.
3. The panoramic perception method according to claim 1, wherein: The data in the source database is 32-bit floating point data; and The data in the target database is 32-bit floating point data.
4. The panoramic perception method according to claim 1, wherein: Data enhancement includes mosaic data enhancement, Gaussian blur, contrast adjustment, saturation adjustment, hue adjustment, cropping or rotation.
5. The panoramic perception method according to claim 1, wherein: The quantization-aware training includes: Passing a quantized input to a first target operand, wherein the quantized input is a quantized output of a previous layer or a quantized data of the source database; Reading a weight from a layer of the training model; Find a first quantitative scale; quantizing the weight using the first quantization scale to obtain a quantized weight; In the layer of the training model, the first target operator operates on the quantized input and the quantized weight to obtain an output; and The output is quantized with the first quantization scale to obtain a quantized output.
6. The panoramic perception method according to claim 1, wherein: This post-training quantization includes: Inputting a pre-quantized input to a second target operand to obtain a first feature; Inputting the pre-quantization input to a first quantization scale to obtain a post-quantization input; Inputting the quantized data into a first target operand to obtain a second feature, wherein the second target operand has a higher precision than the first target operand; Finding a second quantitative scale; and The second feature is scaled and translated into a third feature using the second quantization scale, and the third feature is compared with the first feature to determine whether to change the second quantization scale.
7. A panoramic perception system, characterized in that: include: a processing circuit; as well as a storage device coupled to the processing circuit, the storage device comprising a plurality of hardware circuits for storing a source database and a target database, The processing circuit performs: Using the source database to perform a first pre-training on a plurality of weights of a training model; Using the source database, performing a second pre-training with data augmentation on the weights of the training model; Perform a combined training on the weights of the training model using the source database and the target database; Performing a quantization-aware training on the weights of the training model using the source database and the target database; Performing a post-training quantization on the training model using the target database; and Use the trained model for panoramic perception.
8. The panoramic perception system according to claim 7, wherein: The processing circuit performs: initially, randomly generating the weights of the training model.
9. The panoramic perception system according to claim 7, wherein: The data in the source database is 32-bit floating point data; and The data in the target database is 32-bit floating point data.
10. The panoramic perception system according to claim 7, wherein: Data enhancement includes mosaic data enhancement, Gaussian blur, contrast adjustment, saturation adjustment, hue adjustment, cropping or rotation.
11. The panoramic perception system according to claim 7, wherein: When performing the quantization-aware training, the processing circuit performs: Passing a quantized input to a first target operand, wherein the quantized input is a quantized output of a previous layer or a quantized data of the source database; Reading a weight from a layer of the training model; Find a first quantitative scale; quantizing the weight using the first quantization scale to obtain a quantized weight; In the layer of the training model, the first target operator operates on the quantized input and the quantized weight to obtain an output; and The output is quantized with the first quantization scale to obtain a quantized output.
12. The panoramic perception system according to claim 7, wherein: When performing the post-training quantization, the processing circuit performs: Inputting a pre-quantized input to a second target operand to obtain a first feature; Inputting the pre-quantization input to a first quantization scale to obtain a post-quantization input; Inputting the quantized data into a first target operand to obtain a second feature, wherein the second target operand has a higher precision than the first target operand; Find a second quantitative scale; as well as The second feature is scaled and translated into a third feature using the second quantization scale, and the third feature is compared with the first feature to determine whether to change the second quantization scale.
13. A non-transitory computer-readable medium. When the non-transitory computer-readable medium is read by a computer, the computer executes the panoramic perception method according to any one of claims 1 to 6.
