Implementation method for space target part segmentation development based on edge end equipment
By applying deep learning technology on edge devices, the problem that traditional processing platforms are difficult to achieve efficient real-time detection and segmentation of space target components is solved, and the effect of high recognition rate and rapid processing is achieved, meeting the real-time processing needs of space tasks.
Patent Information
- Application Number
- CN202411607016.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-04
AI Technical Summary
Traditional processing platforms are difficult to meet the needs of complex space tasks, especially under high performance, low power consumption and small load conditions, and the prior art is difficult to achieve efficient real-time detection and segmentation of space target components on orbit.
Using deep learning technology based on edge-end devices, the deep learning network is trained by building a spatial target radar image dataset, and quantizing and running the model on the MLU device to realize real-time detection and segmentation of components of ISAR images.
Efficient real-time detection and segmentation of space target components is achieved on the edge-end equipment, and has the significant advantages of high recognition rate, fast processing speed and strong real-time performance, which can effectively meet the requirements of space tasks for real-time processing.
Smart Images

Figure CN119559392A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing and artificial intelligence technology, and in particular to an implementation method for developing space target component segmentation based on edge devices. Background Art
[0002] With the continuous advancement of aerospace technology and the active development of space resources by countries around the world, the number of satellites in orbit has shown a rapid growth trend, and the demand for space situational awareness capabilities has also increased significantly. Space target detection is an important part of the surveillance system in the space situational awareness system, among which radar is one of the main means of detection. Compared with visible light imaging, radar imaging has the ability to obtain high-resolution target images in real time all day and all weather, and has become one of the important technical approaches for space target identification. Due to the high similarity in appearance of different satellites, component-level recognition is particularly critical for target discrimination. As a landmark key component of the satellite, the sailboard has the ability to robustly identify and accurately segment the sailboard, which is crucial to improving the space target situational awareness capability.
[0003] Artificial intelligence technology with deep learning as its core has been successfully applied in many fields such as optical target recognition by virtue of its excellent data feature mining and learning inference capabilities. Among them, the region-based convolutional neural network (R-CNN) significantly improves the accuracy of the output and enriches the feature extraction through multi-layer convolution and pooling structures. In recent years, this type of technology has developed rapidly, especially Faster R-CNN and Mask R-CNN have been widely used in the detection and recognition of optical targets. In particular, Mask R-CNN introduces a mask branch based on Faster R-CNN, enabling it to perform target detection and instance segmentation simultaneously. This model is not only easy to implement and train, but also has a high processing speed, so it is widely used in various application scenarios.
[0004] As the complexity of space missions continues to increase, traditional processing platforms can no longer meet mission requirements. On-orbit information processing is gradually showing an intelligent trend, especially when meeting on-orbit service requirements such as high performance, low power consumption, and small payload. Edge devices based on artificial intelligence chips are beginning to play an important role in satellite missions. At present, NVIDIA's GPU has become the mainstream choice for satellite-borne intelligent processing platforms (such as the Jetson series) due to its powerful parallel computing capabilities and deep learning acceleration technology. However, due to factors such as autonomous control, supply chain security, and technological innovation, it is particularly necessary to use domestic artificial intelligence chips for on-orbit image processing. Summary of the invention
[0005] Purpose of the invention: The present invention provides an implementation method for the segmentation of space target components based on edge devices, which can realize efficient real-time detection and segmentation of components of space target Inverse Synthetic Aperture Radar (ISAR) images on embedded edge devices, and has significant advantages such as high recognition rate, fast processing speed, and strong real-time performance.
[0006] Technical solution: The present invention provides a method for implementing the segmentation and development of space target components based on edge devices, comprising the following steps:
[0007] Step 1: Build a space target radar image dataset and train the constructed network model;
[0008] Step 2: Configure the MLU server development environment;
[0009] Step 3: Call the quantization interface to quantize the deep learning network weights trained in step 1 into int8 precision weights;
[0010] Step 4: Design online inference software and use the MLU270 device to run the layer-by-layer inference mode to verify whether the weight of the int8 quantization accuracy meets the accuracy requirements;
[0011] Step 5: Use the MLU270 device to run the fusion reasoning mode to generate the offline models of the MLU270 version and the MLU220 version;
[0012] Step 6: Design offline reasoning software through the CNRT runtime library, load the MLU270 version offline model to test the offline reasoning results;
[0013] Step 7: Deploy the offline reasoning program on the intelligent microserver, load the MLU220 version offline model, and test the offline reasoning results on the edge device.
[0014] Furthermore, in step 1, training the constructed network model specifically includes the following steps:
[0015] Step 11: Establish a satellite simulation model, simulate the ISAR image of space targets in combination with a high-resolution imaging algorithm, and build an ISAR image database of space targets;
[0016] Step 12: preprocess the ISAR image of the space target obtained in step 11 and create a COCO format data set;
[0017] Step 13: Input the data set obtained in step 12 into the Mask R-CNN network, adjust the neural network parameters until the loss value region is stable, and obtain the optimal weight.
[0018] Furthermore, in step 3, quantizing the deep learning network weights trained in step 1 into weights with int8 precision specifically includes the following steps:
[0019] Step 31, save the pth file in uncompressed format, and call the quantization interface quantized_dynamic_mlu to quantize the network weights;
[0020] Step 32: Input a single ISAR image for quantization. The format of the input data is tensor.
[0021] Step 33: Call the save quantization weight interface to save the input data and weight scaling to the model weight parameters.
[0022] Furthermore, the quantized model is used to run fixed-point calculations on the MLU device, using the MinMax quantization method. The mathematical expression mapped from floating point to fixed point is:
[0023]
[0024] Among them, R represents the real floating point value, Q represents the quantized int8 integer value, Q∈[-127,127], and scale is the scale factor.
[0025] Furthermore, when calling the quantization interface, firstconv is enabled to speed up the copying of input data to the MLU device. The mean and std parameters in the quantization dictionary qconfig_spec are consistent with the preprocessing parameters used during training. Channel-wise quantization is enabled to calculate the scaling factor for each channel of the feature map to improve quantization accuracy.
[0026] Furthermore, in step 5, the MLU270 device is used to run the fusion reasoning mode to generate the offline models of MLU270 version and MLU220 version. The number of MLU cores is manually set by set_core_number(), and 1, 4, or 16 can be selected. --half_input is set to True to enable the half-precision reasoning mode. Except for the convolutional layer, other network layers use FP16 precision calculations. set_core_version() selects the version of the offline model according to the deployment platform, and "MLU270" or "MLU220" can be selected. save_as_cambricon() saves the offline model to obtain the mask_rcnn_offline.cambricon file.
[0027] Furthermore, in step 6, the offline reasoning software design is performed through the CNRT runtime library, and the MLU270 version offline model is loaded to test the offline reasoning results, which specifically includes the following steps:
[0028] Step 61: Initialize the operating environment, check the MLU device and bind it;
[0029] Step 62: load the offline model, obtain model attributes, establish the reasoning logic flow, and generate the model reasoning structure;
[0030] Step 63: Obtain the number and size of input / output nodes, and apply for corresponding input / output memory space on the CPU and MLU;
[0031] Step 64, completing data pre-processing, including reading image data and allocating memory;
[0032] Step 65, copy the input data from the CPU to the MLU memory;
[0033] Step 66: Set the inference runtime context, bind the device and model, create a queue, and perform asynchronous inference.
[0034] Step 67, copy the output data from the MLU to the CPU memory;
[0035] Step 68: Complete post-processing of output data and clean up the environment.
[0036] Furthermore, in step 68, the post-processing of the output data is completed, the confidence threshold is set, and the targets that do not meet the actual requirements are filtered out; the segmentation mask image is saved in the Outputs folder, and the segmentation result of each radar image is saved in a subfolder with the same name; the detection results are saved in a TXT file with the same name, including the detected target label, detection confidence, bounding box coordinates, and bounding box size; and the log and debugging information are saved in the Outputs folder.
[0037] Furthermore, the offline inference program adopts multi-threading technology. When configuring CMake, the boost-thread library is linked to support multi-threading, the cnrt library is linked to support the Cambrian runtime library, and the third-party library opencv- is added for image processing. The gflags library is used for command line parameter parsing. Users can flexibly set the number of threads by modifying the --threads parameter in the Shell run script, and select different versions of offline models through the --offlinemodel parameter.
[0038] Furthermore, in step 7, the offline reasoning program is deployed on the intelligent microserver, the MLU220 version offline model is loaded, and the offline reasoning result under the edge device is tested, which specifically includes the following steps:
[0039] Step 71: Configure a cross-compilation environment on the MLU server, and compile the offline reasoning program to obtain an executable file of the aarch64 version;
[0040] Step 72: assign a static IP address to the network port of the edge device.
[0041] Step 73: deploy the offline reasoning executable file, dynamic link library, ISAR data set, running script, and offline model to the edge device;
[0042] Step 74: remotely log in to the edge device and configure environment variables;
[0043] Step 75: Run the Shell script to test the offline inference results of the deep learning semantic segmentation network on the edge device.
[0044] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: The present invention implements a semantic segmentation method based on deep learning on edge embedded devices, and the entire processing flow can be completed on the compact artificial intelligence chip CZ120. It no longer relies on complex deep learning frameworks and environments, and can achieve real-time target detection and segmentation of space target components, meeting the requirements of portability, low power consumption and low cost; when performing offline inference on 1k resolution images on edge devices, the speed exceeds 3Hz, the target detection recognition rate exceeds 95%, and the confidence of component segmentation is high, which is conducive to the subsequent accurate measurement of target posture, significantly improving the detection efficiency and segmentation accuracy, and can effectively meet the requirements of space missions for real-time processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the method flow of the present invention.
[0046] Figure 2 Simulated radar image for the lacrosse satellite model of the present invention.
[0047] Figure 3 It is a schematic diagram of the operation quantization model of the present invention.
[0048] Figure 4 It is a schematic diagram of the online reasoning result of the present invention.
[0049] Figure 5 This is a schematic diagram of the offline reasoning segmentation result of the present invention. DETAILED DESCRIPTION
[0050] like Figure 1 As shown, a method for implementing the segmentation of space target components based on edge devices includes the following steps:
[0051] S1. Build a Pytorch deep learning environment on the server and train the constructed network model.
[0052] S2. Install the MLU driver on the server, install Docker, download the Cambricon Pytorch environment image from the cloud to the local computer, and configure the MLU270 server development environment.
[0053] S3. Call the quantization interface integrated in Cambricon Pytorch to quantize the trained deep learning network weights into int8 precision weights.
[0054] S4. Design online inference software based on the Python programming language external torch_mlu package, CNML, and CNNL operator libraries, load the quantization weights generated in step S3, use the MLU270 device to run the layer-by-layer inference mode, and verify whether the int8 quantization weights meet the accuracy requirements.
[0055] S5. Load the quantized weights generated in step S3, use the MLU270 device to run the fusion reasoning mode, and generate the MLU270 version and the MLU220 version of the offline model.
[0056] S6. Without relying on the deep learning framework, offline reasoning software design is performed based on the C++ programming language and only CNRT (Cambricon Neuware Runtime Library) is used. The MLU270 version offline model generated in step S5 is loaded to test its offline reasoning results.
[0057] S7. Use the cross-compilation tool chain to compile the offline reasoning program in step S6 to obtain the aarch64 version of the executable file and dynamic link library, deploy the Chuangzhi No. 1-220 intelligent microserver, load the MLU220 version offline model obtained in step S5, and test the offline reasoning results on the edge device.
[0058] Training the deep learning network in step S1 specifically includes the following steps:
[0059] S101, based on the typical lacrosse satellite shape, CAD modeling was performed, electromagnetic simulation of the space target model was performed using FEKO software, and the space target radar image was simulated in combination with the high-resolution ISAR imaging algorithm to build a space target radar image database. The simulated radar image is as follows Figure 2 shown.
[0060] S102, using LabelMe labeling software, select and classify the satellite panels in the space target radar image in step 1, and organize them into a COCO format dataset after labeling, and divide them into a training set and a test set in proportion.
[0061] S103. Using the Mask R-CNN network as the main framework, activate the Pytorch deep learning environment, input the space target radar image training set into the Mask R-CNN network, adjust the neural network parameters until the loss value region is stable, and obtain the optimal weight.
[0062] In step S103, the configuration information of the network is adjusted to meet the hardware requirements, the GPU performance and the number of images are considered, the appropriate training round epoch is selected, and the image size is resized to 800×800. The mask branch module in the constructed deep learning network uses the FCN network to segment the sailboard area in the space target radar image. After segmentation, two categories are obtained, namely the left sailboard and the right sailboard. The image is binarized with 0.7 as the threshold to generate the foreground segmentation Mask and the background segmentation Mask. Each layer of Mask represents a category, where 0 represents the part other than the target object and 1 represents the target object.
[0063] Considering that the torch version in Cambricon Pytorch is lower, in order to save the weight file format compatible with the lower version, the _use_new_zipfile_serialization parameter is set to False.
[0064] The Cambrian software stack requires quantization for operators such as convolution and fully connected operators before they can run, while other operators such as activation operators and BN operators do not need quantization and can be directly calculated using floating point types. The steps for quantizing the input and optimal weights in step S3 are as follows:
[0065] S301. Call the quantization interface quantized_dynamic_mlu in the torch_mlu package to quantize the network weights, set the quantization mode dtype to 'int8', set the quantization parameter gen_quant to True, and generate a quantized model.
[0066] S302: Input the operator input to be quantized. Since the pixel values of the image are scattered in the range of 0-255, only one image needs to be input for quantization. The format of the input data is tensor.
[0067] S303: Save the input data and the scaling of the weights to the model weight parameters.
[0068] The quantized model is used to run fixed-point calculations on the MLU device. The mathematical expression mapped from floating point to fixed point is:
[0069]
[0070] Among them, R represents the real floating point value, Q represents the quantized int8 integer value, Q∈[-127,127], and scale is the scale factor.
[0071] The quantization interface turns on firstconv to speed up the copying of input data to the MLU device. In the quantization dictionary qconfig_spec, firstconv is set to True, mean is set to [0.4038, 0.455, 0.481], and std is set to [1 / 255, 1 / 255, 1 / 255], which are consistent with the preprocessing parameters used during training.
[0072] Channel-wise quantization is used to calculate the scaling factor for each channel of the feature map to improve the quantization accuracy.
[0073] In step S4, the quantization model needs to be run when performing online layer-by-layer reasoning. Taking the convolution operator as an example, the floating-point input of the convolution operator is first quantized, and the scale value in the quantization model is used to calculate the integer input according to the quantization formula qx=clamp(round(x*scale)). Similarly, the weights of the operator are quantized to obtain integer weights; then an integer convolution operation is performed to output an integer convolution result, and the floating-point convolution output is finally obtained according to the inverse quantization formula y=qy / scale1 / scale2. The process of running the quantization model is as follows: Figure 3 shown.
[0074] When generating the offline model in step S5, set_core_number() manually sets the number of MLU cores, which can be 1, 4, or 16. --half_input is set to True to enable the half-precision inference mode. All network layers except the convolutional layer use FP16 precision operations. set_core_version() selects the version of the offline model according to the deployment platform, which can be "MLU270" or "MLU220". save_as_cambricon() saves the offline model to obtain the mask_rcnn_offline.cambricon file.
[0075] In step S6, the API of the CNRT runtime library is called to implement heterogeneous programming between the CPU and the MLU, and offline reasoning of the deep learning network is implemented without the deep learning framework, which specifically includes the following steps:
[0076] S601. Call cnrtInit() API to initialize the operating environment, and call cnrtSetCurrentDevice() API to set the MLU device to be used.
[0077] S602, create a cnrtModel_t structure, call the cnrtLoadModel() API, load the data in the offline model file mask_rcnn_offline.cambricon obtained in step S5 and write it into the cnrtModel_t structure variable.
[0078] S603: Call cnrtGetFunctionNumber() API to obtain the number of functions included in the model.
[0079] S604. Call cnrtCreateFunction() API to initialize the cnrtFunction_t structure variable.
[0080] S605 . Call cnrtExtractFunction() API to extract model information from the model and write it into the created cnrtFunction_t structure variable.
[0081] S606. Call cnrtGetInputDataSize() and cnrtGetOutputDataSize() API to obtain the number and size of input and output nodes, call cnrtMalloc() API to allocate corresponding input memory space for MLU device, pre-process the input radar image data, and call cnrtMemcpy() API to copy the input data from CPU to MLU.
[0082] S607, set Context:
[0083] S6071. Call cnrtCreateRuntimeContext() API to create CNRT Runtime Context.
[0084] S6072. Call cnrtSetRuntimeContextDeviceId() API to bind the device.
[0085] S6073. Call cnrtInitRuntimeContext() API to initialize CNRT Runtime Context.
[0086] S6074. Call cnrtRuntimeContextCreateQueue() API to create a queue.
[0087] S608. Call cnrtInvokeRuntimeContext() API to send the inference task to the queue, and call cnrtSyncQueue() to execute the inference task.
[0088] S609, call cnrtMemcpy() API to copy the calculation result from MLU to CPU.
[0089] Write a post-processing program for the data sequence of the MLU reasoning results in step S609, set the confidence threshold to 0.7, consistent with the online reasoning threshold, and filter out targets that do not meet actual needs; save the segmentation mask map to the Outputs folder, and save the segmentation results of each radar image to a subfolder with the same name, including the right sailboard mask map, left sailboard mask map, and sailboard mask map of the image (without distinguishing between left and right sailboards).
[0090] Save the detection results to a TXT file with the same name, and output the detection results of one target per line in the following format: label, detection confidence, bounding box center x-coordinate, bounding box center y-coordinate, bounding box width, bounding box height, mask width, mask height, mask image name, with each item of information separated by spaces. Figure 2 The offline test results on the MLU270 server are as follows:
[0091] rightpanel 1 479.336 194.016 254.57 109.375 875 656 mask_0_1.png
[0092] leftpanel 1 202.754 289.992 263.73 110.469 875 656 mask_1_2.png
[0093] Save the log and debugging information to the mask-rcnn.log file in the Outputs folder.
[0094] In step S6, the offline reasoning program uses multi-threading technology. When configuring CMake, link the boost-thread library to support multi-threading, link the cnrt-x86 library to support the Cambrian runtime library, add the third-party library opencv-x86 for image processing, and use the gflags-x86 library for command line parameter parsing. Users can flexibly set the number of threads by modifying the --threads parameter in the Shell run script, and select different versions of offline models through the --offlinemodel parameter. In practical applications, it is necessary to select the most appropriate offline reasoning parameters and models through sufficient testing and tuning to obtain the best results while meeting performance requirements.
[0095] Step S7 specifically includes the following steps:
[0096] S701. Configure the cross-compilation environment on the MLU270 server, download the cross-compilation tool chain gcc-linaro-6.2.1-2016.11-x86_64_aarch64-linux-gnu, compile the dynamic link libraries supported by the edge device, including cnrt-aarch64.so, boost-thread-aarch64.so, opencv-aarch64.so, etc., and cross-compile the offline inference program to obtain the aarch64 version of the executable file.
[0097] S702. Connect the PC and Chuangzhi No. 1-220 intelligent microserver via a Type-C serial cable. Configure a static IP for LAN0 in the / cambricon / etc / rcS script file with root user privileges. The configuration command is ifconfig eth0192.168.1.111up, and add a gateway / sbin / route add default gw 192.168.1.1.
[0098] S703. Connect the MLU270 server and the edge device via a network cable, and use the scp transmission command to transfer the offline reasoning executable file, aarch64 dynamic link library, space target radar data set, Shell running script, and offline model to the edge device.
[0099] S704. Use the SSH protocol to remotely log in to the edge device from the PC: ssh root@192.168.1.111; add the aarch64 dynamic link library path to the / cambricon / Examples_SDK / env.sh script, and configure the environment variables in source / cambricon / Examples_SDK / env.sh.
[0100] S705. Run the Shell script to test the segmentation performance of the CZ120 chip on the Mask R-CNN network under different parameter configurations.
[0101] Taking the radar image dataset of the Lacrosse satellite model as an example, the average detection and recognition rate on the Chuangzhi 1-220 edge device exceeds 95%, meeting the index requirements. At the same time, the inference speed of the Mask R-CNN network on the edge device is tested. The test images are 32, the input image size is 875×656, and the number of image frames inferred per second is output. The inference speed performance of different parameter configurations is shown in Table 1.
[0102] Table 1 Offline inference performance of Chuangzhi 1-220 edge device
[0103]
[0104] Table 1 shows that reducing offline model accuracy, increasing the number of threads, and increasing the number of MLU cores are all beneficial to improving inference speed. In addition, inference speed is also related to CPU performance and NPU performance. Therefore, it is necessary to conduct sufficient testing based on the deployed hardware platform and select the most appropriate offline inference parameters while meeting performance indicators.
[0105] by Figure 2 As network input, the online inference results under the MLU server are as follows Figure 4 As shown; the offline reasoning segmentation mask image under the MLU270 server is as follows Figure 5 As shown on the left; the offline inference segmentation mask on the edge device is as follows Figure 5 Shown on the right.
Claims
1. A method for implementing the segmentation of space target components based on edge devices, characterized in that: The steps include: Step 1: Build a space target radar image dataset and train the constructed network model; Step 2: Configure the MLU server development environment; Step 3: Call the quantization interface to quantize the deep learning network weights trained in step 1 into int8 precision weights; Step 4: Design online inference software and use the MLU270 device to run the layer-by-layer inference mode to verify whether the weight of the int8 quantization accuracy meets the accuracy requirements; Step 5: Use the MLU270 device to run the fusion reasoning mode to generate the offline models of the MLU270 version and the MLU220 version; Step 6: Design offline reasoning software through the CNRT runtime library, load the MLU270 version offline model to test the offline reasoning results; Step 7: Deploy the offline reasoning program on the intelligent microserver, load the MLU220 version offline model, and test the offline reasoning results on the edge device.
2. The method for implementing the segmentation and development of space target components based on edge devices according to claim 1, characterized in that: In step 1, training the constructed network model specifically includes the following steps: Step 11: Establish a satellite simulation model, simulate the ISAR image of space targets in combination with a high-resolution imaging algorithm, and build an ISAR image database of space targets; Step 12: preprocess the ISAR image of the space target obtained in step 11 and create a COCO format data set; Step 13: Input the data set obtained in step 12 into the Mask R-CNN network, adjust the neural network parameters until the loss value region is stable, and obtain the optimal weight.
3. The method for implementing the segmentation and development of space target components based on edge devices according to claim 1, characterized in that: In step 3, quantizing the deep learning network weights trained in step 1 into int8 precision weights specifically includes the following steps: Step 31, save the pth file in uncompressed format, and call the quantization interface quantized_dynamic_mlu to quantize the network weights; Step 32: Input a single ISAR image for quantization. The format of the input data is tensor. Step 33: Call the save quantization weight interface to save the input data and weight scaling to the model weight parameters.
4. The method for implementing the segmentation and development of space target components based on edge devices according to claim 3, characterized in that: The quantized model is used to run fixed-point calculations on the MLU device, using the MinMax quantization method. The mathematical expression mapped from floating point to fixed point is: Among them, R represents the real floating point value, Q represents the quantized int8 integer value, Q∈[-127,127], and scale is the scale factor.
5. The method for implementing the segmentation and development of space target components based on edge devices according to claim 4, characterized in that: When calling the quantization interface, firstconv is enabled to speed up the copying of input data to the MLU device. The mean and std parameters in the quantization dictionary qconfig_spec are consistent with the preprocessing parameters used during training. Turn on channel-wise quantization and calculate the scaling factor for each channel of the feature map to improve quantization accuracy.
6. The method for implementing the segmentation and development of space target components based on edge devices according to claim 1, characterized in that: In step 5, use the MLU270 device to run the fusion reasoning mode to generate MLU270 and MLU220 versions of offline models. Set_core_number() manually sets the number of MLU cores, which can be 1, 4, or 16. --half_input is set to True to enable half-precision reasoning mode. All network layers except the convolutional layer use FP16 precision operations. Set_core_version() selects the version of the offline model according to the deployment platform, which can be "MLU270" or "MLU220". Save the offline model with save_as_cambricon() to get the mask_rcnn_offline.cambricon file.
7. The method for implementing the segmentation and development of space target components based on edge devices according to claim 1, characterized in that: In step 6, the offline reasoning software design is performed through the CNRT runtime library, and the MLU270 version offline model is loaded to test the offline reasoning results, which specifically includes the following steps: Step 61: Initialize the operating environment, check the MLU device and bind it; Step 62: load the offline model, obtain model attributes, establish the reasoning logic flow, and generate the model reasoning structure; Step 63: Obtain the number and size of input / output nodes, and apply for corresponding input / output memory space on the CPU and MLU; Step 64, completing data pre-processing, including reading image data and allocating memory; Step 65, copy the input data from the CPU to the MLU memory; Step 66: Set the inference runtime context, bind the device and model, create a queue, and perform asynchronous inference. Step 67, copy the output data from the MLU to the CPU memory; Step 68: Complete post-processing of output data and clean up the environment.
8. The method for implementing the segmentation and development of space target components based on edge devices according to claim 7, characterized in that: In step 68, the post-processing of the output data is completed, the confidence threshold is set, and the targets that do not meet the actual requirements are filtered out; the segmentation mask image is saved in the Outputs folder, and the segmentation result of each radar image is saved in a subfolder with the same name; Save the detection results to a TXT file with the same name, including the detected target label, detection confidence, bounding box coordinates, and bounding box size; Save log and debug information to the Outputs folder.
9. The method for implementing the segmentation and development of space target components based on edge devices according to claim 7, characterized in that: The offline reasoning program uses multi-threading technology. When configuring CMake, the boost-thread library is linked to support multi-threading, and the cnrt library is linked to support the Cambrian runtime library. At the same time, the third-party library opencv- is added for image processing, and the gflags library is used for command line parameter parsing. Users can flexibly set the number of threads by modifying the --threads parameter in the Shell run script, and select different versions of offline models through the --offlinemodel parameter.
10. The method for implementing the segmentation and development of space target components based on edge devices according to claim 1, characterized in that: In step 7, the offline reasoning program is deployed on the intelligent microserver, the MLU220 version offline model is loaded, and the offline reasoning results on the edge device are tested. Specifically, the steps include: Step 71: Configure a cross-compilation environment on the MLU server, and compile the offline reasoning program to obtain an executable file of the aarch64 version; Step 72: assign a static IP address to the network port of the edge device. Step 73: deploy the offline reasoning executable file, dynamic link library, ISAR data set, running script, and offline model to the edge device; Step 74: remotely log in to the edge device and configure environment variables; Step 75: Run the Shell script to test the offline inference results of the deep learning semantic segmentation network on the edge device.
Citation Information
Patent Citations
Embedded remote sensing image text generation method for satellite in-orbit application
CN113297855A
Deep learning real-time target detection method based on embedded device
CN114419473A
Real-time target detection method and system for RISC-V system architecture
CN116434040A
Satellite target ISAR image component-level semantic segmentation method based on deep learning
CN118172551A