AI model deployment method and device, electronic equipment and storage medium
By configuring and quantitatively processing AI models, it solves the problem of inconsistent deployment of AI models on different chip platforms, achieves unified management and efficient deployment of AI models, reduces the cost of maintenance and iterative verification, and supports multi-platform compatibility.
Patent Information
- Application Number
- CN202410755862.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-08
AI Technical Summary
Existing technology cannot uniformly manage the deployment of AI models on different chip platforms, resulting in inconsistent data, unstable frame rates and accuracy, and the inability to conduct complete model quantification and result verification.
Provides an AI model deployment method. By configuring the model name, model path and chip type, it determines whether the model has been trained and meets the operating conditions, and performs quantitative processing and deployment, including the application of binary models and quantization strategies, to ensure that the model is on the target chip. Run efficiently and perform model inference and post-processing.
It achieves unified management and deployment of AI models on multiple platforms, reduces maintenance costs, improves the efficiency of model iterative verification, supports multi-platform compatibility, and reduces time costs.
Smart Images

Figure CN118747074A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of automobile application technology, and in particular, to an AI model deployment method, device, electronic device, and storage medium. Background Art
[0002] With the vigorous development of intelligent driving technology, various chip manufacturers have launched different intelligent driving chips, including GPU, NPU, BPU and TPU, etc., each with different performance, computing power and reasoning engine. As a host manufacturer, different AI models need to be deployed to different chip platforms, and each chip supplier provides different platforms. The individual deployment steps are cumbersome and cannot be managed uniformly. In addition, the frame rate and accuracy of the AI model are different when it is running, and it is necessary to analyze and improve it according to the evaluation report after the model is quantitatively deployed.
[0003] In related technologies, it is impossible to perform complete model quantification, model deployment and result verification on a large number of AI models. Summary of the invention
[0004] The embodiments of the present application provide an AI model deployment method, device, system, electronic device and computer-readable storage medium to solve the problem in the related art that the algorithms developed in different receiving ends are different, resulting in the inability to ensure the consistency of the final presented data.
[0005] In a first aspect, an embodiment of the present application provides an AI model deployment method, which is applied to an AI module deployment integration system, and the method includes:
[0006] For the AI models to be deployed, respectively configure the model name, model path, and board-end chip corresponding to the AI models to be deployed;
[0007] Determine whether the AI model to be deployed is in a training completion state according to the model name and model path;
[0008] If so, determining whether the AI model to be deployed meets the operating conditions for running on the board-side chip;
[0009] If yes, the AI model to be deployed is used as the board-side AI model, wherein the type corresponding to the board-side AI model is a binary model;
[0010] The board-side AI model is deployed on the target chip board.
[0011] Optionally, after the step of respectively configuring the model name, model path, and board-side chip corresponding to the AI model to be deployed for the AI model to be deployed, the method includes:
[0012] Configure a quantization strategy corresponding to the AI model to be deployed for the AI model to be deployed;
[0013] After the step of determining whether the AI model to be deployed meets the operating conditions of the board-side chip, the method includes:
[0014] If not, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the first quantization strategy, quantization processing is performed on the AI model to be deployed based on the first quantization strategy;
[0015] And, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the second quantization strategy, the AI model to be deployed is quantized based on the second quantization strategy.
[0016] Optionally, the type corresponding to the AI model to be deployed is an AI floating-point model, and the quantizing the AI model to be deployed based on the first quantization strategy includes:
[0017] Converting the AI floating-point model into an intermediate format model;
[0018] Pulling a verification data set, and determining whether the verification data set satisfies the legality check through an intermediate format parameter model;
[0019] If yes, perform post-quantization processing according to the intermediate format model and the verification data set until quantization is completed, output the quantized AI model to be deployed, and output the first quantization evaluation report;
[0020] The quantified AI model to be deployed is used as the board-side AI model.
[0021] Optionally, the type corresponding to the AI model to be deployed is an AI floating-point model, and the quantizing the AI model to be deployed based on the second quantization strategy includes:
[0022] Inserted as a quantization node in the AI floating point model;
[0023] Performing floating-point training on the AI floating-point model based on the quantized node to determine whether a preset model accuracy is met;
[0024] If not, perform quantization perception training on the AI floating-point model until the AI floating-point model meets the preset model accuracy, and obtain a fixed-point model;
[0025] The transferred fixed-point model is used as the quantified AI model to be deployed, and a second quantified evaluation report is output;
[0026] The quantified AI model to be deployed is used as the board-side AI model.
[0027] Optionally, deploying the board-side AI model on the target chip board-side includes:
[0028] For the board-side AI model, respectively configure the data input strategy, board-side AI model input format, board-side chip platform, board-side AI model name, board-side AI model path and board-side AI model output format corresponding to the board-side AI model;
[0029] Acquire corresponding test data according to the data input strategy;
[0030] Performing input format conversion on the test data to obtain target test data corresponding to the target input format;
[0031] Running a board-side inference engine library on the board-side chip platform and loading the board-side AI model;
[0032] Perform model inference according to the target test data and the board-side AI model to obtain a model inference result;
[0033] Determining whether the model inference result is to be subjected to model post-processing;
[0034] If not, the model reasoning result is output to the middleware system and the visualization system, so that the middleware system sends the model reasoning result to the target application, and the visualization system performs real-time display according to the model reasoning result.
[0035] Optionally, acquiring corresponding test data according to the data input strategy includes:
[0036] In case that it is detected that the data input strategy is a refill mode, loading pre-acquired test data;
[0037] Alternatively, when it is detected that the data input strategy is a camera connection mode, the camera is started to acquire target image data, and the target image data is subjected to image preprocessing to obtain image test data.
[0038] Optionally, performing input format conversion on the test data to obtain target test data corresponding to a target input format includes:
[0039] Determining whether the test data is subjected to model pre-processing;
[0040] If yes, convert the input format of the test data according to the pre-loaded model pre-processing library to obtain target test data corresponding to the target input format;
[0041] If not, the input format of the test data is converted according to the custom pre-processing code to obtain target test data corresponding to the target input format.
[0042] Optionally, after the step of determining whether the model inference result is to be subjected to model post-processing, the method includes:
[0043] If yes, then perform model post-processing on the model inference result according to the pre-loaded model post-processing library; or,
[0044] The model inference result is post-processed according to the custom post-processing code.
[0045] In a second aspect, an embodiment of the present application provides an AI model deployment device, the device comprising:
[0046] A configuration module, used to configure the model name, model path, and board-end chip corresponding to the AI model to be deployed respectively;
[0047] A first determination module, used to determine whether the AI model to be deployed is in a training completion state according to the model name and model path;
[0048] A second determination module is used to determine whether the AI model to be deployed meets the operating conditions for running on the board-side chip;
[0049] A board-side model acquisition module, used for, if yes, using the AI model to be deployed as the board-side AI model, wherein the type corresponding to the board-side AI model is a binary model;
[0050] A deployment module is used to deploy the board-side AI model on the target chip board.
[0051] Optionally, the device comprises:
[0052] The first module is used to configure a quantization strategy corresponding to the AI model to be deployed for the AI model to be deployed;
[0053] A second module is used for, if no, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the first quantization strategy, performing quantization processing on the AI model to be deployed based on the first quantization strategy;
[0054] The third module is used to, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the second quantization strategy, perform quantization processing on the AI model to be deployed based on the second quantization strategy.
[0055] Optionally, the second module includes:
[0056] A first submodule, configured to convert the AI floating-point model into an intermediate format model;
[0057] The second submodule is used to pull a verification data set and determine whether the verification data set satisfies the legality check through an intermediate format parameter model;
[0058] The third submodule is used to, if yes, perform post-quantization processing according to the intermediate format model and the verification data set until quantization is completed, output the quantized AI model to be deployed, and output a first quantitative evaluation report;
[0059] The fourth submodule is used to use the quantized AI model to be deployed as the board-side AI model.
[0060] Optionally, the third module includes:
[0061] A fifth submodule, used to insert a quantization node into the AI floating point model;
[0062] A sixth submodule is used to perform floating-point training on the AI floating-point model based on the quantized node to determine whether a preset model accuracy is met;
[0063] A seventh submodule is used for, if not, performing quantization perception training on the AI floating-point model until the AI floating-point model meets the preset model accuracy, thereby obtaining a fixed-point model;
[0064] An eighth submodule is used to use the transferred fixed-point model as a quantized AI model to be deployed, and output a second quantization evaluation report;
[0065] The ninth submodule is used to use the quantized AI model to be deployed as the board-side AI model.
[0066] For the board-side AI model, respectively configure the data input strategy, board-side AI model input format, board-side chip platform, board-side AI model name, board-side AI model path and board-side AI model output format corresponding to the board-side AI model;
[0067] Optionally, the deployment module includes:
[0068] A first deployment submodule, configured to obtain corresponding test data according to the data input strategy;
[0069] A second deployment submodule is used to convert the input format of the test data to obtain target test data corresponding to the target input format;
[0070] A third deployment submodule is used to run the board-side inference engine library on the board-side chip platform and load the board-side AI model;
[0071] A fourth deployment submodule is used to perform model inference according to the target test data and the board-side AI model to obtain a model inference result;
[0072] A fifth deployment submodule is used to determine whether the model inference result is subjected to model post-processing;
[0073] The sixth deployment submodule is used to output the model reasoning result to the middleware system and the visualization system if not, so that the middleware system sends the model reasoning result to the target application, and the visualization system performs real-time display according to the model reasoning result.
[0074] Optionally, the first deployment submodule includes:
[0075] A first deployment unit is used to load pre-acquired test data when detecting that the data input strategy is a re-injection mode;
[0076] The second deployment unit is used for, alternatively, starting the camera to acquire target image data when it is detected that the data input strategy is a camera connection mode, performing image preprocessing on the target image data, and obtaining image test data.
[0077] Optionally, the second deployment submodule includes:
[0078] A third deployment unit, used for determining whether the test data is subjected to model pre-processing;
[0079] a fourth deployment unit, configured to, if yes, perform input format conversion on the test data according to a pre-loaded model pre-processing library to obtain target test data corresponding to a target input format;
[0080] The fifth deployment unit is used to, if not, convert the input format of the test data according to the custom pre-processing code to obtain target test data corresponding to the target input format.
[0081] Optionally, the deployment module includes:
[0082] A seventh deployment submodule is used for, if yes, performing model post-processing on the model inference result according to a pre-loaded model post-processing library; or,
[0083] An eighth deployment submodule is used to perform model post-processing on the model inference result according to a custom post-processing code.
[0084] In a third aspect, an embodiment of the present application also provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the AI model deployment methods described above.
[0085] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the AI model deployment methods described above.
[0086] In a fifth aspect, an embodiment of the present application also provides a vehicle, which includes the AI model deployment device as described above.
[0087] In the embodiment of the present application, it is applied to the AI module deployment integration system, and the model name, model path and board-side chip corresponding to the AI model to be deployed are configured for the AI model to be deployed; according to the model name and model path, it is determined whether the AI model to be deployed is in the training completion state; if so, it is determined whether the AI model to be deployed meets the operating conditions for running on the board-side chip; if so, the AI model to be deployed is used as the board-side AI model, wherein the type corresponding to the board-side AI model is a binary model; the board-side AI model is deployed on the target chip board. That is, the embodiment of the present application uses the AI module deployment integration system to open up the entire link of AI embedded model deployment, which is linked together to form a closed loop in AI model deployment, so that each link of deployment and verification can be traced, reducing the maintenance cost of multiple AI models and multi-platform adaptation in the later stage, and can be managed in a unified manner. It can quickly complete the iterative verification, visualization, and log recording of the model. Developers can generate new chip board-side applications based on necessary configurations and a small amount of source code. It is compatible with multiple platforms and reduces time costs.
[0088] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0090] Figure 1 It is a flowchart of the steps of an AI model deployment method provided in an embodiment of the present application;
[0091] Figure 2 It is a flowchart of another AI model deployment method provided in an embodiment of the present application;
[0092] Figure 3It is a flowchart of the steps of another AI model deployment method provided by the implementation of this application;
[0093] Figure 4 This is a device block diagram of an AI model deployment device provided by the present application;
[0094] Figure 5 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0095] Figure 6 It is a schematic diagram of an AI module deployment integration system provided in an embodiment of the present application;
[0096] Figure 7 This is a schematic diagram of an AI model deployment process provided by an embodiment of the present application;
[0097] Figure 8 This is another AI model deployment process diagram provided in an embodiment of the present application. DETAILED DESCRIPTION
[0098] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0099] It should be noted that in the embodiments of the present application, Figure 6 As shown, Figure 6 This is a schematic diagram of an AI module deployment integration system provided in an embodiment of the present application. The architecture of the AI module deployment integration system can be divided into four major modules: a configuration management module, a model conversion system, a model runtime application system, and a system output management system.
[0100] First of all, as for the configuration management module, the configuration management module is mainly used for the configuration of the model and the configuration of the model quantification.
[0101] Specifically, it may include: model path and name configuration; model optimization strategy, operator simplification, parameter constant quantization, etc.; board chip selection; model input and output format configuration, for example, configure the input as NV12 or bgr, configure the model output format to facilitate post-processing decoding; configure the data input strategy of the current application for the embedded end side, the simulation test can be configured with a re-injection strategy, and the field scene test can be configured as a camera input; model quantization strategy: QAT: quantization perception training; PTQ: post-quantization; Generally speaking, the accuracy of QAT will be higher than PTQ, but QAT requires more training time and computing resources.
[0102] As for the model conversion system, the model conversion system may include a model management module, a model structure optimization module, a model conversion module, a model quantification module and a quantitative model evaluation system.
[0103] Among them, the model management module is used to manage all models: model name, model directory, original model, quantized model, model evaluation report, etc.
[0104] The model structure optimization module is used to simplify the model (for example, the onnxs im tool simplifies the model structure).
[0105] Model conversion module: a module used to convert the original model, such as the pytorch / caffe structure model, to the middleware ONNX representation.
[0106] The model quantization module is used in QAT mode and PTQ mode. It manages the quantization system libraries provided by all chip manufacturers and ultimately generates a binary model that can be run on the chip.
[0107] The quantization model evaluation system is used to evaluate the accuracy of the model before and after quantization. The performance (frame rate and latency) evaluation only needs to evaluate whether the performance of the model after quantization meets the requirements.
[0108] For the model runtime application system, the CmakeList file is responsible for compiling the source code into libraries and executable files according to the configured platform and version of the APP system; the third-party library management module is used to uniformly manage third-party libraries of various platforms and different versions; the inference engine module is used to manage the inference engines of various platforms, such as NVIDIA's tensorRT, Horizon's hobot Runtime API, Aixin Yuanzhi's API, etc.; the inference engine is responsible for initializing the chip's inference operating environment and loading the model; finally, the pipe line process during runtime: from data input->data preprocessing->model inference->model post-processing->output.
[0109] Among them, the data output module can support simulation data re-injection and direct camera input; the image preprocessing library is used for format conversion, image cropping, image res i ze, frame extraction and other accelerated processing libraries, and developers can customize the preprocessing source code files; model inference is used to use the previously loaded AI model, import data into memory, and use the current platform's inference engine to accelerate hardware inference; model post-processing is used to decode the model binary output to a fixed format (such as box, image stream), NMS (non-maximum suppression), filter invalid targets, correction, fusion, target tracking, etc. Developers can customize the binary post-processing source code files according to the actual processing logic.
[0110] For the system output management system, the log module is used to manage the logs of other modules, unify the records, display and storage; the output data management module is used to output visual data such as pictures and videos; the evaluation report is used for the accuracy evaluation report before model quantization, and the accuracy and performance evaluation report after model quantization; the front-end web page system is used for real-time display, user interaction, debugging system and other functions that can be used as APP applications.
[0111] The functions of the above-mentioned systems and modules are as follows: the process of each module is specifically disassembled. In the embodiments of the present application, in order to facilitate the understanding of technical personnel in this field, the present application takes the deployment of a certain AI model as an example to provide a detailed description of the full-link process.
[0112] Figure 1 is a flowchart of the steps of an AI model deployment method provided in an embodiment of the present application, such as Figure 1 As shown, the method is applied to the AI module deployment integration system, and includes:
[0113] Step 101, respectively configure the model name, model path and board-end chip corresponding to the AI model to be deployed;
[0114] It should be noted that in the embodiments of the present application, reference can be made to Figure 7 When deploying an AI model to a specific hardware board, a series of configuration steps are required to ensure that the model can run correctly and efficiently on the target hardware.
[0115] Therefore, first of all, you need to configure the model name, model path, and board-side chip corresponding to the AI model to be deployed;
[0116] The purpose of configuring the model name is to determine the name of the model. The model name is the identifier of the model and is used to reference the model in configuration files or codes. In addition, it is necessary to ensure that the model name is unique throughout the system to avoid confusion.
[0117] Configuring the model path is to specify the storage path of the model file. The model path can be a local file system path, or in some cases, a network path. Therefore, you need to ensure that the path is accessible and the model file has been correctly stored in the path.
[0118] Configuring the board chip is to determine the chip type of the target hardware board, such as the chip model, architecture, and any specific hardware accelerators (such as GPU, NPU, or TPU). Then, based on the characteristics of the chip, specific optimizations can be performed on the model, such as quantization, pruning, or specific compilation options.
[0119] In addition, you can also configure the input and output formats of the AI model to be deployed and the quantization strategy.
[0120] Step 102: determine whether the AI model to be deployed is in a training completion state according to the model name and model path;
[0121] It should be noted that in the embodiment of the present application, it is possible to confirm whether the model exists and whether it is in a training completion state based on the model name and model path.
[0122] If it exists and is in the training completion state, proceed to step 103. If it does not exist or the training is not completed, retrain the AI model to be deployed until the training is completed.
[0123] Step 103: If yes, determine whether the AI model to be deployed meets the operating conditions for running on the board-side chip;
[0124] It should be noted that in an embodiment of the present application, if it is determined that the AI model to be deployed is in a training completion state, the AI model to be deployed can be pulled, and it can be determined whether the AI model to be deployed meets the operating conditions for running on the board-side chip.
[0125] Among them, operating conditions may include hardware compatibility, software support, model format, resource limitations, and performance requirements.
[0126] Among them, hardware compatibility can be to check whether the board-side chip supports the computing operations required by the model, such as convolution, matrix multiplication, etc. Confirm whether the chip has sufficient computing power (such as CPU, GPU, NPU or TPU) to execute the model.
[0127] Software support can be to confirm whether the board-side chip has the corresponding software library and driver to support the operation of the model, such as TensorFlow Lite, ONNX Runtime, or other hardware-specific runtime environments.
[0128] Check to see if there is a model compiler or conversion tool optimized for this chip.
[0129] The model format can be used to confirm whether the model has been converted into a format supported by the board chip, such as binary format, the format of a specific framework (such as TensorFlow's .pb file, ONNX's .onnx file), etc. If the model needs to be quantized or pruned to adapt to hardware limitations, ensure that these optimizations have been completed.
[0130] Resource constraints can be used to evaluate whether the memory (RAM and storage) of the board chip is sufficient to load and run the model. Check whether the power consumption and heat dissipation capacity of the chip are sufficient to support the continuous operation of the model.
[0131] Performance requirements can be if the model has specific latency or throughput requirements, ensuring that the chip on the board can meet these performance indicators. Benchmarks or simulations can be performed to verify the actual performance of the model on the chip.
[0132] Step 104: If yes, the AI model to be deployed is used as a board-side AI model, wherein the type corresponding to the board-side AI model is a binary model;
[0133] If the conditions are met, the AI model to be deployed will be used as the board-side AI model, and the type corresponding to the board-side AI model is a binary model.
[0134] It should be noted that board-side AI models, if they refer to AI models deployed on hardware boards, may use binary format to optimize performance. Such models usually need to go through specific optimization and conversion processes to ensure that they can run efficiently on specific hardware. For example, frameworks such as TensorFlow Lite or ONNX provide tools to convert models into binary format for deployment on various devices.
[0135] Therefore, in an embodiment of the present application, the final board-side AI model is a binary model. A binary model refers to a model format in which the weights and structure of the model are stored in the form of binary data. In the present application, after the model conversion / quantization process, the output result is a binary model that can be run on the chip board. The binary model can improve the loading speed and execution efficiency of the model, especially in a resource-constrained environment.
[0136] Step 105, deploying the board-side AI model on the target chip board.
[0137] It should be noted that in the embodiment of the present application, when the AI model to be deployed is used as a board-side AI model, the board-side AI model can be deployed on the target chip board.
[0138] Specifically, the converted and compiled model file is transferred to the target chip board. This can be done via USB, network transmission or other physical media. Further, it can be ensured that the model file is stored in a location accessible to the board chip, such as internal storage or external SD card.
[0139] Furthermore, if Figure 3 As shown, the deploying of the board-side AI model on the target chip board-side includes:
[0140] Step 1051, respectively configuring the data input strategy, board AI model input format, board chip platform, board AI model name, board AI model path and board AI model output format corresponding to the board AI model for the board AI model;
[0141] Step 1052, obtaining corresponding test data according to the data input strategy;
[0142] Furthermore, step 1052, i.e., obtaining corresponding test data according to the data input strategy, includes:
[0143] In case that it is detected that the data input strategy is a refill mode, loading pre-acquired test data;
[0144] Alternatively, when it is detected that the data input strategy is a camera connection mode, the camera is started to acquire target image data, and the target image data is subjected to image preprocessing to obtain image test data.
[0145] Step 1053, converting the input format of the test data to obtain target test data corresponding to the target input format;
[0146] Furthermore, in step 1053, the step of converting the input format of the test data to obtain target test data corresponding to the target input format includes:
[0147] Determining whether the test data is subjected to model pre-processing;
[0148] If yes, convert the input format of the test data according to the pre-loaded model pre-processing library to obtain target test data corresponding to the target input format;
[0149] If not, the input format of the test data is converted according to the custom pre-processing code to obtain target test data corresponding to the target input format.
[0150] Step 1054, running the board-side inference engine library on the board-side chip platform, and loading the board-side AI model;
[0151] Step 1055, performing model inference according to the target test data and the board-side AI model to obtain a model inference result;
[0152] Step 1056, determining whether the model inference result is to be subjected to model post-processing;
[0153] Step 1057, if not, output the model reasoning result to the middleware system and the visualization system, so that the middleware system sends the model reasoning result to the target application, and the visualization system performs real-time display according to the model reasoning result.
[0154] It should be noted that the above steps 1051-1057 can refer to Figure 8 , the above steps 1051-1057 can be the deployment and operation process of the quantized AI model on the chip board.
[0155] Therefore, first, configure the board-side AI model parameters, including: data input strategy, board-side AI model input format, board-side chip platform, board-side AI model name, board-side AI model path, and board-side AI model output format.
[0156] Among them, the data input strategy determines how the data is input into the model, such as the re-injection mode or the camera connection mode; the board-side AI model input format defines the input data format expected by the model, such as image size, data type, etc.; the board-side chip platform specifies the specific chip model and architecture of the target hardware board; the board-side AI model name assigns a unique identifier to the model; the board-side AI model path specifies the location where the model file is stored on the board; the board-side AI model output format defines the data format of the model output, such as category labels, confidence levels, etc.
[0157] Secondly, according to the data input strategy, if it is the re-injection mode, the pre-prepared test data set is loaded; if it is the camera connection mode, the camera is started to capture images and the images are pre-processed (such as scaling, normalization, etc.) to generate image test data suitable for model input.
[0158] Among them, "re-injection mode" is a data input strategy, which means that the previously collected or generated data sets are re-input into the model for reasoning or testing. This mode is opposite to the real-time data input mode (such as camera connection mode), which involves capturing data in real time and immediately inputting it into the model.
[0159] In the embodiment of the present application, the model can be tested in a controlled environment through the re-injection mode, the test process can be accurately repeated, and it is not affected by noise or instability that may appear in the real-time data stream. In addition, it also allows the use of large data sets for testing, which is very useful for model training and verification.
[0160] Secondly, convert the test data format, convert the acquired test data into the target input format required by the model, and ensure that the data matches the input requirements of the model.
[0161] Secondly, run the board-side inference engine and load the model, start the inference engine library on the board-side chip, and load the configured AI model from the specified path.
[0162] Secondly, perform model inference and use the loaded model to infer the converted target test data to generate model inference results.
[0163] Secondly, determine whether post-processing is needed. According to application requirements, determine whether the model inference results require further post-processing, such as non-maximum suppression (NMS) and result analysis.
[0164] Secondly, output the inference results. If no post-processing is required, directly output the model inference results to the middleware system or visualization system for further analysis or display.
[0165] Throughout the entire process, ensure that each step matches the configuration of the board-side AI model and the characteristics of the board-side chip to ensure that the model can run correctly and efficiently. In addition, the preparation and format conversion of test data are key steps to ensure the accuracy of model reasoning. Finally, depending on the actual application scenario, appropriate post-processing of the model reasoning results may be required to meet specific business needs.
[0166] In addition, further, after step 1056, after the step of determining whether the model inference result is subjected to model post-processing, the method includes:
[0167] If yes, then perform model post-processing on the model inference result according to the pre-loaded model post-processing library; or,
[0168] The model inference result is post-processed according to the custom post-processing code.
[0169] It should be noted that in the embodiment of the present application, after step 1056, i.e., the step of determining whether the model inference result needs to be post-processed, if it is determined that post-processing is required, one of the following two methods can be adopted:
[0170] First, use pre-loaded model post-processing libraries to load pre-prepared model post-processing libraries. These libraries usually contain standardized post-processing functions for specific types of model outputs, such as non-maximum suppression (NMS) in target detection, category parsing in classification tasks, etc.
[0171] Call functions or methods in the post-processing library to process the model inference results to obtain the final output that can be used for practical applications.
[0172] Second, use custom post-processing code. If the pre-loaded post-processing library does not meet specific requirements or customized post-processing is required, you can write custom post-processing code. Custom post-processing code should be designed according to the specific format of model output and the requirements of application scenarios, which may include data parsing, result merging, threshold processing and other operations; run custom post-processing code to process the model inference results to obtain output that meets specific business logic.
[0173] In the embodiment of the present application, it is applied to the AI module deployment integration system, and the model name, model path and board-side chip corresponding to the AI model to be deployed are configured for the AI model to be deployed; according to the model name and model path, it is determined whether the AI model to be deployed is in the training completion state; if so, it is determined whether the AI model to be deployed meets the operating conditions for running on the board-side chip; if so, the AI model to be deployed is used as the board-side AI model, wherein the type corresponding to the board-side AI model is a binary model; the board-side AI model is deployed on the target chip board. That is, the embodiment of the present application uses the AI module deployment integration system to open up the entire link of AI embedded model deployment, which is linked together to form a closed loop in AI model deployment, so that each link of deployment and verification can be traced, reducing the maintenance cost of multiple AI models and multi-platform adaptation in the later stage, and can be managed in a unified manner. It can quickly complete the iterative verification, visualization, and log recording of the model. Developers can generate new chip board-side applications based on necessary configurations and a small amount of source code. It is compatible with multiple platforms and reduces time costs.
[0174] Figure 2 is a flowchart of the steps of an AI model deployment method provided in an embodiment of the present application, such as Figure 2 As shown, the method includes:
[0175] Step 201, respectively configure the model name, model path and board-end chip corresponding to the AI model to be deployed;
[0176] Step 202: configuring a quantization strategy corresponding to the AI model to be deployed for the AI model to be deployed;
[0177] Step 203, determining whether the AI model to be deployed is in a training completion state according to the model name and model path;
[0178] Step 204: If yes, determine whether the AI model to be deployed meets the operating conditions for running on the board-side chip;
[0179] It should be noted that, in the embodiment of the present application, the above steps 201-204 refer to the previous discussion and will not be repeated here.
[0180] Step 205, if not, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the first quantization strategy, the AI model to be deployed is quantized based on the first quantization strategy, and the quantized AI model to be deployed is used as the board-side AI model; and, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the second quantization strategy, the AI model to be deployed is quantized based on the second quantization strategy, and the quantized AI model to be deployed is used as the board-side AI model.
[0181] It should be noted that in the embodiments of the present application, quantization is a commonly used optimization technique in the process of AI model deployment, which reduces the size of the model and improves the reasoning speed by reducing the precision of the weights and activation values in the model, while maintaining the accuracy of the model as much as possible. The choice of quantization strategy depends on the characteristics of the target hardware and the requirements of the application scenario.
[0182] Furthermore, the type corresponding to the AI model to be deployed is an AI floating-point model, and the quantizing process of the AI model to be deployed based on the first quantization strategy includes:
[0183] Converting the AI floating-point model into an intermediate format model;
[0184] Pulling a verification data set, and determining whether the verification data set satisfies the legality check through an intermediate format parameter model;
[0185] If yes, perform post-quantization processing according to the intermediate format model and the verification data set until quantization is completed, output the quantized AI model to be deployed, and output the first quantization evaluation report;
[0186] The quantified AI model to be deployed is used as the board-side AI model.
[0187] It should be noted that, in the embodiment of the present application, the first quantization strategy includes the following contents:
[0188] Convert to an intermediate format model, converting the AI floating point model to an intermediate format, which is usually the starting point of the quantization process and preserves the model's structure and floating point weights;
[0189] Pull the validation data set and select or generate a validation data set that should represent the real data that the model will process.
[0190] Legality check, use the intermediate format model to reason about the verification data set to determine whether the data set meets the legality check, that is, whether the data set is valid and suitable for the quantification process.
[0191] Post-quantization processing: if the verification data set passes the legality check, post-quantization processing is performed according to the intermediate format model and the verification data set, which usually involves converting floating-point weights and activation values into lower-precision integers or fixed-point numbers. In the embodiment of the present application, the post-quantization processing is PTQ;
[0192] Among them, post-quantization; PTQ (Post-Training Quantization) is a quantization technology used to convert model parameters represented by floating-point numbers into lower-precision integer representations after model training. PTQ is a post-processing step performed after model training is completed. By compressing the parameter representation of the model, the model's storage space requirements and computing costs can be reduced, making it suitable for some resource-constrained scenarios such as mobile devices and edge devices. PTQ can usually achieve model quantization and optimization without significantly compromising model performance.
[0193] After quantization is completed, continue post-quantization processing until the quantization process is complete. This may require multiple iterations and fine-tuning to ensure the performance of the model after quantization;
[0194] Once quantization is completed, the quantized model is output. This model is now an integer or fixed-point model suitable for running on the board hardware. At the same time, a quantization evaluation report is generated. This report should contain a performance comparison of the model before and after quantization, including indicators such as accuracy, inference speed, and model size.
[0195] Finally, the quantized model is deployed to the target hardware and runs as a board-side AI model.
[0196] Furthermore, the type corresponding to the AI model to be deployed is an AI floating-point model, and the quantizing process of the AI model to be deployed based on the second quantization strategy includes:
[0197] Inserted as a quantization node in the AI floating point model;
[0198] Performing floating-point training on the AI floating-point model based on the quantized node to determine whether a preset model accuracy is met;
[0199] If not, perform quantization perception training on the AI floating-point model until the AI floating-point model meets the preset model accuracy, and obtain a fixed-point model;
[0200] The transferred fixed-point model is used as the quantified AI model to be deployed, and a second quantified evaluation report is output;
[0201] The quantified AI model to be deployed is used as the board-side AI model.
[0202] It should be noted that, in the embodiment of the present application, the second quantization strategy includes the following contents:
[0203] Insert simulated quantization nodes into the AI floating-point model. These nodes will simulate quantization operations during training, that is, use quantized weights and activation values during backpropagation.
[0204] The purpose of using a model with a quantization node inserted for floating-point training is to maintain the accuracy of the model as much as possible while simulating quantization.
[0205] During the training process, regularly check whether the model accuracy meets the preset model accuracy requirements. If the model accuracy does not meet the requirements, you need to continue training.
[0206] If the accuracy of the model does not meet the preset requirements, quantization-aware training (QAT) is performed. Quantization-aware training (QAT) is a deep learning training technique that aims to consider subsequent quantization when training the model (i.e. converting model parameters from floating point numbers to lower-precision integer representations). With QAT, the model can consider the possible loss of accuracy during the quantization process during the training phase and adjust the model parameters accordingly so that it can still maintain good performance after quantization. QAT can help reduce the storage requirements and computing costs of the model and is suitable for some embedded devices and edge computing scenarios.
[0207] When the AI floating-point model meets the preset model accuracy, it is converted to a fixed-point model. This conversion process involves quantizing the floating-point weights and activation values into integers or fixed-point numbers.
[0208] The converted fixed-point model is used as the quantized AI model to be deployed. This model is now an integer or fixed-point model suitable for running on the board hardware. At the same time, a second quantization evaluation report is generated. This report should contain a performance comparison of the model before and after quantization, including indicators such as accuracy, inference speed, and model size.
[0209] Deploy the quantized model to the target hardware and run it as a board-side AI model.
[0210] Step 206: If yes, the AI model to be deployed is used as the board-side AI model, wherein the type corresponding to the board-side AI model is a binary model;
[0211] Step 207, deploy the board-side AI model on the target chip board.
[0212] That is, the embodiment of the present application uses the AI module deployment integrated system to open up the entire link of AI embedded model deployment, which is linked together to form a closed loop in AI model deployment, so that each link of deployment and verification can be traced, reducing the maintenance cost of multiple AI models and multi-platform adaptation in the later stage, and can be managed in a unified manner, and can quickly complete the iterative verification, visualization, and log recording of the model. Developers can generate new chip board applications based on necessary configurations and a small amount of source code. It is compatible with multiple platforms, reducing time costs.
[0213] Corresponding to the method provided in the above-mentioned AI model deployment method embodiment of the present application, see Figure 4 , the present application also provides a logic block diagram of an AI model deployment device. In this embodiment, the device 400 includes:
[0214] A configuration module, used to configure the model name, model path, and board-end chip corresponding to the AI model to be deployed respectively;
[0215] A first determination module, used to determine whether the AI model to be deployed is in a training completion state according to the model name and model path;
[0216] A second determination module is used to determine whether the AI model to be deployed meets the operating conditions for running on the board-side chip;
[0217] A board-side model acquisition module, used for, if yes, using the AI model to be deployed as the board-side AI model, wherein the type corresponding to the board-side AI model is a binary model;
[0218] A deployment module is used to deploy the board-side AI model on the target chip board.
[0219] Optionally, the device comprises:
[0220] The first module is used to configure a quantization strategy corresponding to the AI model to be deployed for the AI model to be deployed;
[0221] A second module is used for, if no, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the first quantization strategy, performing quantization processing on the AI model to be deployed based on the first quantization strategy;
[0222] The third module is used to, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the second quantization strategy, perform quantization processing on the AI model to be deployed based on the second quantization strategy.
[0223] Optionally, the second module includes:
[0224] A first submodule, configured to convert the AI floating-point model into an intermediate format model;
[0225] The second submodule is used to pull a verification data set and determine whether the verification data set satisfies the legality check through an intermediate format parameter model;
[0226] The third submodule is used to, if yes, perform post-quantization processing according to the intermediate format model and the verification data set until quantization is completed, output the quantized AI model to be deployed, and output a first quantitative evaluation report;
[0227] The fourth submodule is used to use the quantized AI model to be deployed as the board-side AI model.
[0228] Optionally, the third module includes:
[0229] A fifth submodule, used to insert a quantization node into the AI floating point model;
[0230] A sixth submodule is used to perform floating-point training on the AI floating-point model based on the quantized node to determine whether a preset model accuracy is met;
[0231] A seventh submodule is used for, if not, performing quantization perception training on the AI floating-point model until the AI floating-point model meets the preset model accuracy, thereby obtaining a fixed-point model;
[0232] An eighth submodule is used to use the transferred fixed-point model as a quantized AI model to be deployed, and output a second quantization evaluation report;
[0233] The ninth submodule is used to use the quantized AI model to be deployed as the board-side AI model.
[0234] For the board-side AI model, respectively configure the data input strategy, board-side AI model input format, board-side chip platform, board-side AI model name, board-side AI model path and board-side AI model output format corresponding to the board-side AI model;
[0235] Optionally, the deployment module includes:
[0236] A first deployment submodule, configured to obtain corresponding test data according to the data input strategy;
[0237] A second deployment submodule is used to convert the input format of the test data to obtain target test data corresponding to the target input format;
[0238] A third deployment submodule is used to run the board-side inference engine library on the board-side chip platform and load the board-side AI model;
[0239] A fourth deployment submodule is used to perform model inference according to the target test data and the board-side AI model to obtain a model inference result;
[0240] A fifth deployment submodule is used to determine whether the model inference result is subjected to model post-processing;
[0241] The sixth deployment submodule is used to output the model reasoning result to the middleware system and the visualization system if not, so that the middleware system sends the model reasoning result to the target application, and the visualization system performs real-time display according to the model reasoning result.
[0242] Optionally, the first deployment submodule includes:
[0243] A first deployment unit is used to load pre-acquired test data when detecting that the data input strategy is a re-injection mode;
[0244] The second deployment unit is used for, alternatively, starting the camera to acquire target image data when it is detected that the data input strategy is a camera connection mode, performing image preprocessing on the target image data, and obtaining image test data.
[0245] Optionally, the second deployment submodule includes:
[0246] A third deployment unit, used for determining whether the test data is subjected to model pre-processing;
[0247] a fourth deployment unit, configured to, if yes, perform input format conversion on the test data according to a pre-loaded model pre-processing library to obtain target test data corresponding to a target input format;
[0248] The fifth deployment unit is used to, if not, convert the input format of the test data according to the custom pre-processing code to obtain target test data corresponding to the target input format.
[0249] Optionally, the deployment module includes:
[0250] A seventh deployment submodule is used for, if yes, performing model post-processing on the model inference result according to a pre-loaded model post-processing library; or,
[0251] An eighth deployment submodule is used to perform model post-processing on the model inference result according to a custom post-processing code.
[0252] In summary, the embodiment of the present application provides an AI model deployment device. The embodiment of the present application uses an AI module deployment integrated system to open up the entire link of AI embedded model deployment, which is linked together to form a closed loop in AI model deployment, so that each link of deployment and verification can be traced, reducing the maintenance cost of multiple AI models and multi-platform adaptation in the later stage, and can be managed in a unified manner. It can quickly complete the iterative verification, visualization, and log recording of the model. Developers can generate new chip board applications based on necessary configurations and a small amount of source code. It is compatible with multiple platforms, reducing time costs.
[0253] Figure 5 This is a structural diagram of an electronic device M00 provided in an embodiment of the present application. In the figure, the electronic device M00 includes a processor M01 and a memory M02. The memory M02 stores programs or instructions that can be run on the processor M01. When the program or instructions are executed by the processor M01, the various steps of the above-mentioned AI model deployment method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be repeated here.
[0254] In an embodiment of the present application, the memory M02 can be used to store software programs and various data. The memory M02 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory M02 may include a volatile memory or a non-volatile memory, or the memory x09 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (EnhancedSDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory M02 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0255] The processor M01 may include one or more processing units; optionally, the processor M01 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor M01.
[0256] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned AI model deployment method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0257] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0258] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned AI model deployment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0259] It should be understood that the chip involved in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0260] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned AI model deployment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0261] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0262] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0263] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An AI model deployment method, characterized in that: Applied to an AI module deployment integration system, the method includes: For the AI models to be deployed, respectively configure the model name, model path, and board-end chip corresponding to the AI models to be deployed; Determine whether the AI model to be deployed is in a training completion state according to the model name and model path; If so, determining whether the AI model to be deployed meets the operating conditions for running on the board-side chip; If yes, the AI model to be deployed is used as the board-side AI model, wherein the type corresponding to the board-side AI model is a binary model; The board-side AI model is deployed on the target chip board.
2. The method according to claim 1, characterized in that After the step of respectively configuring the model name, model path, and board-side chip corresponding to the AI model to be deployed for the AI model to be deployed, the method includes: Configure a quantization strategy corresponding to the AI model to be deployed for the AI model to be deployed; After the step of determining whether the AI model to be deployed meets the operating conditions of the board-side chip, the method includes: If not, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the first quantization strategy, the AI model to be deployed is quantized based on the first quantization strategy, and the quantized AI model to be deployed is used as the board-side AI model; Furthermore, when it is detected that the quantization strategy corresponding to the AI model to be deployed is the second quantization strategy, the AI model to be deployed is quantized based on the second quantization strategy, and the quantized AI model to be deployed is used as the board-side AI model.
3. The method according to claim 2, characterized in that The type corresponding to the AI model to be deployed is an AI floating-point model, and the quantizing the AI model to be deployed based on the first quantization strategy includes: Converting the AI floating-point model into an intermediate format model; Pulling a verification data set, and determining whether the verification data set satisfies the legality check through an intermediate format parameter model; If yes, perform post-quantization processing according to the intermediate format model and the verification data set until quantization is completed, output the quantized AI model to be deployed, and output the first quantization evaluation report; The quantified AI model to be deployed is used as the board-side AI model.
4. The method according to claim 2, characterized in that: The type corresponding to the AI model to be deployed is an AI floating-point model, and the quantizing the AI model to be deployed based on the second quantization strategy includes: Inserted as a quantization node in the AI floating point model; Performing floating-point training on the AI floating-point model based on the quantized node to determine whether a preset model accuracy is met; If not, perform quantization perception training on the AI floating-point model until the AI floating-point model meets the preset model accuracy, and obtain a fixed-point model; The transferred fixed-point model is used as the quantified AI model to be deployed, and a second quantified evaluation report is output; The quantified AI model to be deployed is used as the board-side AI model.
5. The method according to claim 1, characterized in that The step of deploying the board-side AI model on the target chip board-side includes: For the board-side AI model, respectively configure the data input strategy, board-side AI model input format, board-side chip platform, board-side AI model name, board-side AI model path and board-side AI model output format corresponding to the board-side AI model; Acquire corresponding test data according to the data input strategy; Performing input format conversion on the test data to obtain target test data corresponding to the target input format; Running a board-side inference engine library on the board-side chip platform and loading the board-side AI model; Perform model inference according to the target test data and the board-side AI model to obtain a model inference result; Determining whether the model inference result is to be subjected to model post-processing; If not, the model reasoning result is output to the middleware system and the visualization system, so that the middleware system sends the model reasoning result to the target application, and the visualization system performs real-time display according to the model reasoning result.
6. The method according to claim 5, characterized in that The acquiring corresponding test data according to the data input strategy comprises: In case that it is detected that the data input strategy is a refill mode, loading pre-acquired test data; Alternatively, when it is detected that the data input strategy is a camera connection mode, the camera is started to acquire target image data, and the target image data is subjected to image preprocessing to obtain image test data.
7. The method according to claim 5, characterized in that The converting the input format of the test data to obtain target test data corresponding to the target input format includes: Determining whether the test data is subjected to model pre-processing; If yes, convert the input format of the test data according to the pre-loaded model pre-processing library to obtain target test data corresponding to the target input format; If not, the input format of the test data is converted according to the custom pre-processing code to obtain target test data corresponding to the target input format.
8. The method according to claim 5, characterized in that After the step of determining whether the model inference result is to be subjected to model post-processing, the method comprises: If yes, then perform model post-processing on the model inference result according to the pre-loaded model post-processing library; or, The model inference result is post-processed according to the custom post-processing code.
9. An AI model deployment device, characterized in that: Applied to an AI module deployment integrated system, the device comprises: A configuration module, used to configure the model name, model path, and board-end chip corresponding to the AI model to be deployed respectively; A first determination module, used to determine whether the AI model to be deployed is in a training completion state according to the model name and model path; A second determination module is used to determine whether the AI model to be deployed meets the operating conditions for running on the board-side chip; A board-side model acquisition module, used for, if yes, using the AI model to be deployed as the board-side AI model, wherein the type corresponding to the board-side AI model is a binary model; A deployment module is used to deploy the board-side AI model on the target chip board.
10. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the AI model deployment method as described in any one of claims 1 to 8.
Citation Information
Cited By
Automatic model deployment and optimization system and method of edge AI acceleration board card
CN121957620A
