Method and device for processing image

By combining the RPN network and the fully connected layer network, proposed regions are generated and feature detection is performed, which solves the problems of storage space and computing time of target detection methods on terminal devices and realizes efficient target and feature detection.

CN114708481BActive Publication Date: 2025-09-19ALIBABA CLOUD COMPUTING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210317283.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2025-09-19
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

Existing deep learning-based object detection methods take up too much storage space and computing time on terminal devices, resulting in a poor user experience.

Method used

A method for processing images is adopted to generate proposed regions through the RPN network, and combined with the RoI pooling layer and the fully connected layer network to achieve target detection and feature detection, reduce storage space and save computing time.

Benefits of technology

Target detection and feature detection are implemented in one algorithm model, which reduces the storage space occupied by the algorithm library. Target detection and feature detection can be completed with only one end-to-end calculation, saving computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114708481B_ABST
    Figure CN114708481B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a method and apparatus for processing images to solve the problem that the algorithm library of the target detection model occupies a large storage space and has low computational efficiency. The method comprises: inputting the first feature map to be processed into the RPN network to obtain a plurality of suggested regions, each suggested region corresponding to: the score of the target and the frame coordinates of the target; obtaining a second feature map based on the plurality of suggested regions, the second feature map including a plurality of suggested regions; inputting the second feature map into the fully connected layer network for processing to obtain an output result, the output result including: the score of the target, target feature information and the frame coordinates of the target. The method utilizes an algorithm model to simultaneously perform target detection and target feature detection, which reduces the storage space occupied by the algorithm library, and only requires one end-to-end calculation to achieve target detection and target feature detection, saving computing time and computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a method and device for processing an image. Background Art

[0002] In recent years, with the development and advancement of deep learning and convolutional neural networks (CNNs), image-based object detection and classification capabilities have greatly improved. Object detection is a key research direction in computer vision and a prerequisite for many advanced tasks, such as scene understanding and event recognition. Object detection is also widely used in security monitoring, autonomous driving, human-computer interaction, augmented reality, pedestrian detection, and large-scale scene recognition. Object detection holds significant significance for both computer vision and practical industrial applications.

[0003] Today, deep learning-based object detection has surpassed traditional methods and become the mainstream approach in the field. The core of deep learning is feature learning, which uses a layered network to acquire hierarchical feature information and output results. Typical algorithms within the deep learning framework include CNNs, which perform feature extraction, feature selection, and feature classification.

[0004] In CNNs, object detection methods include two basic algorithms: object position detection and object feature detection. Taking face recognition as an example, object position detection includes face position detection, while object feature detection includes facial feature point detection, such as the eyes, nose, mouth, and facial edge points. In existing solutions, these two basic algorithms typically require different algorithm models to implement, resulting in a large amount of storage space and computational time consumed by the algorithm library. For example, for devices with limited storage space, such as smartphones, this excessive consumption of storage resources and computational time results in a poor user experience.

[0005] Therefore, the industry is researching more computationally efficient object detection methods to reduce storage space and computing time. Summary of the Invention

[0006] The present application provides a method and apparatus for processing images to solve the problem that the algorithm library of the target detection model occupies a large storage space and has low computational efficiency.

[0007] In a first aspect, a method for processing an image is provided, comprising: inputting a first feature map to be processed into an RPN network to obtain a plurality of suggested regions, each suggested region corresponding to: a score of a target and a frame coordinate of the target; obtaining a second feature map based on the plurality of suggested regions, the second feature map including the plurality of suggested regions; inputting the second feature map into a fully connected layer network for processing to obtain an output result, the output result including: a score of the target, target feature information, and a frame coordinate of the target.

[0008] Optionally, the target may refer to any object requiring target detection, such as a face, a human body, an animal, a vehicle, a building, etc.

[0009] In combination with the first aspect, in a possible implementation method, obtaining a second feature map based on the multiple suggested areas includes: mapping the position coordinates of the multiple suggested areas onto the first feature map; pooling the multiple suggested areas to the same size through the RoI pooling layer; and connecting the multiple suggested areas to obtain the second feature map.

