Target detection method based on vehicle gauge level edge computing chip
By using the object detection method based on automotive-grade edge computing chips in smart cars, the problem of low computing resource limitation and real-time performance in smart cars is solved, efficient target detection and positioning is achieved, and the safety of autonomous driving is improved and reliability.
Patent Information
- Application Number
- CN202410913115.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-01
AI Technical Summary
Object detection algorithms in the field of smart cars face problems such as limited computing resource and low real-time performance, and cannot meet the needs of efficient, safe and reliable autonomous driving.
Using the object detection method based on the automotive-grade edge computing chip, the image to be detected is processed in the object detection model format and input the object detection model, and the artificial intelligence processor is run in the automotive-grade edge computing chip to obtain inferences of different scales. The results are processed after the process, and the target detection results are finally displayed on the image.
It improves the efficiency and performance of object detection, solves the problems of limited computing resources and low real-time performance, and realizes real-time object detection and positioning in smart car environments.
Smart Images

Figure CN118887385A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a target detection method based on an automotive-grade edge computing chip. Background Art
[0002] With the rapid development of smart car technology, we are now in a new era of connected vehicles and autonomous driving. The application of target detection algorithms in the field of smart cars has become increasingly critical. In order to achieve efficient, safe and reliable operation of smart cars, a method for implementing target detection algorithms on an efficient edge computing platform is needed to improve the safety and autonomous driving capabilities of smart cars.
[0003] However, the target detection algorithms in the field of smart cars currently face some challenges, such as limited computing resources and real-time requirements, which cannot meet the needs of target detection. Summary of the invention
[0004] The present invention provides a target detection method, device, equipment and storage medium based on an automotive-grade edge computing chip to solve the problems of limited computing resources and low real-time performance in the prior art.
[0005] According to one aspect of the present invention, a target detection method based on an automotive-grade edge computing chip is provided, the method comprising:
[0006] Processing the image to be detected according to the format corresponding to the target detection model and inputting it into the target detection model;
[0007] Running the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain inference results corresponding to the image to be detected at different scales; the inference results include tensor data of pixel points included in the image to be detected at different scales;
[0008] Post-processing the inference result to obtain a target detection result corresponding to the image to be detected;
[0009] The target detection result is displayed on the image to be detected.
[0010] According to another aspect of the present invention, a target detection device based on an automotive-grade edge computing chip is provided, the device comprising:
[0011] An input module, used to process the image to be detected according to the format corresponding to the target detection model and then input it into the target detection model;
[0012] An operation module is used to operate the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain the corresponding reasoning results of the image to be detected at different scales; the reasoning results include tensor data of pixel points included in the image to be detected at different scales;
[0013] A processing module, used for post-processing the inference result to obtain a target detection result corresponding to the image to be detected;
[0014] A display module is used to display the target detection result on the image to be detected.
[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising: at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the target detection method based on the automotive-grade edge computing chip described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the target detection method based on an automotive-grade edge computing chip as described in any embodiment of the present invention when executed.
[0019] An embodiment of the present invention provides a target detection method based on an automotive-grade edge computing chip, the method comprising: processing the image to be detected in a format corresponding to the target detection model and inputting it into the target detection model; running the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain the inference results corresponding to the image to be detected at different scales; the inference results include the tensor data of the pixel points included in the image to be detected at different scales; post-processing the inference results to obtain the target detection results corresponding to the image to be detected; and displaying the target detection results on the image to be detected. This method can improve the efficiency and performance of target detection by running the target detection model through at least one artificial intelligence processor in the automotive-grade edge computing chip, solving the problems of limited computing resources and low real-time performance in the prior art.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of a flow chart of a target detection method based on an automotive-grade edge computing chip provided in Embodiment 1 of the present invention;
[0023] Figure 2 A schematic diagram of a flow chart of a target detection method based on an automotive-grade edge computing chip provided in an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of the structure of a target detection device based on an automotive-grade edge computing chip provided in Embodiment 2 of the present invention;
[0025] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only an embodiment of a part of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should belong to the scope of protection of the present invention. It should be understood that the various steps recorded in the method implementation of the present invention can be performed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0027] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variations of the terms "including" and "having" are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0031] Embodiment 1
[0032] Figure 1 A flow chart of a target detection method based on an automotive-grade edge computing chip is provided for the first embodiment of the present invention. The method can be applied to the case of detecting targets in an image. The method can be performed by a target detection device based on an automotive-grade edge computing chip, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device. In this embodiment, the electronic device includes but is not limited to: computers and other devices.
[0033] like Figure 1 As shown, a target detection method based on an automotive-grade edge computing chip provided in Embodiment 1 of the present invention includes the following steps:
[0034] S110, processing the image to be detected according to a format corresponding to the target detection model and inputting the processed image into the target detection model.
[0035] Among them, the image to be detected may be a picture that needs to be detected. The target detection model may be a model for detecting targets in a picture, and the target detection model may be a model based on a first-order fully convolutional target detection algorithm (Fully Convolutional One-Stage Object Detection, FCOS). The FCOS algorithm is a deep learning algorithm that has achieved remarkable results in the field of target detection. It realizes efficient target detection and positioning through a fully convolutional neural network structure, and the structural characteristics of the FCOS algorithm enable it to demonstrate better performance on automotive-grade edge computing chips.
[0036] In this embodiment, an image to be detected may be obtained, the format of the image to be detected may be processed, and the processed image to be detected may be input into the target detection model. In this embodiment, the application scenario of obtaining the image to be detected may be an application scenario in intelligent driving of a vehicle with high real-time requirements.
[0037] In one embodiment, before the image to be detected is processed according to the format corresponding to the target detection model and then input into the target detection model, it also includes: obtaining the handle of the target detection model; obtaining the input and output information of the target detection model based on the handle through the interface of the automotive-grade edge computing chip; and pre-applying for memory space for the target detection model on the automotive-grade edge computing chip according to the input and output information.
[0038] The handle can be a reference or identifier for the target detection model. The handle allows the program to operate the resource by referencing the handle without directly accessing the resource itself. The input and output information can be the number and space occupied by the input or output information of the target detection model.
[0039] In this embodiment, the handle of the target detection model can be obtained to obtain the input and output information of the target detection model through the handle. Specifically, the input and output information can be obtained through the interface on the automotive-grade edge computing chip, and memory space can be applied for the target detection model in advance according to the input and output information. Exemplarily, a model list including multiple models can be initialized and created, and the handle of the trained FCOS model can be obtained from the list. The model can be operated according to the obtained handle; the input and output information of the model can be obtained using the chip interface, and memory space can be applied for the input and output information according to the obtained information.
[0040] S120. Run the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain corresponding inference results of the image to be detected at different scales.
[0041] The inference result includes tensor data of pixel points included in the image to be detected at different scales.
[0042] Among them, the automotive-grade edge computing chip may refer to a chip whose technical standards meet the automotive grade, which can be applied to automobile control and can perform edge computing. The artificial intelligence processor may be a processor specially designed for artificial intelligence, which is a new type of processor architecture that simulates the structure and principle of the human brain neural network to achieve rapid processing and analysis of data. In this embodiment, the type of automotive-grade edge computing chip is not limited. For example, the automotive-grade edge computing chip may be Journey3 (J3), and the artificial intelligence processing may be the processor (Brain Processing Unit, BPU) in Journey3. The J3 chip has the characteristics of strong computing power and low power consumption. The chip has two built-in special cores (i.e., BPU) for accelerating convolutional neural networks, which can realize rapid reasoning of the target detection model of the convolutional neural network structure, so that the target detection task can be completed more quickly with limited resources of the edge device.
[0043] Among them, the inference results at different scales refer to the prediction results of the target generated by the target detection model at different feature map levels. In FCOS, the network extracts features from the input image through multiple convolutional layers, and predicts the category, bounding box, and center point of the target through classification branches, regression branches, and center branches. In this process, FCOS considers feature maps of different scales and detects targets of different sizes by matching the prediction results with feature maps of different scales. Therefore, the scale in FCOS refers to the range of targets of different sizes that the algorithm can perceive and process. By using a multi-scale feature map pyramid and corresponding prediction branches, FCOS can achieve effective detection and positioning of targets of different scales.
[0044] Among them, tensor data can refer to a collection of data arranged in a multidimensional space, which can be understood as a multidimensional array. In the fields of machine learning and deep learning, tensors are very common data structures used to represent and process multidimensional data. For example, in image processing, an image can be represented as a three-dimensional tensor, where the first dimension represents the height of the image, the second dimension represents the width of the image, and the third dimension represents the color channel of the image.
[0045] In this embodiment, the target detection model can be run through the artificial intelligence processor in the automotive-grade edge computing chip. When the chip is Journey3, the number of artificial intelligence processors used can be one or two. The target detection model will output inference results at different scales based on the input image to be detected.
[0046] S130: Post-process the inference result to obtain a target detection result corresponding to the image to be detected.
[0047] Among them, post-processing may refer to further processing and optimization based on the output results of the model to improve the quality and accuracy of the detection results. The target detection result may be the detection result of the target detected in the image to be detected, and the detection result may include information such as target category, category confidence, bounding box data, center point confidence, etc. The bounding box data may be coordinate data that can constitute a bounding box. For example, when the bounding box is a rectangle, the bounding box data may be two coordinates as vertices, the coordinates of the upper left corner and the lower right corner.
[0048] In this embodiment, after obtaining the inference result output by the target detection model, the inference result can be post-processed to filter out inaccurate results in the inference result to obtain a target detection result with high confidence.
[0049] In one embodiment, the reasoning results of the FCOS model may be distributed on five scales, and the data formats of the reasoning results on the five scales may be determined respectively, and corresponding information may be extracted from the reasoning results according to the data formats.
[0050] For example, Figure 2 A flow chart of a target detection method based on an automotive-grade edge computing chip provided by an embodiment of the present invention. Figure 2 As shown, after reading the image to be detected, the image can be converted to NV12 format, which helps to improve the inference speed. Specifically, it is necessary to read the color image from the input image to be detected, resize it to match the size of the tensor to be input to the target detection model, extract the Y component data in NV12 format and copy it to the memory of the input tensor. Extract the UV component data, arrange it alternately according to the requirements of the NV12 format, and copy it to the memory of the input tensor. Establish a model inference task, define the inference parameters and perform inference on the BPU of the chip.
[0051] After obtaining the inference result, a function is designed to determine whether the format of the output tensor is the number of samples, number of channels, height, width (Batch, Channels, Height, Width, NCHW) or the number of samples, height, width, number of channels (Batch, Height, Width, Channels, NHWC). After the judgment, the data is parsed through the corresponding function to obtain information such as target category, category confidence, bounding box data, center point confidence, etc.
[0052] S140: Display the target detection result on the image to be detected.
[0053] In this embodiment, after obtaining multiple target detection results according to the inference results at different scales, the detected results can be bounding box drawn and visualized, and the target detection results can be displayed on the image to be detected according to the mapping relationship between the scales of the image to be detected and the image after inference. Use OpenCV (Open Source Computer Vision Library) to draw the screened prediction box on the original image and output the image. Exemplarily, the screened target detection results can be obtained from the container storing the target detection results, and the prediction box can be drawn on the image according to the target detection results, and the color image of the model inference can be read, and then the color of the prediction box can be set according to the number of detected categories, and then the first 20 boxes in the target detection results are traversed, and the width, height, category, score and other information of the box are calculated, and a rectangular box and annotated text are drawn on the image, and finally the annotated image is saved locally.
[0054] A target detection method based on an automotive-grade edge computing chip is provided in a first embodiment of the present invention. The method includes: processing the image to be detected in a format corresponding to the target detection model and inputting it into the target detection model; running the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain the inference results corresponding to the image to be detected at different scales; the inference results include the tensor data of the pixel points included in the image to be detected at different scales; post-processing the inference results to obtain the target detection results corresponding to the image to be detected; and displaying the target detection results on the image to be detected. This method can improve the efficiency and performance of target detection by running the target detection model through at least one artificial intelligence processor in the automotive-grade edge computing chip, and solves the problems of limited computing resources and low real-time performance in the prior art.
[0055] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.
[0056] In one embodiment, the post-processing of the inference results to obtain the target detection results corresponding to the image to be detected includes: for each inference result, traversing the detection results of all pixels in the image to be detected, filtering out the pixels whose detection results are not satisfied with preset conditions among all pixels based on the activation function, and using the detection results corresponding to the filtered pixels as the target detection results of the image to be detected at the scale corresponding to the inference result.
[0057] Among them, the activation function is an important component of the neural network, which is usually applied to each layer of the neural network to introduce nonlinear transformation to increase the expression ability of the neural network. The activation function in this implementation can be a Sigmoid activation function. The preset condition can be that the confidence of the pixel point meets certain requirements.
[0058] In this embodiment, for each inference result, the detection results of all pixels in the image to be detected corresponding to the inference result can be traversed, and the pixels that do not meet the preset conditions can be filtered out through an activation function, and the detection results corresponding to the filtered pixels are used as the target detection results of the image to be detected at the scale corresponding to the inference result.
[0059] In one embodiment, the activation function-based filtering of all pixel points whose detection results are not satisfied with preset conditions includes: obtaining the classification confidence and center point confidence of the pixel point from the detection result; based on the activation function, determining the confidence corresponding to the pixel point according to the classification confidence and the center point confidence; and filtering out the pixel points whose confidence is lower than the confidence threshold as pixel points not satisfied with the preset conditions.
[0060] The classification confidence can be the degree of confidence that a model is sure that a certain input sample is correctly classified. The center point confidence indicates the degree of confidence that the pixel point may be the center point of the target. The size of the confidence threshold can be set according to the actual situation.
[0061] In this embodiment, the classification confidence and center point confidence of each pixel in the detection result can be obtained, and the values of the classification confidence and center point confidence can be compressed to the range of 0-1 through the activation function, and then the standardized classification confidence and center point confidence can be filtered according to the confidence threshold.
[0062] In one embodiment, the confidence corresponding to the pixel point is determined based on the activation function according to the classification confidence and the center point confidence, including: standardizing the classification confidence and the center point confidence respectively based on the activation function; and taking the square root of the product of the standardized classification confidence and the center point confidence as the confidence corresponding to the pixel point.
[0063] In this embodiment, after the classification confidence and the center point confidence are standardized, the square root of the product of the standardized classification confidence and the center point confidence can be used as the confidence corresponding to the pixel point. Alternatively, different weights can be set for the classification confidence and the center point confidence, and the confidence corresponding to the pixel point can be calculated according to different weights, which is not limited in this embodiment.
[0064] In one embodiment, displaying the target detection result on the image to be detected includes: determining a scaling ratio between different scales and the image to be detected; based on the scaling ratio and bounding box data in the target detection result, determining a corresponding position where the target detection result is displayed in the image to be detected, and generating a prediction box corresponding to the target detection result at the corresponding position.
[0065] The predicted frame may be a frame displayed by the predicted target object in the image to be detected.
[0066] In this embodiment, the scaling ratio of the image to be detected and images at different scales can be determined. According to the scaling ratio and the bounding box data in the target detection result, the size of the target detection result is mapped to the size of the original image to be detected, so that the target detection result is displayed on the image to be detected, and a prediction box corresponding to the target detection result is generated at the corresponding position.
[0067] Furthermore, after mapping the target detection results obtained at each scale to the original image size, it is necessary to calculate the area of the prediction box, and then delete the redundant prediction boxes through the non-maximum suppression algorithm (NMS). The redundant prediction boxes can be the prediction boxes with too high overlap.
[0068] In one embodiment, determining the corresponding position of the target detection result displayed in the image to be detected based on the scaling ratio and the bounding box data in the target detection result includes: for target detection results at different scales, obtaining prediction box coordinates corresponding to the target detection result according to the bounding box data in the target detection result; based on the scaling ratios corresponding to the different scales, converting the prediction box coordinates into coordinates in the image to be detected; and determining the corresponding position of the target detection result displayed in the image to be detected according to the converted prediction box coordinates.
[0069] The predicted box coordinates may be the coordinates of the bounding box.
[0070] In this embodiment, for target detection results at different scales, coordinate data in the bounding box data of the target detection result can be obtained, the coordinates are used as prediction box coordinates, and the prediction box coordinates are converted into coordinates in the image to be detected according to the scaling ratio, so that the target detection result can be displayed on the image to be detected.
[0071] This embodiment implements reasoning by applying an FCOS algorithm to the J3 chip and visualizes the reasoning results, which can fully utilize powerful computing power and efficient energy management to achieve real-time target detection and positioning in a smart car environment.
[0072] Embodiment 2
[0073] Figure 3 A schematic diagram of the structure of a target detection device based on an automotive-grade edge computing chip provided in Embodiment 2 of the present invention, wherein the device can be applicable to the case of detecting targets in an image, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device.
[0074] like Figure 3 As shown, the device comprises:
[0075] An input module 210 is used to process the image to be detected according to the format corresponding to the target detection model and then input it into the target detection model;
[0076] An operation module 220 is used to operate the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain the corresponding reasoning results of the image to be detected at different scales; the reasoning results include tensor data of pixel points included in the image to be detected at different scales;
[0077] The processing module 230 is used to post-process the inference result to obtain the target detection result corresponding to the image to be detected;
[0078] The display module 240 is used to display the target detection result on the image to be detected.
[0079] This embodiment provides a target detection device based on an automotive-grade edge computing chip, the device comprising: an input module, used to process the image to be detected in a format corresponding to the target detection model and then input it into the target detection model; an operation module, used to operate the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain the corresponding reasoning results of the image to be detected at different scales; the reasoning results include the tensor data of the pixel points included in the image to be detected at different scales; a processing module, used to post-process the reasoning results to obtain the target detection results corresponding to the image to be detected; a display module, used to display the target detection results on the image to be detected. By running the target detection model by at least one artificial intelligence processor in the automotive-grade edge computing chip, the efficiency and performance of target detection can be improved, solving the problems of limited computing resources and low real-time performance in the prior art.
[0080] Furthermore, the processing module 230 includes:
[0081] For each inference result, the detection results of all pixels in the image to be detected are traversed, and the pixels whose detection results are not satisfied with the preset conditions are filtered out based on the activation function, and the detection results corresponding to the filtered pixels are used as the target detection results of the image to be detected at the scale corresponding to the inference result.
[0082] Furthermore, filtering the pixels whose detection results are not satisfactory to the preset conditions among all the pixels based on the activation function includes:
[0083] Obtaining the classification confidence of the pixel point and the center point confidence from the detection result;
[0084] Based on the activation function, determining the confidence corresponding to the pixel point according to the classification confidence and the center point confidence;
[0085] The pixel points whose confidence level is lower than the confidence level threshold are regarded as pixel points that do not meet the preset conditions and are filtered.
[0086] Further, the activation function is based on the classification confidence and the center point confidence to determine the confidence corresponding to the pixel point, including:
[0087] The classification confidence and the center point confidence are respectively normalized based on an activation function;
[0088] The square root of the product of the standardized classification confidence and the center point confidence is taken as the confidence corresponding to the pixel point.
[0089] Furthermore, the input module 210 is also used for:
[0090] Get the handle of the object detection model;
[0091] Obtaining input and output information of the target detection model based on the handle through an interface of an automotive-grade edge computing chip;
[0092] Memory space is pre-applied for the target detection model on the automotive-grade edge computing chip based on the input and output information.
[0093] Furthermore, the display module 240 includes:
[0094] Determining the scaling ratio between different scales and the image to be detected;
[0095] Based on the scaling ratio and the bounding box data in the target detection result, a corresponding position where the target detection result is displayed in the image to be detected is determined, and a prediction box corresponding to the target detection result is generated at the corresponding position.
[0096] Further, the determining, based on the scaling ratio and the bounding box data in the target detection result, a corresponding position of the target detection result displayed in the image to be detected includes:
[0097] For target detection results at different scales, obtaining prediction box coordinates corresponding to the target detection results according to bounding box data in the target detection results;
[0098] Based on the scaling ratios corresponding to different scales, the predicted frame coordinates are converted into coordinates in the image to be detected;
[0099] The corresponding position where the target detection result is displayed in the image to be detected is determined according to the converted prediction frame coordinates.
[0100] The above-mentioned target detection device based on automotive-grade edge computing chip can execute the target detection method based on automotive-grade edge computing chip provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0101] Embodiment 3
[0102] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0103] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0104] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0105] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a target detection method based on an automotive-grade edge computing chip.
[0106] In some embodiments, the target detection method based on the automotive-grade edge computing chip can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the target detection method based on the automotive-grade edge computing chip described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the target detection method based on the automotive-grade edge computing chip by any other appropriate means (for example, by means of firmware).
[0107] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0108] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0109] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0110] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0111] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0112] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0113] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0114] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A target detection method based on automotive-grade edge computing chips. It is characterized in that The method comprises: Processing the image to be detected according to the format corresponding to the target detection model and inputting it into the target detection model; Running the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain inference results corresponding to the image to be detected at different scales; the inference results include tensor data of pixel points included in the image to be detected at different scales; Post-processing the inference result to obtain a target detection result corresponding to the image to be detected; The target detection result is displayed on the image to be detected.
2. The method according to claim 1, It is characterized in that The post-processing of the inference result to obtain the target detection result corresponding to the image to be detected includes: For each inference result, the detection results of all pixels in the image to be detected are traversed, and the pixels whose detection results are not satisfied with the preset conditions are filtered out based on the activation function, and the detection results corresponding to the filtered pixels are used as the target detection results of the image to be detected at the scale corresponding to the inference result.
3. The method according to claim 2, It is characterized in that The filtering of all pixels whose detection results are not satisfactory to a preset condition based on the activation function includes: Obtaining the classification confidence of the pixel point and the center point confidence from the detection result; Based on the activation function, determining the confidence corresponding to the pixel point according to the classification confidence and the center point confidence; The pixel points whose confidence level is lower than the confidence level threshold are regarded as pixel points that do not meet the preset conditions and are filtered.
4. The method according to claim 3, It is characterized in that The step of determining the confidence corresponding to the pixel point based on the activation function and the classification confidence and the center point confidence includes: The classification confidence and the center point confidence are respectively normalized based on an activation function; The square root of the product of the standardized classification confidence and the center point confidence is taken as the confidence corresponding to the pixel point.
5. The method according to claim 1, It is characterized in that Before the image to be detected is processed according to the format corresponding to the target detection model and input into the target detection model, the method further includes: Get the handle of the object detection model; Obtaining input and output information of the target detection model based on the handle through an interface of an automotive-grade edge computing chip; Memory space is pre-applied for the target detection model on the automotive-grade edge computing chip based on the input and output information.
6. The method according to claim 1, It is characterized in that The displaying of the target detection result on the image to be detected comprises: Determining the scaling ratio between different scales and the image to be detected; Based on the scaling ratio and the bounding box data in the target detection result, a corresponding position where the target detection result is displayed in the image to be detected is determined, and a prediction box corresponding to the target detection result is generated at the corresponding position.
7. The method according to claim 6, It is characterized in that The determining, based on the scaling ratio and the bounding box data in the target detection result, a corresponding position where the target detection result is displayed in the image to be detected includes: For target detection results at different scales, obtaining prediction box coordinates corresponding to the target detection results according to bounding box data in the target detection results; Based on the scaling ratios corresponding to different scales, the predicted frame coordinates are converted into coordinates in the image to be detected; The corresponding position where the target detection result is displayed in the image to be detected is determined according to the converted prediction frame coordinates.
8. A target detection device based on an automotive-grade edge computing chip, It is characterized in that The device comprises: An input module, used to process the image to be detected according to the format corresponding to the target detection model and then input it into the target detection model; An operation module is used to operate the target detection model based on at least one artificial intelligence processor in the automotive-grade edge computing chip to obtain the corresponding reasoning results of the image to be detected at different scales; the reasoning results include tensor data of pixel points included in the image to be detected at different scales; A processing module, used for post-processing the inference result to obtain a target detection result corresponding to the image to be detected; A display module is used to display the target detection result on the image to be detected.
9. An electronic device, It is characterized in that The device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the target detection method based on the automotive-grade edge computing chip described in any one of claims 1-7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the target detection method based on an automotive-grade edge computing chip according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Multi-target detection method and device and storage medium
CN113378704A
Unmanned vehicle carried camera target detection method based on improved FCOS algorithm
CN115761667A
Target detection method and device for target object in image and storage medium
CN116778469A
Target detection method, device and equipment, vehicle and medium
CN116958781A
Target detection method, electronic device and medium
US20220114759A1
