Method for acquiring feature information of region of interest, and related device
By acquiring the location information and feature values of the ROI and employing matrix multiplication and pipelined parallel processing, the problem of inconsistent ROI feature information was solved, achieving consistency in the size of ROI feature information and improving efficiency.
Patent Information
- Application Number
- PCT/CN2025/073231
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-06
- Filing Date
- 2025-01-20
- Publication Date
- 2025-11-13
AI Technical Summary
In object detection tasks, the inconsistent sizes of different objects lead to inconsistent ROI sizes for different objects in the feature map, making it impossible to guarantee that the ROI feature information of different objects is consistent in size, which affects the accuracy of category prediction.
By obtaining the location information of the ROI, the set of sampling points is determined, and the feature values of the sampling points are obtained from the image. Matrix multiplication and pipelined parallel processing are used to obtain the feature information of the ROI, ensuring that the feature information size of different ROIs is consistent.
This achieves consistent feature information size across different ROIs, reducing computational resource consumption and improving the efficiency and accuracy of ROI feature information acquisition.
Smart Images

Figure CN2025073231_13112025_PF_FP_ABST
Abstract
Description
A method and related equipment for acquiring feature information of a region of interest
[0001] This application claims priority to Chinese Patent Application No. 202410552453.9, filed on May 6, 2024, entitled "A Method and Related Equipment for Obtaining Feature Information of a Region of Interest", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, and in particular to a method and related equipment for acquiring feature information of a region of interest. Background Technology
[0003] In object detection tasks, it is necessary to detect the location region of at least one object from the input image and then classify these objects. Specifically, after feature extraction of the input image, a feature map of the input image can be obtained. The location region of each object in the aforementioned feature map can be determined. The location region of each object can be called a region of interest (ROI). Classification is performed based on the feature information of the ROI corresponding to each object, so as to obtain the predicted category of each object.
[0004] However, since the sizes of different objects among the above-mentioned objects are different, the sizes of the ROIs corresponding to different objects in the feature map will also be different. However, since it is necessary to ensure that the size of the feature information of the ROIs corresponding to different objects is the same when making category predictions for different objects, a method for obtaining the feature information of ROIs is urgently needed. Summary of the Invention
[0005] This application provides a method and related equipment for acquiring feature information of regions of interest (ROIs), which can achieve the goal of consistent feature information size for different ROIs.
[0006] This application provides the following technical solution:
[0007] In one aspect, this application provides a method for obtaining feature information of a region of interest (ROI), which can apply artificial intelligence technology to the field of image processing. In this method, the execution device acquires a first image, which includes a first value of each point among multiple points; if the first image is an original image, then "the first image includes the first value of each point among multiple points" can be understood as the first image including the pixel value of each pixel among M pixels; or, if the first image is a feature map obtained after feature extraction from the original image, then "the first image includes the first value of each point among multiple points" can be understood as the first image including the feature value of each feature point among M feature points.
[0008] The first image may include at least one Region of Interest (ROI). For the process of acquiring feature information of any one of the at least one ROI (referred to as "first ROI" for convenience), the execution device may acquire location information corresponding to the first ROI (referred to as "first location information" for convenience). The first location information indicates the location of the first ROI in the first image. The feature information of the first ROI includes the first value of each of the N sampling point sets located within the location region of the first ROI. N is a preset value and is an integer greater than or equal to 1. Each of the N sampling point sets includes at least one sampling point.
[0009] In order to obtain the first feature value of any one of the N sampling point sets (referred to as the "first sampling point set" for convenience), the execution device can use the first position information to determine a first point corresponding to the first sampling point from the multiple points included in the first image, and then obtain the first value of the first point from the first image. The first value of the first point is used as the second feature value of the first sampling point.
[0010] Wherein, the first sampling point is any sampling point in the first sampling point set, the first point is one of the multiple points included in the first image, and the first point is located within the location region of the first ROI; the second feature value of each sampling point in the first sampling point set is used to obtain the first feature value of the first sampling point set; the first feature value of each sampling point set in the N sampling point sets is used to obtain the feature information of the first ROI, that is, the feature information of the first ROI includes the first feature value of each sampling point set in the N sampling point sets.
[0011] The feature information of any ROI obtained by this implementation method includes the first feature value of each of the N sampling point sets, where N is a preset value, thereby achieving the goal of consistent feature information size for different ROIs. Furthermore, in this implementation method, for any ROI (i.e., the first ROI), the feature information of the first ROI includes the first feature value of each of the N sampling point sets. Each of the N sampling point sets includes at least one sampling point. The first feature value of each of the N sampling point sets is obtained based on the second feature value of the sampling point in each sampling point set. In order to obtain the second feature value of any sampling point (i.e., the first sampling point), a first point corresponding to the first sampling point is first obtained in the first image. Then, the first value of the first point included in the first image is directly used as the second feature value of the first sampling point. That is, after obtaining the first value of the first point, no additional calculation is required to obtain the second feature value of the first sampling point, which helps to reduce the computer resources consumed in the entire process of generating the feature information of the ROI.
[0012] In one possible implementation, where the first image is specifically represented as a feature map, the execution device acquiring the first image may include: the execution device acquiring C feature maps corresponding one-to-one with C channels, the C feature maps including C first values for each point, where C is an integer greater than or equal to 1, each of the N sample point sets including S sample points, where S is an integer greater than or equal to 1, and the S first sample points included in the first sample point set corresponding one-to-one with the S first points in the first image.
[0013] The execution device obtains a first value of a first point from a first image, including: obtaining C first values of each of the S first points from C feature maps, wherein the aforementioned C first values correspond one-to-one with the C channels, and wherein the C first values of each of the S first points are used as C second feature values of each of the S first sampling points.
[0014] Correspondingly, the first feature value of the first sampling point set includes C first feature values that correspond one-to-one with C channels, and the feature information of the first ROI includes C first feature values of each sampling point set in the N sampling point sets.
[0015] For example, the execution device can obtain a second feature value corresponding to the first channel from C second feature values of each first sampling point. The first channel is any one of the C channels. Since the set of first sampling points includes S first sampling points, a total of S second feature values corresponding to the first channel are obtained. Then, the S second feature values corresponding to the first channel are fused to obtain a first feature value of the set of first sampling points (the feature value corresponds to the first channel). For example, the fusion operation in this application can be averaging, taking the median value, taking the maximum value, taking the minimum value, or other fusion operations, etc.
[0016] If the execution device performs the above operation for each of the C channels, then the C first feature values of the first sampling point set can be obtained, and the C first feature values of the first sampling point set correspond one-to-one with the C channels.
[0017] In this implementation, the specific implementation of acquiring the first image including C feature maps is clearly defined, which improves the feasibility of this solution.
[0018] In one possible implementation, when the fusion operation is averaging, the execution device can generate C first feature values for the set of first sampling points using matrix multiplication based on the C second feature values of each of the S first sampling points. These C first feature values correspond one-to-one with the C channels. The feature information of the first ROI includes the C first feature values of each of the N sampling point sets. In this implementation, when the acquired first image includes C feature maps, since each sampling point corresponds to C second feature values, matrix multiplication can calculate the C first feature values of the first sampling point set in one operation. This improves the efficiency of obtaining the first feature values of each sampling point set, thereby improving the efficiency of obtaining the feature information of the ROI.
[0019] In one possible implementation, when N is an integer greater than or equal to 2, the task of "obtaining the first feature value of each set of N sampling points" can be broken down into three subtasks: "determining a point corresponding to each sampling point," "obtaining the second feature value of the sampling point," and "generating the first feature value." These three subtasks are executed in a pipelined parallel manner. That is, the three subtasks are executed by three different execution entities in the execution device. Each entity can independently execute its subtask, and there is a sequential dependency between the three subtasks corresponding to the same set within the N sampling point sets.
[0020] In this implementation, the large task of obtaining the first feature value of the entire set of sampling points is broken down into three sub-tasks: "determining a point corresponding to each sampling point", "obtaining the second feature value of the sampling point", and "generating the first feature value". The aforementioned three sub-tasks are then executed in a pipelined parallel manner, which helps to further accelerate the efficiency of obtaining the first feature value of each set of sampling points, thereby further improving the efficiency of obtaining the feature information of the ROI.
[0021] In one possible implementation, the determination of the first point is performed by a scalar computation unit, the acquisition of the first value is performed by a hardware unit or software module (the function of which is to read data), and the generation of the first eigenvalue is performed by a matrix computation unit. In this implementation, since a processor core typically contains one scalar computation unit and one matrix computation unit, the aforementioned method of allocating the execution entities not only enables pipelined parallelism among the three subtasks—"determining a point corresponding to each sampling point," "acquiring the second eigenvalue of the sampling point," and "generating the first eigenvalue"—but also avoids modifications to the processor core, thus minimizing additional cost and improving the executability of this solution.
[0022] In one possible implementation, the execution device determines a first point corresponding to the first sampling point, including: the execution device determines the first point corresponding to the first sampling point by using a nearest neighbor interpolation algorithm. This implementation provides a specific way to determine a first point corresponding to the first sampling point, improving the feasibility of this solution. Furthermore, using the first value of the point closest to the first sampling point as the second feature value of the first sampling point is beneficial for restoring the true state of the ROI.
[0023] In one possible implementation, at least one ROI further includes a second ROI, and the feature acquisition operations of the first ROI and the second ROI are executed in parallel. In this implementation, when the first image includes at least two ROIs, since the feature acquisition operations of different ROIs are independent of each other, the feature acquisition operations of different ROIs can be executed in parallel. This approach helps to further improve the efficiency of the overall process of acquiring feature information for all ROIs.
[0024] Secondly, this application provides a device for acquiring feature information of a Region of Interest (ROI), which can apply artificial intelligence technology to the field of image processing. The device for acquiring ROI feature information includes: an acquisition module for acquiring a first image, wherein the first image is an original image, or a feature map obtained after feature extraction from the original image, and the first image includes a first value for each of a plurality of points; the acquisition module is further configured to acquire location information, the location information indicating the location of a first ROI in the first image, the first image including at least one ROI, and the first ROI being any one of at least one ROI, wherein the feature information of the first ROI includes a first feature value for each of N sampling point sets, where N is a preset value and is an integer greater than or equal to 1, and each of the N sampling point sets includes at least A sampling point is defined as follows: a first sampling point is any one of N sampling point sets; a determination module is used to determine a first point corresponding to the first sampling point based on the location information, wherein the first point is one of multiple points and is located within the location region of the first ROI; an acquisition module is also used to acquire the first value of the first point from the first image, wherein the first value of the first point is used as the second feature value of the first sampling point, the second feature value of each sampling point in the first sampling point set is used to obtain the first feature value of the first sampling point set, and the first feature value of each sampling point set in the N sampling point sets is used to obtain the feature information of the first ROI.
[0025] In one possible implementation, the acquisition module is specifically used to acquire C feature maps corresponding one-to-one with C channels. The C feature maps include C first values for each point, where C is an integer greater than or equal to 1. Each set of N sampling points includes S sampling points, where S is an integer greater than or equal to 1. The S first sampling points in the first set of sampling points correspond one-to-one with the S first points in the first image. The acquisition module is specifically used to acquire C first values for each of the S first points from the C feature maps. The C first values for each of the S first points are used as C second feature values for each of the S first sampling points. The first feature values of the first set of sampling points include C first feature values corresponding one-to-one with C channels. The feature information of the first ROI includes C first feature values for each set of N sampling points.
[0026] In one possible implementation, the device for acquiring the feature information of the ROI further includes: a generation module, used to generate C first feature values of the set of first sampling points by matrix multiplication based on C second feature values of each of the S first sampling points.
[0027] In one possible implementation, when N is an integer greater than or equal to 2, the operations for determining a point corresponding to each sampling point, obtaining the second feature value of the sampling point, and generating the first feature value are executed in a pipelined parallel manner.
[0028] In one possible implementation, the operation of determining the first point is performed by the scalar computation unit, the operation of obtaining the first value is performed by the hardware unit or the software module, and the operation of generating the first eigenvalue is performed by the matrix computation unit.
[0029] In one possible implementation, the determining module is specifically used to determine a first point corresponding to the first sampling point based on the nearest neighbor interpolation algorithm.
[0030] In one possible implementation, at least one ROI also includes a second ROI, and the acquisition of feature information of the first ROI and the acquisition of feature information of the second ROI are performed in parallel.
[0031] In the second aspect of this application, the meanings of the terms in the second aspect and the various possible implementations of the second aspect, as well as the beneficial effects of each possible implementation, can be referred to the descriptions of the various possible implementations in the first aspect, and will not be repeated here.
[0032] Thirdly, embodiments of this application provide an apparatus including a processor and a memory, the processor being coupled to the memory, the memory being used to store a program; and the processor being used to execute the program in the memory, causing the apparatus to perform the method described in the first aspect above.
[0033] Fourthly, embodiments of this application provide a vehicle including a processor and a memory, the processor being coupled to the memory, the memory being used to store a program; the processor being used to execute the program in the memory, causing the vehicle to perform the method described in the first aspect above.
[0034] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method described in the first aspect above.
[0035] In a sixth aspect, embodiments of this application provide a computer program product, which includes a program that, when run on a computer, causes the computer to perform the method described in the first aspect above.
[0036] Seventhly, this application provides a chip system including a processor for supporting the implementation of the functions involved in the foregoing aspects, such as transmitting or processing data and / or information involved in the foregoing methods. In one possible design, the chip system further includes a memory for storing program instructions and data necessary for the terminal device or communication device. This chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description
[0037] Figure 1 is a schematic diagram of a structural framework for an artificial intelligence main body provided in an embodiment of this application;
[0038] Figure 2 is an architecture diagram of the image processing system provided in this application;
[0039] Figure 3 is a flowchart illustrating a method for obtaining ROI feature information according to an embodiment of this application.
[0040] Figure 4 is a schematic diagram of the first sampling point and the first point provided in the embodiment of this application;
[0041] Figure 5 is a schematic diagram of a pipelined parallel execution of subtasks provided in an embodiment of this application;
[0042] Figure 6 is a schematic diagram of generating C first feature values of a sampling point set using matrix multiplication according to an embodiment of this application;
[0043] Figure 7 is a schematic diagram of a device for acquiring feature information of a region of interest (ROI) according to an embodiment of this application.
[0044] Figure 8 is a schematic diagram of an execution device provided in an embodiment of this application;
[0045] Figure 9 is a structural schematic diagram of a vehicle provided in an embodiment of this application. Detailed Implementation
[0046] The embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are merely some, and not all, of the embodiments of this application. Those skilled in the art will recognize that, with the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0047] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the description of embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0048] In the embodiments of this application, "instruction" can include direct and indirect instructions, as well as explicit and implicit instructions. The information indicated by a certain piece of information (hereinafter referred to as instruction information) is called the information to be instructed. In specific implementation, there are many ways to indicate the information to be instructed, such as, but not limited to, directly indicating the information to be instructed, such as the information to be instructed itself or its index. It can also indirectly indicate the information to be instructed by indicating other information, where there is an association between the other information and the information to be instructed; or it can indicate only a part of the information to be instructed, while the other parts are known or pre-agreed upon. For example, the instruction can be implemented by using a pre-agreed (e.g., protocol predefined) arrangement of various information, thereby reducing the instruction overhead to a certain extent. This application does not limit the specific method of instruction. It is understood that for the sender of the instruction information, the instruction information can be used to indicate the information to be instructed; for the receiver of the instruction information, the instruction information can be used to determine the information to be instructed.
[0049] First, the overall workflow of the artificial intelligence system is described, as shown in Figure 1. Figure 1 is a structural diagram of an artificial intelligence framework provided in an embodiment of this application. The framework is then elaborated from two dimensions: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it could be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. In this process, data undergoes a condensation process of "data—information—knowledge—wisdom." The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence and information (provided and processed by technology) to the industrial ecosystem of the system.
[0050] (1) Infrastructure
[0051] The infrastructure provides computing power to support artificial intelligence systems, enabling communication with the external world and providing support through a basic platform. Communication with the outside world is achieved through sensors; computing power is provided by intelligent chips, which can specifically employ hardware acceleration chips such as central processing units (CPUs), embedded neural network processing units (NPUs), graphics processing units (GPUs), application-specific integrated circuits (ASICs), or field-programmable gate arrays (FPGAs). The basic platform includes distributed computing frameworks and related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then provided to intelligent chips in the distributed computing system provided by the basic platform for computation.
[0052] (2) Data
[0053] The data at the next layer of infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data from traditional devices, including business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0054] (3) Data processing
[0055] Data processing typically includes methods such as data training, machine learning, deep learning, search, reasoning, and decision-making.
[0056] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training of data by symbolizing and formalizing it.
[0057] Reasoning refers to the process in which, in a computer or intelligent system, the machine thinks and solves problems by simulating human intelligent reasoning, based on reasoning control strategies and using formalized information. Typical functions include search and matching.
[0058] Decision-making refers to the process of making decisions based on intelligent information after reasoning, and it typically provides functions such as classification, sorting, and prediction.
[0059] (4) General ability
[0060] After the data processing mentioned above, the results of the data processing can be used to form some general capabilities, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0061] (5) Smart Products and Industry Applications
[0062] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields. They encapsulate overall artificial intelligence solutions, productize intelligent information decision-making, and realize practical applications. Their application areas mainly include: intelligent terminals, intelligent manufacturing, intelligent transportation, smart homes, intelligent healthcare, intelligent security, intelligent driving, and smart cities.
[0063] The method provided in this application can be applied to various application fields of artificial intelligence technology. Optionally, it can be applied to various scenarios that require target detection. Since the method provided in this application can be used in fields such as intelligent driving, intelligent terminals, and smart homes, the following are examples of application scenarios in multiple application fields of this application.
[0064] Application Area 1: Intelligent Driving
[0065] For example, a vehicle can collect images of its surrounding environment and perform object detection on the collected images to identify which objects exist in the environment around the vehicle. The aforementioned vehicle can be a car, truck, motorcycle, bus, ship, airplane, helicopter, recreational vehicle, amusement park vehicle, construction equipment, tram, golf cart, or train, etc. This application embodiment does not make any special limitation.
[0066] Application Area 2: Smart Terminal Field
[0067] For example, mobile robots (such as robot vacuum cleaners, food delivery robots, etc.) need to collect images of the surrounding environment during their movement, perform object detection tasks on the collected images to identify which objects exist in the surrounding environment, and then plan their own path.
[0068] Application Area 3: Smart Security
[0069] For example, after acquiring images of the environment through monitoring, a target detection task can be performed on the acquired images to identify people or objects in the environment. It should be noted that the above examples of application scenarios of this application are only for the convenience of understanding this solution and do not exhaustively list all application scenarios of this application.
[0070] In the aforementioned application scenarios, the process of object detection requires detecting the location regions of at least one object from the input image and then classifying these objects. Specific implementation methods in related technologies include: after acquiring the input image, performing feature extraction to obtain a feature map of the input image, determining the location region of each object in the aforementioned feature map (each object's location region can also be called a Region of Interest, ROI), and then classifying the objects based on the feature information corresponding to each object's ROI, thereby obtaining the predicted category of each object in the input image. Since different objects have different sizes, the sizes of the ROIs corresponding to different objects in the feature map will also be different. However, when predicting the category of different objects, it is necessary to ensure that the feature information of the ROIs corresponding to different objects has the same size. Therefore, a method for obtaining the feature information of ROIs is urgently needed.
[0071] To achieve the above objectives, this application discloses that: the execution device can acquire a first image, the first image including a first value of each of a plurality of points. For example, the first image is an original image, or the first image is a feature map obtained after feature extraction of the original image; wherein, the first image may include at least one ROI corresponding one-to-one with at least one object. Using the method provided in this application, the feature information of each ROI in at least one ROI can be obtained based on the first image, including: the first feature value of each set of N sampling points in the location area of the ROI, where N is a preset value and N is an integer greater than or equal to 1, thereby achieving the goal of consistent size of feature information of different ROIs.
[0072] For example, for ease of description, any one of the aforementioned at least one ROI is referred to as the first ROI. The feature information of the first ROI may include the first feature value of each of the N sampling point sets, and each of the N sampling point sets includes at least one sampling point. Regarding the method of obtaining the first feature value of any one of the N sampling point sets (hereinafter referred to as the "first sampling point set" for ease of description), the execution device can determine a first point corresponding to the first sampling point from the aforementioned multiple points based on the location information corresponding to the first ROI. The aforementioned first point is located within the location area of the first ROI. The execution device can obtain the first value of the first point from the first image. The first value of the aforementioned first point is used as the second feature value of the first sampling point. The second feature value of each sampling point in the first sampling point set is used to obtain the first feature value of the first sampling point set. The execution device can repeat the aforementioned operation N times to obtain the first feature value of each of the N sampling point sets, thereby obtaining the feature information of the first ROI. The execution device can generate the feature information of each ROI in at least one ROI using the aforementioned method. Since the second feature value of the first sampling point can be obtained without additional calculation after obtaining the first value of the first point, it is beneficial to reduce the computer resources consumed in the entire process of generating the feature information of the ROI.
[0073] For example, since the method provided in this application can be used in the process of object detection in images using machine learning models, before describing in detail the specific implementation process of the method for obtaining feature information of the region of interest (ROI) provided in this application, please refer to Figure 2. Figure 2 is an architecture diagram of the image processing system provided in this application. As shown in Figure 2, the image processing system 200 includes a training device 210, a database 220, an execution device 230, and a data storage system 240. The execution device 230 includes a computing module 231.
[0074] The database 220 stores a training dataset. During the training phase of the machine learning model 201, the training device 210 generates the machine learning model 201. The machine learning model 201 can be a machine learning model for object detection in images. The method provided in this application can be applied to the process of object detection in images using the machine learning model 201. The execution device iteratively trains the machine learning model 201 using the training dataset to obtain a machine learning model 201 that has undergone training operations. The "machine learning model 201 that has undergone training operations" can also be called the "trained machine learning model 201". The machine learning model 201 can be specifically represented as a neural network or as a non-neural network model.
[0075] The machine learning model 201 trained by the training device 210 can be deployed to the computing module 231 of the execution device 230. The execution device 230 can access data, code, etc., in the data storage system 240, and can also store data, instructions, etc., in the data storage system 240. The data storage system 240 can be located within the execution device 230, or it can be an external storage device relative to the execution device 230. During the application phase of the machine learning model 201, the execution device 230 can perform object detection on images using the trained machine learning model 201. The method provided in this application can be used during the object detection process using the trained machine learning model 201.
[0076] In some embodiments of this application, referring to FIG2, the execution device 230 and the client device can be integrated into the same device, so the user can directly interact with the execution device 230. For example, when the client device is a vehicle, the execution device 230 can be a module in the vehicle's host CPU that uses machine learning models to process data. The execution device 230 can also be a graphics processing unit (GPU) or neural network processor (NPU) in the vehicle. The GPU or NPU is mounted on the host processor as a coprocessor, and the host processor allocates tasks.
[0077] It is worth noting that Figure 2 is merely a schematic diagram of one architecture of the drawing system provided in an embodiment of the present invention, and the positional relationships between the devices, components, modules, etc. shown in the figure do not constitute any limitation. For example, in some other embodiments of this application, the execution device 230 and the client device can be separate and independent devices, and the execution device 230 is configured with an input / output (I / O) interface to interact with the client device.
[0078] Specifically, please refer to Figure 3. Figure 3 is a flowchart illustrating a method for obtaining ROI feature information provided in an embodiment of this application. The method for obtaining ROI feature information provided in an embodiment of this application may include:
[0079] 301. Obtain the first image, which is the original image, or the first image is a feature map obtained after feature extraction from the original image, and the first image includes the first value of each of the multiple points.
[0080] In this embodiment of the application, the execution device can acquire at least one first image. For example, the first image can be represented as a matrix, which stores the first value of each of M points, where M is an integer greater than or equal to 1.
[0081] Furthermore, in one scenario, the first image can be the original image. That is, to ensure that the feature information of ROIs corresponding to different objects has the same size, the execution device can unify the size of the feature information of the ROIs corresponding to different objects after acquiring the original image. In this case, "the first image includes the first value of each point among multiple points" can be understood as the first image including the pixel value of each of the M pixel points. In another scenario, the first image can be a feature map obtained after feature extraction from the original image. That is, the execution device can also first extract features from the original image to obtain a feature map, and then, based on the obtained feature map, use the method provided in this application to unify the size of the feature information of the ROIs corresponding to different objects. In this case, "the first image includes the first value of each point among multiple points" can be understood as the first image including the feature value of each of the M feature points.
[0082] For example, the feature extraction operation described above can be implemented using convolutional neural network layers, fully connected neural network layers, residual neural network layers, or other types of neural network layers.
[0083] Optionally, when the first image is represented as a feature map, step 301 may include: the execution device acquiring C feature maps corresponding one-to-one with C channels, where C is an integer greater than or equal to 1. Each of the C feature maps may include a first value of each feature point among M points (also called "feature points"). Thus, the C feature maps may include C first values of each feature point among the M feature points. For example, the aforementioned C feature maps may include at least one of the following from the original image: texture features, color features, contour features, brightness features, or other types of features, which can be flexibly determined in conjunction with the actual application scenario.
[0084] 302. Obtain first location information, the first location information indicating the location of the first ROI in the first image, the first image including at least one ROI, the first ROI being any one of the at least one ROI, wherein the feature information of the first ROI includes the first feature value of each of the N sampling point sets, N being a preset value and N being an integer greater than or equal to 1, each of the N sampling point sets including at least one sampling point, the first sampling point set being any one of the N sampling point sets, and the first sampling point being any one of the sampling points in the first sampling point set.
[0085] In this embodiment of the application, the first image may include at least one ROI corresponding one-to-one with at least one object. The execution device may obtain the location information (hereinafter referred to as "first location information") corresponding to the first ROI (that is, any one of the at least one ROI). The first location information is used to indicate the location of the first ROI in the first image.
[0086] Optionally, each ROI in at least one ROI can be represented as a rectangle. In one case, the first position information corresponding to the first ROI can be represented as the coordinate information of the four vertices of the first ROI; in another case, the first position information corresponding to the first ROI can be represented as the coordinate information of a vertex located at the upper left corner of the first ROI, as well as the width and height of the first ROI. The aforementioned "upper left corner" can also be replaced by the upper right corner, lower left corner, or lower right corner, etc., and the specifics can be determined in combination with the actual application scenario.
[0087] Furthermore, the first image can be represented as an image of a first size, and the first position information corresponding to the first ROI is the position information of the first ROI in an image of a second size. In one case, the first size and the second size are different, so the execution device can also obtain a scaling factor between the first size and the second size. In step 302, the execution device can also determine the coordinate information of the first ROI in the first image and the width and height of the first ROI based on the first position information and the scaling factor. For example, if the ratio between the first size and the second size is 1:2, the first position information indicates that the coordinates of the top left corner vertex of the first ROI are (2,4), and the size of the first ROI is 6 in width and 3 in height, then the coordinates of the top left corner vertex of the first ROI in the first image are (1,2), and the size of the first ROI is 3 in width and 1.5 in height. It should be understood that the example here is only for the convenience of understanding this solution and is not intended to limit this solution.
[0088] In another scenario, if the first size and the second size are the same, then the first position information can be directly identified as the position information of the first ROI in the first image. For example, if the first size and the second size are the same, and the first position information indicates that the coordinates of the top left corner vertex of the first ROI are (2,4), and the size of the first ROI is 6 in width and 3 in height, then the coordinates of the top left corner vertex of the first ROI in the first image are (2,4), and the size of the first ROI is 6 in width and 3 in height. It should be understood that this example is only for the convenience of understanding this solution and is not intended to limit this solution.
[0089] For example, since the method provided in this application aims to achieve consistent size of feature information for different ROIs, in one case, the execution device can also obtain a preset size of the feature information for each ROI. The feature information of different ROIs uses the same preset size. For example, the aforementioned preset size can be a width of W1 and a height of H1, then the value of N is W1 multiplied by H1. In another case, the execution device can directly obtain a preset N. N is an integer greater than or equal to 1, and the specific value of N can be determined in conjunction with the actual application scenario.
[0090] The feature information of the first ROI includes the first feature value of each of the N sampling point sets. Each of the N sampling point sets includes S sampling points, where S is an integer greater than or equal to 1. All sampling points in the N sampling point sets can be located within the location region of the first ROI. The following will describe the process of obtaining the first feature value of any set of the N sampling point sets (hereinafter referred to as the "first sampling point set") through steps 303 to 305.
[0091] 303. Based on the first location information, determine a first point corresponding to the first sampling point. The first point is one of multiple points and is located within the location area of the first ROI.
[0092] In this embodiment of the application, after the execution device determines the location region of the first ROI in the first image based on the first location information, it can divide the location region of the first ROI into N sub-regions that correspond one-to-one with the N sampling point sets, determine to sample in each sub-region using the first sampling method, and also obtain a preset sampling rate. Then, based on the first sampling method and the preset sampling rate, it determines a first point corresponding to the first sampling point from the multiple points included in the first image. Both the first sampling point and the first point are located within the location region of the first ROI.
[0093] For example, the location area of the first ROI can be represented as a rectangle, and the execution device can divide the location area of the first ROI into N sub-regions of the same size in a uniform manner; or, the sizes of different sub-regions in the N sub-regions can also be different, which can be determined according to the actual application scenario.
[0094] For example, if all N sub-regions have the same size, and N is 9, and the width of the first ROI is W2 and its height is H2, then the location region of the first ROI can be divided into 9 rectangles of the same size, each rectangle having a width of W2. And high is It should be understood that the examples provided are for the purpose of facilitating the understanding of this solution.
[0095] For example, the first sampling method can be uniform sampling, random sampling, or other types of sampling methods, etc., which are not limited here.
[0096] Optionally, if the N sub-regions are all the same size and the first sampling method is uniform sampling, then all sampling points included in the N sampling point set are uniformly distributed within the first ROI. Then, the execution device determines a first point corresponding to the first sampling point from the multiple points included in the first image based on the first sampling method and a preset sampling rate. This can include: the execution device determining the step size when sampling all sampling points in the N sampling point set based on the first sampling method and the preset sampling rate, and then obtaining a point corresponding to each sampling point from the multiple points included in the first image.
[0097] Optionally, the execution device determining a first point corresponding to the first sampling point may include: the execution device using a nearest neighbor interpolation algorithm to determine a first point corresponding to the first sampling point, that is, the first point is the point closest to the first sampling point among the multiple points included in the first image. To more intuitively understand this solution, please refer to Figure 4. Figure 4 is a schematic diagram of the first sampling point and the first point provided in the embodiment of this application. In Figure 4, taking N sub-regions of the same size, the first sampling method as uniform sampling, and the value of S as 4 as an example, Figure 4 includes a large rectangle filled with gray squares to represent the first image. Each gray square represents a point in the first image, and the multiple gray squares represent multiple points included in the first image. In Figure 4, the rectangle with a width of 9.12 and a height of 5.23 represents the first ROI in the first image. As shown in Figure 4, the first ROI is divided into 9 sub-regions of the same size. Figure 4 shows 4 sampling points in a sub-region in the upper left corner, and Figure 4 shows a first point corresponding to a sampling point in the upper left corner of the 4 sampling points. This first point is the point closest to the first point among the multiple points included in the first image. It should be understood that the example in Figure 4 is only for the convenience of understanding this solution and is not intended to limit this solution.
[0098] In this embodiment of the application, a specific implementation method is provided for determining a first point corresponding to the first sampling point, which improves the feasibility of the solution. Furthermore, using the first value of the point closest to the first sampling point as the second feature value of the first sampling point is beneficial for restoring the true situation of the ROI.
[0099] Alternatively, the executing device may determine the first point as the nearest point located to the lower right of the first sampling point among the multiple points included in the first image; or, the executing device may determine the first point as the nearest point located to the lower left of the first sampling point among the multiple points included in the first image; or, the executing device may determine the first point as the point located to the upper right of the first sampling point among the multiple points included in the first image; or, the executing device may determine the first point as the point located to the upper left of the first sampling point among the multiple points included in the first image, etc. The specific implementation method of "the executing device determining a first point corresponding to the first sampling point" can be determined in combination with the actual application scenario.
[0100] For example, "the execution device determines a first point corresponding to the first sampling point" can be understood as the execution device determining the position of the first point in the first image. Since the first image can be specifically represented as a matrix, "the execution device determines a first point corresponding to the first sampling point" can be understood as the execution device determining that the first value of the first point is located in the Xth column and Yth row of the aforementioned matrix, where X is an integer greater than or equal to 1 and Y is an integer greater than or equal to 1.
[0101] To further understand this scheme, the formula used to "determine a first point corresponding to the first sampling point based on the first location information" is disclosed below. This formula assumes that the N sub-regions are all the same size and the first sampling method is uniform sampling. W_step=ROI_W2 / (pool_W1*r); (1) H_step=ROI_H2 / (pool_H1*r); (2)
[0102] Where W_step represents the sampling step size in the width direction, ROI_W2 represents the width of the first ROI, pool_W1 represents the width in the preset size of the feature information of the first ROI, r represents the sampling rate, W_step represents the sampling step size in the height direction, ROI_W2 represents the height of the first ROI, and pool_W1 represents the height in the preset size of the feature information of the first ROI. X = floor(start_x + 0.5 + W_step * loop_x); (3) Y = floor(start_y + 0.5 + H_step * loop_y); (4)
[0103] Where start_x represents the coordinates of the top-left corner vertex of the first ROI in the first image in the width direction, loop_x represents the xth sampling point in the width direction, X represents the Xth column of the point corresponding to the aforementioned sampling point in the matrix form of the first image, start_y represents the coordinates of the top-left corner vertex of the first ROI in the first image in the height direction, loop_y represents the yth sampling point in the height direction, Y represents the Yth column of the point corresponding to the aforementioned sampling point in the matrix form of the first image, floor() represents rounding down. It should be understood that the examples given above in conjunction with formulas (1) to (4) are only for the convenience of understanding this scheme and are not intended to limit this scheme.
[0104] 304. Obtain the first value of the first point from the first image, wherein the first value of the first point is used as the second feature value of the first sampling point, and the second feature value of each sampling point in the first sampling point set is used to obtain the first feature value of the first sampling point set.
[0105] In this embodiment of the application, after the execution device determines the position of a first point corresponding to the first sampling point in the first image, it can obtain the first value of the first point from the first image, that is, obtain the second feature value of the first sampling point.
[0106] For example, in one case, if the first image obtained in step 301 includes C feature maps, then in step 304, after the execution device determines the position of the first point in the first image (also referred to as a "feature map"), it can obtain a first value (also referred to as a "feature value") of the first point from each of the C feature maps. Thus, a total of C first values of the first point can be obtained from the C feature maps, and the C first values of the first point are determined as C second feature values of the first sampling point.
[0107] In another case, if the first image obtained in step 301 is an original image, then in step 304, after determining the position of the first point in the first image (also referred to as the "original image"), the executing device can obtain a first value (also referred to as the "pixel value") of the first point from the aforementioned original image, and the first value of the first point is used as the second feature value of the first sampling point.
[0108] The execution device can repeat steps 303 and 304 above multiple times to obtain the second feature value of each sampling point in the set of N sampling points.
[0109] 305. Based on the second feature value of the first sampling point, generate the first feature value of the first sampling point set. The first feature value of each sampling point set in the N sampling point sets is used to obtain the feature information of the first ROI.
[0110] In this embodiment of the application, since each of the N sampling point sets includes S sampling points, after the execution device obtains the second feature value of each of the S first sampling points included in the first sampling point set, it can generate the first feature value of the first sampling point set based on the second feature value of the first sampling point. The execution device repeats steps 303 to 305 to obtain the first feature value of each sampling point set in the N sampling point sets, thereby obtaining the feature information of the first ROI, wherein the feature information of the first ROI includes the first feature value of each sampling point set in the N sampling point sets.
[0111] Specifically, in one scenario, if the first image obtained in step 301 includes C feature maps, then in step 304, C second feature values can be obtained for each first sampling point. The C second feature values for each first sampling point correspond one-to-one with the C channels. In step 305, the execution device can obtain a second feature value corresponding to the first channel from the C second feature values for each first sampling point. The first channel is any one of the C channels. Since the set of first sampling points includes a total of S first sampling points, a total of S second feature values corresponding to the first channel are obtained. Then, the S second feature values corresponding to the first channel are fused to obtain a first feature value for the set of first sampling points (this feature value corresponds to the first channel). For example, the fusion operation in this application can be averaging, taking the median value, taking the maximum value, taking the minimum value, or other fusion operations, etc., which can be determined according to the actual application scenario.
[0112] If the execution device performs the above operation for each of the C channels, then the C first feature values of the first sampling point set can be obtained, and the C first feature values of the first sampling point set correspond one-to-one with the C channels.
[0113] For example, in one implementation, the execution device can generate C first feature values of the set of first sampling points by matrix multiplication based on C second feature values of each of the S first sampling points, and the C first feature values correspond one-to-one with the C channels.
[0114] For example, the execution device can acquire a first matrix and a second matrix, wherein the first matrix is an S×C matrix containing C second eigenvalues of each of the S first sampling points, and the second matrix is a 1×S matrix; the execution device performs matrix multiplication on the first matrix and the second matrix to achieve averaging of the C second eigenvalues of each of the S first sampling points, resulting in a 1×C matrix, wherein the 1×C matrix includes the C first eigenvalues of the set of first sampling points.
[0115] For example, the above operations can be performed by a matrix computing unit in the execution device. The matrix computing unit can be understood as a hardware unit of the execution device. Generally, a processor core is configured with a matrix computing unit.
[0116] In this embodiment, the acquisition of the first image includes C feature maps, which improves the feasibility of the solution. Furthermore, when the acquired first image includes C feature maps, since each sampling point corresponds to C second feature values, matrix multiplication can be used to calculate the C first feature values of the first sampling point set at once. This improves the efficiency of acquiring the first feature values of each sampling point set, and consequently, improves the efficiency of acquiring the feature information of the ROI.
[0117] In another implementation, the execution device can generate C first feature values of the first sampling point set based on C second feature values of each of the S first sampling points using vector calculation, and the C first feature values correspond one-to-one with the C channels.
[0118] For example, if the above fusion operation is to calculate an average, the execution device can obtain a first vector and a second vector. The first vector includes S first sampling points and C feature values of one of the first sampling points. The second vector includes C 1 / S values. Multiplying the first vector and the second vector yields a third vector, which includes C values. The execution device performs the aforementioned operation on all S first sampling points to obtain S third vectors that correspond one-to-one with the S first sampling points. Vector addition is performed on the S third vectors to obtain C first feature values of the set of first sampling points.
[0119] Optionally, when N is an integer greater than or equal to 2, that is, when the above N sampling point sets include at least two sampling point sets, referring to the descriptions of steps 303, 304, and 305 above, the task of "obtaining the first feature value of each sampling point set in the N sampling point sets" can be divided into three sub-tasks: "determining a point corresponding to each sampling point", "obtaining the second feature value of the sampling point", and "generating the first feature value". Optionally, the three sub-tasks of "determining a point corresponding to each sampling point", "obtaining the second feature value of the sampling point", and "generating the first feature value" can be performed in a pipelined parallel manner, that is, the three sub-tasks of "determining a point corresponding to each sampling point", "obtaining the second feature value of the sampling point", and "generating the first feature value" are executed by three different execution entities in the execution device. The three different execution entities can independently execute their own sub-tasks, and there is a sequential dependency between the three sub-tasks corresponding to the same set in the N sampling point sets.
[0120] To understand this solution more intuitively, please refer to Figure 5. Figure 5 is a schematic diagram of a pipelined parallel execution of subtasks provided by an embodiment of this application. In Figure 5, N sampling point sets are specifically represented as 5 sampling point sets, and each of the N sampling point sets includes 4 sampling points. Figure 5 shows three rows. Each rectangle in the first row represents the execution of a "confirmation operation of a first point corresponding to a sampling point". Each rectangle in the second row represents the execution of a "second feature value acquisition operation of a sampling point". Each rectangle in the third row represents the execution of a "first feature value generation operation". As shown in Figure 5, when the execution device performs the operation to determine a first point corresponding to the second sampling point, it begins to perform the operation to obtain the second feature value of the first sampling point. Since each sampling point set in the N sampling point set includes 4 sampling points, it is necessary to obtain the second feature values of 4 sampling points before starting the operation to generate the first feature value of the first sampling point set. As shown in Figure 5, while the operation to generate the first feature value of the first sampling point set is being performed, the "operation to confirm a first point corresponding to a sampling point" and the "operation to obtain the second feature value of the sampling point" are also being performed in parallel. It should be understood that the example in Figure 5 is only for the convenience of understanding the concept of "pipeline parallelism" and is not intended to limit this scheme.
[0121] In this embodiment, the large task of obtaining the first feature value of the entire set of sampling points is divided into three sub-tasks: "determining a point corresponding to each sampling point", "obtaining the second feature value of the sampling point", and "generating the first feature value". The aforementioned three sub-tasks are then executed in a pipelined parallel manner, which helps to further accelerate the efficiency of obtaining the first feature value of each set of sampling points, thereby further improving the efficiency of obtaining the feature information of the ROI.
[0122] For example, in one scenario, the execution entity for the subtask "determining a point corresponding to each sampling point" can be a scalar computation unit in the execution device; the execution entity for "acquiring the second eigenvalue of the sampling point" can be a hardware unit or software module in the execution device, wherein the function of the aforementioned hardware unit or software module is to read data, for example, the aforementioned hardware unit can be MTE2; and the execution entity for "generating the first eigenvalue" can be a matrix computation unit in the execution device. In this embodiment, since a processor core is generally configured with one scalar computation unit and one matrix computation unit, using the aforementioned method to allocate the execution entities not only enables pipelined parallelism among the three subtasks of "determining a point corresponding to each sampling point," "acquiring the second eigenvalue of the sampling point," and "generating the first eigenvalue," but also avoids modifications to the processor core, which helps to avoid additional cost consumption, thereby improving the executability of this solution.
[0123] In another scenario, the subtask of "determining a point corresponding to each sampling point" can be performed by the scalar computation unit in the execution device, the "acquiring the second feature value of the sampling point" can be performed by the hardware unit or software module in the execution device, and the "generating the first feature value" can be performed by the vector computation unit in the execution device.
[0124] In another scenario, the subtask of "determining a point corresponding to each sampling point" can be performed by the scalar computation unit in the execution device, the subtask of "acquiring the second feature value of the sampling point" can be performed by the hardware unit or software module in the execution device, and the subtask of "generating the first feature value" can be performed by the scalar computation unit in the execution device.
[0125] The execution device can repeatedly perform the above operation for each of the N sampling point sets to obtain C first feature values for each of the N sampling point sets. Then, the feature information of the first ROI obtained in step 305 includes C sub-feature information corresponding one-to-one with the C channels. Each of the C sub-feature information includes a feature value of each of the N sampling point sets.
[0126] For example, C takes the value of 3, N takes the value of 4, and the four sampling point sets include set 1, set 2, set 3, and set 4. The three first feature values of set 1 are a1, a2, and a3; the three first feature values of set 2 are b1, b2, and b3; the three first feature values of set 3 are c1, c2, and c3; and the three first feature values of set 2 are d1, d2, and d3. The feature information of the first ROI includes three sub-feature information corresponding to the three channels. The three sub-feature information include sub-feature information 1, sub-feature information 2, and sub-feature information 3. Sub-feature information 1 includes a1, b1, c1, and d1; sub-feature information 2 includes a2, b2, c2, and d2; sub-feature information 3 includes a3, b3, c3, and d3; and sub-feature information 4 includes a4, b4, c4, and d4. It should be understood that this example is only for the convenience of understanding this scheme and is not intended to limit this scheme.
[0127] In another scenario, if the first image obtained in step 301 includes one original image, then in step 304, a second feature value can be obtained for each first sampling point. The S second feature values of the S first sampling points can be directly fused to obtain a first feature value for the set of first sampling points. It should be noted that the specific implementation of the aforementioned fusion operation can be found in the description of the previous scenario, and will not be repeated here. The execution device repeatedly executes steps 303 to 305 multiple times, obtaining a first feature value for each of the N sampling point sets, which is equivalent to obtaining the feature information of the first ROI. The feature information of the first ROI includes a total of N feature values.
[0128] To further understand this scheme, the process of "obtaining the feature information of the first ROI" is described below with a specific example. In this example, the first ROI has a width of 9 and a height of 6, with a total of 9 sampling point sets. Each sampling point set includes 4 sampling points (that is, S takes the value of 4). The obtained first image includes C feature maps. In this example, the matrix calculation unit is used to perform the "generation operation of the first feature value". In this example, the matrix calculation unit can only perform a 16×16 matrix calculation at a time. Since the matrix calculation unit can only process 16×16 matrices, the unfilled parts in the first and second matrices need to be padded with 0.
[0129] In the preparation phase, in order to execute the three subtasks of "determining a point corresponding to each sampling point", "acquiring the second feature value of the sampling point" and "generating the first feature value" in a pipelined parallel manner, the execution device can pre-allocate a storage space in memory, which is at least large enough to hold four 16×16 matrices.
[0130] Since the nine sub-regions corresponding to the nine sampling point sets are all the same size and a uniform sampling method is used, the execution device can first calculate the step size between different sampling points in the nine sampling point sets, use the nearest neighbor interpolation algorithm to determine the position of a first point corresponding to each sampling point in the first image, and then obtain C feature values for each first point. The C feature values of each first point are used as C second feature values for each sampling point.
[0131] After acquiring C second feature values for each of the four sample points in a sample point set, the execution device places the C second feature values of each of the four sample points into the storage space specified in the application, and uses the matrix calculation unit to generate C first feature values corresponding to a sample point set. For a more intuitive understanding of this solution, please refer to Figure 6. Figure 6 is a schematic diagram of generating C first feature values for a sample point set using matrix multiplication, as provided in this application embodiment. As shown in Figure 6, since the matrix calculation unit only supports operations between 16×16 matrices, a 16×16 matrix is required for the operation. However, the effective data of the first matrix is 4×C, the effective data of the second matrix is 1×4, and the effective data of the final result is 1×C. The colored filled parts in Figure 6 represent the effective data in the matrix. It should be understood that the example in Figure 4 is only for the convenience of understanding this solution and is not intended to limit this solution.
[0132] The execution device repeats the above operation to obtain C first feature values for each of the 9 sampling point sets. It should be noted that the example here is only for the convenience of understanding this scheme.
[0133] Optionally, since the first image includes at least one ROI, the execution device can repeat steps 302 to 305 at least once to obtain feature information of each ROI in the at least one ROI. In the case where the aforementioned at least one ROI is specifically manifested as at least two ROIs, the execution device can perform the feature information acquisition operations of different ROIs in a parallel manner. That is, at least one ROI also includes a second ROI, and the feature information acquisition operations of the first ROI and the feature information acquisition operations of the second ROI are executed in parallel.
[0134] For example, the execution device can obtain the number of at least one ROI included in the first image and the number of cores in the execution device used to perform the "ROI feature information generation operation". For example, if the first image includes T ROIs and the execution device has Z cores used to perform the "ROI feature information generation operation", where T and Z are both integers greater than or equal to 1, then the execution device can allocate the feature information acquisition operations of the T ROIs to the Z cores for execution. In this case, there may be cases where the feature information acquisition operations of different ROIs are executed in parallel. For example, if T is 4, the T ROIs include ROI1, ROI2, ROI3 and ROI4, Z is 3, and the three cores are core 1, core 2 and core 3. The feature information acquisition operations of ROI1 and ROI2 are executed by core 1, the feature information acquisition operation of ROI3 is executed by core 2, and the feature information acquisition operation of ROI4 is executed by core 3. It should be understood that this example is only for the convenience of understanding this solution.
[0135] In this embodiment of the application, when the first image includes at least one ROI specifically manifests as at least two ROIs, since the acquisition operations of feature information of different ROIs are independent of each other, the acquisition operations of feature information of different ROIs can be executed in parallel. The aforementioned method is beneficial to further improve the efficiency of the overall process of acquiring feature information of all ROIs.
[0136] The feature information of any ROI obtained by this implementation method includes the first feature value of each of the N sampling point sets, where N is a preset value, thereby achieving the goal of consistent feature information size for different ROIs. Furthermore, in this embodiment, for any ROI (i.e., the first ROI), the feature information of the first ROI includes the first feature value of each of the N sampling point sets. Each of the N sampling point sets includes at least one sampling point. The first feature value of each of the N sampling point sets is obtained based on the second feature value of the sampling point in each sampling point set. In order to obtain the second feature value of any sampling point (i.e., the first sampling point), a first point corresponding to the first sampling point is first obtained in the first image. Then, the first value of the first point included in the first image is directly used as the second feature value of the first sampling point. That is, after obtaining the first value of the first point, no additional calculation is needed to obtain the second feature value of the first sampling point, which helps to reduce the computer resources consumed in the entire generation process of the ROI feature information.
[0137] Based on the embodiments corresponding to Figures 1 to 6, in order to better implement the above-described solutions of this application, related equipment for implementing the above-described solutions is also provided below. Specifically, refer to Figure 7, which is a schematic diagram of a device for acquiring feature information of a Region of Interest (ROI) provided in an embodiment of this application. The device 700 for acquiring feature information of the ROI includes: an acquisition module 701, used to acquire a first image, which is either an original image or a feature map obtained after feature extraction from the original image, the first image including a first value for each of multiple points; the acquisition module 701 is also used to acquire location information, the location information indicating the location of a first ROI in the first image, the first image including at least one ROI, the first ROI being any one of at least one ROI, wherein the feature information of the first ROI includes a first feature value for each of N sampling point sets, N being a preset value, and N being greater than or equal to... The set of N sampling points is an integer less than 1. Each sampling point set includes at least one sampling point. The first sampling point set is any one of the N sampling point sets. The first sampling point is any one of the sampling points in the first sampling point set. The determining module 702 is used to determine a first point corresponding to the first sampling point based on the location information. The first point is one of multiple points and is located within the location region of the first ROI. The obtaining module 701 is also used to obtain the first value of the first point from the first image. The first value of the first point is used as the second feature value of the first sampling point. The second feature value of each sampling point in the first sampling point set is used to obtain the first feature value of the first sampling point set. The first feature value of each sampling point set in the N sampling point sets is used to obtain the feature information of the first ROI.
[0138] Optionally, the acquisition module 701 is specifically used to acquire C feature maps corresponding one-to-one with C channels. The C feature maps include C first values for each point, where C is an integer greater than or equal to 1. Each sampling point set in the N sampling point sets includes S sampling points, where S is an integer greater than or equal to 1. The S first sampling points included in the first sampling point set correspond one-to-one with the S first points in the first image. The acquisition module 701 is specifically used to acquire C first values for each of the S first points from the C feature maps. The C first values for each of the S first points are used as C second feature values for each of the S first sampling points. The first feature values of the first sampling point set include C first feature values corresponding one-to-one with C channels. The feature information of the first ROI includes C first feature values for each sampling point set in the N sampling point sets.
[0139] Optionally, the feature information acquisition device 700 of ROI further includes: a generation module 703, used to generate C first feature values of the first sampling point set by matrix multiplication based on C second feature values of each of the S first sampling points.
[0140] Optionally, when N is an integer greater than or equal to 2, the operations of determining a point corresponding to each sampling point, obtaining the second feature value of the sampling point, and generating the first feature value are executed in a pipelined parallel manner.
[0141] Optionally, the operation of determining the first point is performed by the scalar calculation unit, the operation of obtaining the first value is performed by the hardware unit or the software module, and the operation of generating the first eigenvalue is performed by the matrix calculation unit.
[0142] Optionally, the determining module 702 is specifically used to determine a first point corresponding to the first sampling point based on the nearest neighbor interpolation algorithm.
[0143] Optionally, at least one ROI may also include a second ROI, and the acquisition of feature information of the first ROI and the acquisition of feature information of the second ROI are performed in parallel.
[0144] It should be noted that the information interaction and execution process between the modules / units in the ROI feature information acquisition device 700 are based on the same concept as the various method embodiments corresponding to Figures 1 to 6 in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0145] The following describes an execution device provided in an embodiment of this application. Referring to Figure 8, which is a schematic diagram of the structure of the execution device provided in an embodiment of this application, the execution device 800 includes: a receiver 801, a transmitter 802, a processor 803, and a memory 804 (wherein the number of processors 803 in the device 800 can be one or more; Figure 8 shows one processor as an example). The processor 803 may include an application processor 8031 and a communication processor 8032. In some embodiments of this application, the receiver 801, transmitter 802, processor 803, and memory 804 can be connected via a bus or other means.
[0146] Memory 804 may include read-only memory and random access memory, and provides instructions and data to processor 803. A portion of memory 804 may also include non-volatile random access memory (NVRAM). Memory 804 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0147] The processor 803 controls the operation of the device. In specific applications, the various components of the device are coupled together through a bus system. This bus system includes not only the data bus but also power buses, control buses, and status signal buses. However, for clarity, all buses in the diagram are referred to as the bus system.
[0148] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 803. Processor 803 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 803 or by instructions in software form. Processor 803 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may further include application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Processor 803 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 804, and processor 803 reads the information from memory 804 and, in conjunction with its hardware, completes the steps of the above method.
[0149] Receiver 801 can be used to receive input digital or character information, and to generate signal inputs related to device settings and function control. Transmitter 802 can be used to output digital or character information through the first interface; transmitter 802 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 802 may also include a display device such as a display screen.
[0150] In this embodiment, processor 803 is used to execute the method executed by the execution device in the embodiments corresponding to Figures 1 to 6. It should be noted that the specific manner in which the application processor 8031 in processor 803 executes the aforementioned steps is based on the same concept as the method embodiments corresponding to Figures 1 to 6 in this application, and the resulting technical effects are the same as those in the method embodiments corresponding to Figures 1 to 6 in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0151] This application also provides a vehicle. Referring to Figure 9, which is a structural schematic diagram of a vehicle provided in this application embodiment, the vehicle 100 is configured for fully or partially automated driving mode. For example, the vehicle 100 can control itself while in automated driving mode, and can determine the current state of the vehicle and its surrounding environment through human operation, determine the possible behaviors of at least one other vehicle in the surrounding environment, and determine the confidence level corresponding to the probability of other vehicles performing possible behaviors, and control the vehicle 100 based on the determined information. When the vehicle 100 is in automated driving mode, it can also be set to operate without human interaction.
[0152] Vehicle 100 may include various subsystems, such as a mobility system 102, a sensor system 104, a control system 106, one or more peripheral devices 108, a power supply 110, a computer system 112, and a user interface 116. Optionally, vehicle 100 may include more or fewer subsystems, and each subsystem may include multiple components. Furthermore, each subsystem and component of vehicle 100 may be interconnected via wired or wireless means.
[0153] The mobility system 102 may include components that provide powered motion to the vehicle 100. In one embodiment, the mobility system 102 may include an engine 118, an energy source 119, a transmission 120, and wheels / tires 121.
[0154] Engine 118 can be an internal combustion engine, an electric motor, an air-compressed engine, or other combinations of engines, such as a hybrid engine consisting of a gasoline engine and an electric motor, or a hybrid engine consisting of an internal combustion engine and an air-compressed engine. Engine 118 converts energy source 119 into mechanical energy. Examples of energy source 119 include gasoline, diesel, other petroleum-based fuels, propane, other compressed gas-based fuels, ethanol, solar panels, batteries, and other sources of electricity. Energy source 119 can also provide energy to other systems of vehicle 100. Transmission 120 transmits mechanical power from engine 118 to wheels 121. Transmission 120 may include a gearbox, a differential, and a drive shaft. In one embodiment, transmission 120 may also include other components, such as a clutch. The drive shaft may include one or more axles that can be coupled to one or more wheels 121.
[0155] Sensor system 104 may include several sensors for sensing information about the environment surrounding vehicle 100. For example, sensor system 104 may include a positioning system 122 (which may be a GPS system, a BeiDou system, or another positioning system), an inertial measurement unit (IMU) 124, a radar 126, a laser rangefinder 128, and a camera 130. Sensor system 104 may also include sensors for the internal systems of the monitored vehicle 100 (e.g., an in-vehicle air quality monitor, fuel gauge, oil temperature gauge, etc.). Sensing data from one or more of these sensors can be used to detect objects and their corresponding characteristics (position, shape, orientation, speed, etc.). This detection and identification is a key function for the safe operation of the autonomous vehicle 100.
[0156] The positioning system 122 can be used to estimate the geographical location of the vehicle 100. An IMU 124 is used to sense changes in the position and orientation of the vehicle 100 based on inertial acceleration. In one embodiment, the IMU 124 can be a combination of an accelerometer and a gyroscope. A radar 126 can use radio signals to sense objects in the surrounding environment of the vehicle 100, specifically millimeter-wave radar or lidar. In some embodiments, in addition to sensing objects, the radar 126 can also be used to sense the speed and / or direction of travel of objects. A laser rangefinder 128 can use lasers to sense objects in the environment in which the vehicle 100 is located. In some embodiments, the laser rangefinder 128 may include one or more laser sources, a laser scanner, and one or more detectors, as well as other system components. A camera 130 can be used to capture multiple images of the surrounding environment of the vehicle 100. The camera 130 can be a still camera or a video camera.
[0157] The control system 106 controls the operation of the vehicle 100 and its components. The control system 106 may include various components, including a steering system 132, a throttle 134, a braking unit 136, a computer vision system 140, a trajectory control system 142, and an obstacle avoidance system 144.
[0158] The steering system 132 is operable to adjust the forward direction of the vehicle 100. For example, in one embodiment, it may be a steering wheel system. The throttle 134 controls the operating speed of the engine 118 and thus the speed of the vehicle 100. The braking unit 136 controls the deceleration of the vehicle 100. The braking unit 136 may use friction to slow down the wheels 121. In other embodiments, the braking unit 136 may convert the kinetic energy of the wheels 121 into electrical current. The braking unit 136 may also take other forms to slow down the rotational speed of the wheels 121 to control the speed of the vehicle 100. The computer vision system 140 is operable to process and analyze images captured by the camera 130 to identify objects and / or features in the environment surrounding the vehicle 100. The objects and / or features may include traffic signals, road boundaries, and obstacles. The computer vision system 140 may use object recognition algorithms, Structure from Motion (SFM) algorithms, video tracking, and other computer vision techniques. In some embodiments, the computer vision system 140 may be used to map the environment, track objects, estimate the speed of objects, etc. The route control system 142 is used to determine the driving route and speed of the vehicle 100. In some embodiments, the route control system 142 may include a lateral planning module 1421 and a longitudinal planning module 1422, which are respectively used to combine data from the obstacle avoidance system 144, GPS 122, and one or more predetermined maps to determine the driving route and speed for the vehicle 100. The obstacle avoidance system 144 is used to identify, evaluate, and avoid or otherwise traverse obstacles in the environment of the vehicle 100, which may specifically be physical obstacles and virtual moving bodies that may collide with the vehicle 100. In one example, the control system 106 may add or alternatively include components other than those shown and described. Alternatively, some of the components shown above may be reduced.
[0159] Vehicle 100 interacts with external sensors, other vehicles, other computer systems, or users via peripheral device 108. Peripheral device 108 may include wireless communication system 146, on-board computer 148, microphone 150, and / or speaker 152. In some embodiments, peripheral device 108 provides a means for a user of vehicle 100 to interact with user interface 116. For example, on-board computer 148 may provide information to a user of vehicle 100. User interface 116 may also operate on-board computer 148 to receive user input. On-board computer 148 may be operated via a touchscreen. In other cases, peripheral device 108 may provide a means for vehicle 100 to communicate with other devices located within the vehicle. For example, microphone 150 may receive audio (e.g., voice commands or other audio input) from a user of vehicle 100. Similarly, speaker 152 may output audio to a user of vehicle 100. Wireless communication system 146 may communicate wirelessly with one or more devices, either directly or via a communication network. For example, the wireless communication system 146 may use 3G cellular communication, such as CDMA, EVDO, GSM / GPRS, or 4G cellular communication, such as LTE, or 5G cellular communication. The wireless communication system 146 may utilize a wireless local area network (WLAN) for communication. In some embodiments, the wireless communication system 146 may utilize an infrared link, Bluetooth, or ZigBee to communicate directly with the device. Other wireless protocols, such as various vehicle communication systems, may also be used. For example, the wireless communication system 146 may include one or more dedicated short-range communications (DSRC) devices that may enable public and / or private data communication between the vehicle and / or a roadside station.
[0160] Power source 110 can provide power to various components of vehicle 100. In one embodiment, power source 110 can be a rechargeable lithium-ion or lead-acid battery. One or more such battery packs can be configured to provide power to various components of vehicle 100. In some embodiments, power source 110 and energy source 119 can be implemented together, as is the case in some fully electric vehicles.
[0161] Some or all of the functions of vehicle 100 are controlled by computer system 112. Computer system 112 may include at least one processor 113, which executes instructions 115 stored in a non-transitory computer-readable medium such as memory 114. Computer system 112 may also be multiple computing devices that control individual components or subsystems of vehicle 100 in a distributed manner. Processor 113 may be any conventional processor, such as a commercially available central processing unit (CPU). Alternatively, processor 113 may be a dedicated device such as an application-specific integrated circuit (ASIC) or other hardware-based processor. Although FIG9 functionally illustrates the processor, memory, and other components of computer system 112 in the same block, those skilled in the art will understand that the processor or memory may actually include multiple processors or memories not stored in the same physical housing. For example, memory 114 may be a hard disk drive or other storage medium located in a housing different from that of computer system 112. Therefore, references to processor 113 or memory 114 will be understood to include a collection of processors or memories that may or may not operate in parallel. Unlike using a single processor to perform the steps described herein, some components, such as steering and deceleration components, can each have their own processor that performs only calculations related to the component's specific function.
[0162] In all the aspects described herein, processor 113 may be located remotely from vehicle 100 and may communicate wirelessly with vehicle 100. In other aspects, some of the processes described herein are executed on processor 113 located within vehicle 100, while others are executed by remote processor 113, including taking the necessary steps to perform a single operation.
[0163] In some embodiments, memory 114 may contain instructions 115 (e.g., program logic) that can be executed by processor 113 to perform various functions of vehicle 100, including those described above. Memory 114 may also contain additional instructions, including instructions to send data to, receive data from, interact with, and / or control one or more of the mobility system 102, sensor system 104, control system 106, and peripheral devices 108. In addition to instructions 115, memory 114 may also store data such as road maps, route information, vehicle position, direction, speed, and other such vehicle data, as well as other information. This information may be used by vehicle 100 and computer system 112 during operation of vehicle 100 in autonomous, semi-autonomous, and / or manual modes. A user interface 116 is provided to or receives information from a user of vehicle 100. Optionally, user interface 116 may include one or more input / output devices within the set of peripheral devices 108, such as wireless communication system 146, on-board computer 148, microphone 150, and speaker 152.
[0164] Computer system 112 can control the functions of vehicle 100 based on input received from various subsystems (e.g., driving system 102, sensor system 104, and control system 106) and from user interface 116. For example, computer system 112 can utilize input from control system 106 to control steering system 132 to avoid obstacles detected by sensor system 104 and obstacle avoidance system 144. In some embodiments, computer system 112 is operable to provide control over many aspects of vehicle 100 and its subsystems.
[0165] Alternatively, one or more of these components may be installed separately from or associated with vehicle 100. For example, memory 114 may exist partially or completely separately from vehicle 100. The components may be communicatively coupled together in a wired and / or wireless manner.
[0166] Optionally, the above components are merely examples. In practical applications, components in each of the above modules may be added or removed as needed. Figure 9 should not be construed as a limitation on the embodiments of this application. A vehicle traveling on a road, such as vehicle 100 above, can identify objects in its surrounding environment to determine adjustments to its current speed. These objects can be other vehicles, traffic control equipment, or other types of objects. In some examples, each identified object can be considered independently, and based on the object's individual characteristics, such as its current speed, acceleration, and distance from the vehicle, the speed adjustment to be made by the vehicle can be determined.
[0167] Optionally, vehicle 100 or computing devices associated with vehicle 100, such as computer system 112, computer vision system 140, and memory 114 as shown in Figure 9, can predict the behavior of the identified objects based on the characteristics of the identified objects and the state of the surrounding environment (e.g., traffic, rain, ice on the road, etc.). Optionally, each identified object depends on the behavior of each other, so all identified objects can also be considered together to predict the behavior of a single identified object. Vehicle 100 can adjust its speed based on the predicted behavior of the identified objects. In other words, vehicle 100 can determine what steady state the vehicle will need to adjust to (e.g., accelerate, decelerate, or stop) based on the predicted behavior of the objects. In this process, other factors can also be considered in determining the speed of vehicle 100, such as the lateral position of vehicle 100 in the road, the curvature of the road, the proximity of static and dynamic objects, etc. In addition to providing instructions to adjust the speed of the vehicle, the computing device can also provide instructions to modify the steering angle of the vehicle 100 so that the vehicle 100 follows a given trajectory and / or maintains a safe lateral and longitudinal distance from objects near the vehicle 100 (e.g., cars in adjacent lanes on the road).
[0168] In this embodiment, the processor 113 in the vehicle 100 is used to execute the method executed by the execution device in the embodiments corresponding to Figures 1 to 6. It should be noted that the specific manner in which the processor 113 executes the aforementioned steps is based on the same concept as the method embodiments corresponding to Figures 1 to 6 in this application, and the resulting technical effects are the same as those in the method embodiments corresponding to Figures 1 to 6 in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0169] This application also provides a computer-readable storage medium storing a program that, when run on a computer, causes the computer to perform the steps executed by the execution device in the methods described in the embodiments shown in Figures 1 to 6 above.
[0170] This application also provides a computer program product, which includes a program that, when run on a computer, causes the computer to perform the steps performed by the execution device in the methods described in the embodiments shown in Figures 1 to 6 above.
[0171] This application also provides a circuit system including a processing circuit configured to perform the method described in the embodiments shown in Figures 1 to 6 above.
[0172] The execution device or the feature information acquisition device for the region of interest provided in this application embodiment can specifically be a chip. The chip includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip to execute the method described in the embodiments shown in Figures 1 to 6. Optionally, the storage unit is a storage unit within the chip, such as a register or cache. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, such as random access memory (RAM).
[0173] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of a program in the first aspect of the method.
[0174] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0175] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CLUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0176] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.
[0177] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
Claims
1. A method for obtaining feature information of a region of interest (ROI), characterized in that, The method includes: Acquire a first image, which is the original image, or the first image is a feature map obtained after feature extraction of the original image, and the first image includes a first value for each of a plurality of points; Location information is obtained, which indicates the location of a first ROI in the first image. The first image includes at least one ROI, and the first ROI is any one of the at least one ROI. The feature information of the first ROI includes a first feature value of each of the N sampling point sets, where N is a preset value and is an integer greater than or equal to 1. Each of the N sampling point sets includes at least one sampling point. The first sampling point set is any one of the N sampling point sets, and the first sampling point is any one of the sampling points in the first sampling point set. Based on the location information, a first point corresponding to the first sampling point is determined. The first point is one of the plurality of points and is located within the location area of the first ROI. The first value of the first point is obtained from the first image, wherein the first value of the first point is used as the second feature value of the first sampling point, the second feature value of each sampling point in the first sampling point set is used to obtain the first feature value of the first sampling point set, and the first feature value of each sampling point set in the N sampling point sets is used to obtain the feature information of the first ROI.
2. The method according to claim 1, characterized in that, The acquisition of the first image includes: acquiring C feature maps corresponding one-to-one with C channels, wherein the C feature maps include C first values for each point, where C is an integer greater than or equal to 1, and each of the N sampling point sets includes S sampling points, where S is an integer greater than or equal to 1, and the S first sampling points included in the first sampling point set correspond one-to-one with the S first points in the first image; The step of obtaining the first value of the first point from the first image includes: obtaining C first values of each of the S first points from the C feature maps, wherein the C first values of each of the S first points are used as C second feature values of each of the S first sampling points; Wherein, the first feature value of the first sampling point set includes C first feature values corresponding one-to-one with the C channels, and the feature information of the first ROI includes the C first feature values of each sampling point set in the N sampling point sets.
3. The method according to claim 2, characterized in that, The method further includes: Based on the C second feature values of each of the S first sampling points, C first feature values of the first sampling point set are generated by matrix multiplication.
4. The method according to claim 3, characterized in that, When the value of N is an integer greater than or equal to 2, the operation of determining a point corresponding to each sampling point, the operation of obtaining the second feature value of the sampling point, and the operation of generating the first feature value are executed in a pipelined parallel manner.
5. The method according to claim 4, characterized in that, The determination of the first point is performed by the scalar calculation unit, the acquisition of the first value is performed by the hardware unit or the software module, and the generation of the first eigenvalue is performed by the matrix calculation unit.
6. The method according to any one of claims 1 to 5, characterized in that, Determining a first point corresponding to the first sampling point includes: determining a first point corresponding to the first sampling point by using a nearest neighbor interpolation algorithm.
7. The method according to any one of claims 1 to 5, characterized in that, The at least one ROI also includes a second ROI, and the acquisition of feature information of the first ROI and the acquisition of feature information of the second ROI are performed in parallel.
8. A device for acquiring feature information of a region of interest (ROI), characterized in that, The device includes: The acquisition module is used to acquire a first image, which is an original image, or the first image is a feature map obtained after feature extraction of the original image, and the first image includes a first value for each of a plurality of points; The acquisition module is further configured to acquire location information, which indicates the location of a first ROI in the first image. The first image includes at least one ROI, and the first ROI is any one of the at least one ROI. The feature information of the first ROI includes a first feature value of each of the N sampling point sets, where N is a preset value and is an integer greater than or equal to 1. Each of the N sampling point sets includes at least one sampling point, and the first sampling point is any one of the N sampling point sets. The first sampling point is any one of the sampling points in the first sampling point set. The determining module is used to determine a first point corresponding to the first sampling point based on the location information. The first point is one of the plurality of points and is located within the location area of the first ROI. The acquisition module is further configured to acquire a first value of the first point from the first image, wherein the first value of the first point is used as a second feature value of the first sampling point, the second feature value of each sampling point in the first sampling point set is used to obtain the first feature value of the first sampling point set, and the first feature value of each sampling point set in the N sampling point sets is used to obtain the feature information of the first ROI.
9. A device, characterized in that, The method includes a processor coupled to a memory storing program instructions, which, when executed by the processor, implement the method of any one of claims 1 to 7.
10. A vehicle, characterized in that, The method includes a processor coupled to a memory storing program instructions, which, when executed by the processor, implement the method of any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 7.
12. A computer program product, characterized in that, The computer program product includes a program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Focusing apparatus, method and related device
CN112602319A
Potential dangerous target detection method and device
CN114119955A
Data processing method and device
CN116433621A
Location sensitive ensemble classifier
US20210216916A1