[0010] In combination with the first aspect, in a possible implementation method, inputting the second feature map into the fully connected layer network for processing to obtain an output result includes: mapping the second feature map to a first vector through a GAP operator; inputting the first vector into the fully connected layer network to obtain the output result.

[0011] The length of the first vector can be a preset length. After mapping the second feature map through the GAP operator, only one vector is obtained, and then the fully connected layer operation is performed based on the vector, which can save many parameters in the learning process and reduce computational complexity.

[0012] In combination with the first aspect, in a possible implementation, the target is a human face, and the target feature information includes at least one of the following: coordinates of facial feature points, and the age corresponding to the face.

[0013] During the training process of the fully connected layer network, in addition to the coordinates of facial feature points, other types of facial feature information can also be trained in the fully connected layer network, such as the age of the face. This allows for both face detection and facial feature detection to be implemented in a single algorithm.

[0014] In a second aspect, a device for processing an image is provided, comprising: a first processing module for inputting a first feature map to be processed into an RPN network to obtain a plurality of suggested regions, each suggested region corresponding to: a score of a target and a frame coordinate of a target; a second processing module for obtaining a second feature map based on the plurality of suggested regions, the second feature map including the plurality of suggested regions; a third processing module for inputting the second feature map into a fully connected layer network for processing to obtain an output result, the output result including: a score of the target, target feature information and a frame coordinate of the target.

[0015] In a third aspect, a computer device is provided, comprising a processor, the processor being configured to call a computer program from a memory, and when the computer program is executed, the processor being configured to execute the method in the first aspect or any possible implementation of the first aspect.

[0016] In a fourth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program includes a code for executing the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0017] In a fifth aspect, a computer program product is provided, comprising a computer program including codes for executing the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.

[0018] In the embodiments of this application, a method and apparatus for image processing based on region proposals are proposed. This method enables multi-task object detection and target feature detection, that is, it can simultaneously perform both object detection and target feature detection using a single algorithm model. This not only reduces the storage space occupied by the algorithm library, but also achieves both object detection and target feature detection in a single end-to-end computation, saving computation time and resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] Figure 1 1 is a schematic diagram of a CNN framework for target detection according to an embodiment of the present application;

[0021] Figure 2 This is a schematic diagram of the framework structure of an algorithm according to an embodiment of the present application;

[0022] Figure 3 is a flowchart of a method for processing an image according to an embodiment of the present application;

[0023] Figure 4This is a schematic diagram of a specific flow chart of a method for processing an image according to another embodiment of the present application;

[0024] Figure 5 is a schematic structural diagram of an apparatus 500 according to an embodiment of the present application;

[0025] Figure 6 6 is a schematic structural diagram of an apparatus 600 according to an embodiment of the present application.

[0026] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0028] First, the terms involved in this application are explained.

[0029] Deep learning refers to a collection of algorithms that use various machine learning algorithms on multi-layer neural networks to process images and text. The core of deep learning is feature learning, which uses layered networks to acquire hierarchical feature information and output results. The deep learning framework includes multiple algorithms, such as convolutional neural networks (CNNs) and autoencoders.

[0030] Convolutional neural networks are multi-layer neural networks commonly used for image-related machine learning problems. A typical convolutional network consists of convolutional layers, pooling layers, and fully connected layers. Convolutional and pooling layers work together to form multiple convolution groups, extracting features layer by layer, and ultimately completing classification through one or more fully connected layers.

[0031] Face detection (FD) is a step in a face recognition system that uses a specific strategy to search any input image to determine whether it contains a face. If a face is present, information such as the face's location, size, and posture is output.

[0032] Face landmark detection (FLD) refers to the location of facial feature points. In human body detection algorithms, it is usually used to locate the facial features and edge points of the face, such as the eyes, nose, and mouth corners. It can be used for face correction in human body detection algorithms or subsequent face recognition algorithms.

[0033] Region Proposal Network (RPN): This network processes the input image and selects boxes where objects may be present, known as region proposals. Specifically, the RPN network can accept an image of any size as input and output a set of proposed regions. Each proposed region in the set corresponds to a target score and the target's box coordinates. The target score indicates the probability that the proposed region contains an object, and the target's box coordinates indicate the location of the object.

[0034] Region of interest pooling (RoI Pooling): refers to the use of a maximum pooling operation to convert the region of interest (e.g., the proposed region) into a feature map of a preset dimension for easy output to the next layer of the network.

[0035] Region proposals: These are all possible locations where an object can be located based on the input image. The output of a region proposal can be a list of bounding boxes representing possible locations of the object. Region proposals are also called region proposals or regions of interest.

[0036] Anchor: A coordinate box used in the detection algorithm to pre-anchor the possible location of the target.

[0037] The ground truth box (gt box) refers to the target box that actually exists in an image.

[0038] Operator: refers to the operation of mapping between function spaces.

[0039] Fully connected layers (FC): Each node in a fully connected layer is connected to all nodes in the previous layer, and can be used to integrate and classify previously extracted features. For example, in a CNN structure, after the convolutional and pooling layers, one or more fully connected layers are usually connected. Each neuron in a fully connected layer is connected to all neurons in the previous layer to integrate the local information with category distinction in the convolutional or pooling layer. The activation function of the fully connected layer usually uses the ReLU function. The output value of the last fully connected layer is used as the output of the entire fully connected network, and the softmax function can be used for classification.

[0040] Global average pooling (GOA) is a pooling operation performed on the entire feature map without using a filter size. After GOA, the feature map generates an output value, which is then used by the fully connected layer. This can save many parameters during the learning process and reduce computational complexity.

[0041] Figure 1 : is a schematic diagram of the framework of CNN applied to target detection in one embodiment of the present application. Figure 1 As shown in the figure, the CNN framework can include the following four parts: convolutional layer network, RPN network, RoI pooling layer and fully connected layer network.

[0042] The convolutional layer network may include one or more convolutional layers for extracting image features. Its input is the image to be processed, and its output is the extracted features, i.e., a feature map. The RPN network is used to receive the feature map output by the last convolutional layer, process the input image, and output multiple suggested regions. Each suggested region may include a target score and the target's frame coordinates. As an example, the above-mentioned targets may include faces, human bodies, vehicles, buildings, etc.

[0043] The RoI pooling layer receives the set of proposed regions output by the RPN network and converts the input of different sizes into a vector of preset length for output. The fully connected layer outputs the category to which the proposed region belongs and the precise location of the proposed region in the image.

[0044] It should be understood that Figure 1 The description of the framework is only for example and not for limitation. In practice, appropriate deformation and addition and subtraction can be made on the basis of the above framework, and it is still applicable to the solution of the embodiment of the present application.

[0045] To address the above technical issues in the prior art, the present application proposes a method and apparatus for processing images based on proposed regions. This method enables multi-task target detection and target feature detection, i.e., it uses a single algorithm model to simultaneously perform target detection and target feature detection. For example, simultaneous face detection and facial feature point localization not only reduces the storage space occupied by the algorithm library, but also requires only a single end-to-end computation to achieve target detection and target feature detection, saving computation time and resources.

[0046] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0047] Figure 2 This is a schematic diagram of the framework structure of the algorithm of an embodiment of the present application. Figure 2 As shown, the image to be processed can be input into a convolutional network for processing. The convolutional network may include one or more convolutional layers, with the last convolutional layer outputting a first feature map. The RPN network receives and processes this first feature map, outputting a set of proposed regions. RoI pooling is then performed on the multiple proposed regions to obtain a second feature map. This second feature map is input into a fully connected (FC) network to obtain the final output.

[0048] In the training process of the fully connected layer network, in addition to the target score and the target frame coordinates, the embodiment of the present application also adds training of the target's feature information. For example, the target feature information training may include training on the coordinates of the feature points of the face, training on the age of the face, training on whether the face is wearing accessories, etc. This allows target detection and target feature detection to be implemented in a single algorithm. Optionally, the above-mentioned fully connected layer network may include one or more fully connected layers.

[0049] The algorithm for the feature points output by the RPN network is relatively accurate, that is, the target frame coordinates ultimately output by the RPN network are accurate. However, the result of the target feature information obtained by regressing the feature points using the RPN network is jittery, because the coordinates of the target frame that the RPN network relies on when performing feature point regression internally are anchors, and the anchors are not accurate. In an embodiment of the present application, based on the relatively accurate target frame coordinates output by the RPN network, a fully connected layer network is used to regress the feature points, so that more accurate target feature information can be obtained, and target detection and target feature detection are achieved through an algorithm model, which can reduce the size and calculation time occupied by the algorithm library.

[0050] Figure 3 FIG. 1 is a flow chart of a method for processing an image according to an embodiment of the present application. Figure 3 As shown, the method includes the following contents.

[0051] S301: Input the first feature map to be processed into the RPN network to obtain multiple proposed regions, each of which corresponds to: a target score and a target frame coordinate.

[0052] Optionally, the first feature map may be a feature map obtained by performing a convolution operation on the image to be processed. For example, the image to be processed may be input into a convolutional network to extract features and obtain a feature map. The convolutional network may include one or more convolutional layers, and the first feature map may refer to the feature map output by the last convolutional layer.

[0053] Optionally, the target may refer to any object requiring target detection, such as a face, a human body, an animal, a vehicle, a building, etc.

[0054] S302: Obtain a second feature map based on the multiple suggested regions, where the second feature map includes the multiple suggested regions.

[0055] Optionally, in part S302, the above-mentioned obtaining of a second feature map based on multiple suggested regions includes: mapping the position coordinates of the multiple suggested regions onto the first feature map; pooling the multiple suggested regions into the same size through the RoI pooling layer; and connecting the multiple suggested regions to obtain a second feature map.

[0056] For example, Figure 2 As shown in the figure, the size of the second feature map can be expressed as n*c*k*k, where n represents the number of objects, c represents the number of channels, and k*k represents the size of the pooled proposal regions. n, c, and k are all integers greater than 0.

[0057] S303: Input the second feature map into the fully connected layer network for processing to obtain an output result, which includes: the target score, target feature information, and the target frame coordinates.

[0058] For example, if the target is a face, the target feature information includes at least one of the following: the coordinates of facial feature points, the age of the face, and whether the face is wearing any accessories, such as whether the face is wearing a mask or makeup.

[0059] As an example, when the target is a human body, the target feature information may include the posture information of the human body. Alternatively, if the target is another object, the target feature information may be any form of feature information corresponding to the object.

[0060] Optionally, in part S303, the second feature map is input into the fully connected layer network for processing to obtain the following output result, including: mapping the second feature map to the first vector through the GAP operator; inputting the first vector into the fully connected layer network to obtain the output result.

[0061] The length of the first vector can be a preset length. After mapping the second feature map through the GAP operator, only one vector is obtained, and then the fully connected layer operation is performed based on the vector, which can save many parameters in the learning process and reduce computational complexity.

[0062] In the embodiments of this application, a method and apparatus for image processing based on region proposals are proposed. This method enables multi-task object detection and target feature detection, that is, it can simultaneously perform both object detection and target feature detection using a single algorithm model. This not only reduces the storage space occupied by the algorithm library, but also achieves both object detection and target feature detection in a single end-to-end computation, saving computation time and resources.

[0063] Figure 4 This is a schematic diagram of a specific flow chart of a method for processing an image according to another embodiment of the present application. Figure 4 The method for processing images in the embodiment of the present application is described by taking face recognition and facial feature point positioning as an example. Figure 4 As shown, the method includes the following contents.

[0064] S401: Input a first feature map to be processed into an RPN network, and obtain a plurality of suggested regions indicating possible faces output by the RPN network.

[0065] Optionally, the first feature map may be a feature map obtained after being processed by a convolution layer.

[0066] Each of the above-mentioned suggested regions may correspond to: a score of whether it is a face, and coordinates of a face frame.

[0067] S402: Map the position coordinates of the plurality of suggested regions onto the first feature map.

[0068] S403: Obtain a second feature map through the ROI pooling layer.

[0069] For example, the features of the above-mentioned multiple proposed regions can be unified into the same dimension and connected through the ROI pooling layer to obtain the second feature image.

[0070] S404: Map the second feature map to a first vector of a preset length through a GOA operator.

[0071] S405: Output the first vector to the fully connected layer network to obtain an output result, which includes: a score of whether it is a face, coordinates of facial feature points, and coordinates of a face frame.

[0072] Optionally, during the training process of the fully connected layer network, in addition to the coordinates of facial feature points, other types of facial feature information can be trained in the fully connected layer network, such as the age of the face, whether the face is wearing any accessories, etc. This allows for the implementation of both face detection and facial feature detection in a single algorithm.

[0073] In the embodiments of this application, a method and apparatus for image processing based on region proposals are proposed. This method enables multi-task object detection and target feature detection, that is, it can simultaneously perform both object detection and target feature detection using a single algorithm model. This not only reduces the storage space occupied by the algorithm library, but also achieves both object detection and target feature detection in a single end-to-end computation, saving computation time and resources.

[0074] Figure 5 Schematic diagram of the structure of the device 500 according to an embodiment of the present application. Figures 2 to 4 The method in .

[0075] like Figure 5 As shown, the apparatus 500 includes a first processing module 510, a second processing module 520, and a third processing module 530. The first processing module 510 is configured to input the first feature map to be processed into the RPN network to obtain a plurality of suggested regions, each of which corresponds to: a target score and a target frame coordinate; the second processing module 520 is configured to obtain a second feature map based on the plurality of suggested regions, the second feature map including the plurality of suggested regions; the third processing module 530 is configured to input the second feature map into a fully connected layer network for processing to obtain an output result, the output result including: a target score, target feature information, and a target frame coordinate.

[0076] During the training process of the fully connected layer network, in addition to the coordinates of facial feature points, other types of facial feature information can also be trained in the fully connected layer network, such as the age of the face. This allows for both face detection and facial feature detection to be implemented in a single algorithm.

[0077] In some examples, in terms of obtaining a second feature map based on multiple suggested regions, the second processing module 520 is specifically used to: map the position coordinates of the multiple suggested regions onto the first feature map; pool the multiple suggested regions into the same size through the RoI pooling layer; and connect the multiple suggested regions to obtain a second feature map.

[0078] In some examples, in terms of inputting the second feature map into the fully connected layer network for processing to obtain an output result, the third processing module 530 is specifically used to: map the second feature map to a first vector through a GAP operator; and input the first vector into the fully connected layer network to obtain an output result.

[0079] In some examples, the target is a human face, and the target feature information includes at least one of the following: coordinates of facial feature points, and the age corresponding to the face.

[0080] In the embodiments of this application, a method and apparatus for image processing based on region proposals are proposed. This method enables multi-task object detection and target feature detection, that is, it can simultaneously perform both object detection and target feature detection using a single algorithm model. This not only reduces the storage space occupied by the algorithm library, but also achieves both object detection and target feature detection in a single end-to-end computation, saving computation time and resources.

[0081] Figure 6 600 is a schematic diagram of the structure of an embodiment of the present application. The device 600 is used to perform the above Figures 2 to 4 The method in .

[0082] The apparatus 600 includes a processor 610, which is configured to execute computer programs or instructions stored in a memory 620, or read data stored in the memory 620, to perform the methods in the above method embodiments. Optionally, there are one or more processors 610.

[0083] Alternatively, as Figure 6 As shown, the device 600 further includes a memory 620, which is used to store computer programs or instructions and / or data. The memory 620 can be integrated with the processor 610, or can be separately provided. Optionally, there are one or more memories 620.

[0084] Alternatively, as Figure 6 As shown, the apparatus 600 further includes a communication interface 630, which is used to receive and / or send signals. For example, the processor 610 is used to control the communication interface 630 to receive and / or send signals.

[0085] Optionally, the device 600 is used to implement the above various method embodiments. Figures 2 to 4 method.

[0086] For example, the processor 610 is configured to execute a computer program or instruction stored in the memory 620 to implement the relevant operations of the above various method embodiments. For example, the processor 610 is configured to: input the first feature map to be processed into the RPN network to obtain multiple suggested regions, each suggested region corresponding to: a score of the target and the frame coordinates of the target; obtain a second feature map based on the multiple suggested regions, the second feature map including multiple suggested regions; input the second feature map into the fully connected layer network for processing to obtain an output result, the output result including: a score of the target, target feature information, and the frame coordinates of the target.

[0087] In some examples, in terms of obtaining a second feature map based on multiple suggested regions, the processor 610 is specifically used to: include: mapping the position coordinates of the multiple suggested regions onto the first feature map; pooling the multiple suggested regions into the same size through the RoI pooling layer; and connecting the multiple suggested regions to obtain a second feature map.

[0088] In some examples, in terms of inputting the second feature map into the fully connected layer network for processing to obtain an output result, the processor 610 is specifically used to: map the second feature map to a first vector through a GAP operator; and input the first vector into the fully connected layer network to obtain an output result.

[0089] In the training process of the fully connected layer network, in addition to the coordinates of the facial feature points, the fully connected layer network can also add training for other types of facial feature information, such as the age of the face. This allows the face detection and facial feature recognition to be implemented in one algorithm.

[0090] In some examples, the target is a human face, and the target feature information includes at least one of the following: coordinates of facial feature points, and the age corresponding to the face.

[0091] It should be pointed out that Figure 6 The device 600 in the figure may be a physical device or a component of a physical device (such as a chip), which is not limited here.

[0092] In an embodiment of the present application, a processor is a circuit with a signal processing capability. In one implementation, the processor may be a circuit with instruction reading and execution capability, such as a CPU, a microprocessor, a GPU (which may be understood as a microprocessor), or a DSP, etc.; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit may be fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration may be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it may also be a hardware circuit designed for artificial intelligence, which may be understood as an ASIC, such as an NPU, TPU, DPU, etc.

[0093] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0094] In addition, the various units in the above devices can be fully or partially integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a system-on-a-chip (SOC). The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the various units of the device. The type of the at least one processor can be different, for example, including a CPU and FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0095] Accordingly, the embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement Figures 2 to 4 The steps in the method.

[0096] Accordingly, the embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, causes the processor to implement Figures 2 to 4 The steps in the method.

[0097] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0098] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0099] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0101] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0102] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0103] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0104] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus comprising the aforementioned elements.

[0105] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for processing an image, characterized in that include: Input the first feature map to be processed into the RPN network to obtain multiple proposed regions, each of which corresponds to: the score of the target and the frame coordinates of the target; The target is a human face; Mapping the position coordinates of the plurality of suggested regions onto the first feature map; Pooling the multiple proposed regions into the same size through the RoI pooling layer; Connecting the multiple suggested regions to obtain a second feature map, where the second feature map includes the multiple suggested regions; The second feature map is input into a fully connected layer network for processing to obtain an output result, wherein the output result includes: a score of the target, target feature information, and a frame coordinate of the target.

2. The method according to claim 1, wherein Inputting the second feature map into a fully connected layer network for processing to obtain an output result includes: Mapping the second feature map to the first vector through a GAP operator; The first vector is input into the fully connected layer network to obtain the output result.

3. The method according to claim 1, wherein The target feature information includes at least one of the following: coordinates of facial feature points and the age corresponding to the face.

4. A device for processing an image, characterized in that include: A first processing module is configured to input the first feature map to be processed into an RPN network to obtain a plurality of proposed regions, each of which corresponds to: a score of the target and a frame coordinate of the target; The target is a human face; A second processing module, configured to map the position coordinates of the plurality of suggested areas onto the first feature map; Pooling the multiple proposed regions into the same size through an RoI pooling layer; connecting the multiple proposed regions to obtain a second feature map, wherein the second feature map includes the multiple proposed regions; The third processing module is used to input the second feature map into the fully connected layer network for processing to obtain an output result, where the output result includes: the target score, target feature information and the target frame coordinates.

5. The device according to claim 4, characterized in that In terms of inputting the second feature map into the fully connected layer network for processing to obtain the output result, the third processing module is specifically used to: map the second feature map to a first vector through a GAP operator; and input the first vector into the fully connected layer network to obtain the output result.

6. The device according to claim 4, characterized in that The target feature information includes at least one of the following: coordinates of facial feature points and the age corresponding to the face.

7. An electronic device comprising: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 3 when executed by a processor.

Citation Information

Patent Citations

  • Monocular image three-dimensional target detection method based on depth information estimation

    CN113436239A