WO2020134528A1 - Target detection method and related product - Google Patents

Target detection method and related product Download PDF

Info

Publication number
WO2020134528A1
WO2020134528A1 PCT/CN2019/114330 CN2019114330W WO2020134528A1 WO 2020134528 A1 WO2020134528 A1 WO 2020134528A1 CN 2019114330 W CN2019114330 W CN 2019114330W WO 2020134528 A1 WO2020134528 A1 WO 2020134528A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
target
type
area
overlap
Prior art date
Application number
PCT/CN2019/114330
Other languages
French (fr)
Chinese (zh)
Inventor
陈乐�
刘海军
顾鹏
Original Assignee
深圳云天励飞技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳云天励飞技术有限公司 filed Critical 深圳云天励飞技术有限公司
Publication of WO2020134528A1 publication Critical patent/WO2020134528A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features

Definitions

  • This application relates to the field of target detection technology, and in particular to a target detection method and related products.
  • NMS non-maximum suppression
  • the embodiments of the present application provide a target detection method and related products, which can reduce the number of iterations and reduce the calculation complexity.
  • the first aspect of the embodiments of the present application provides a target detection method, which is applied to an electronic device and includes:
  • Input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1;
  • the i-th frame is any frame whose mask is 1;
  • the mask of the i-th frame is set to 0.
  • a second aspect of an embodiment of the present application provides a target detection device, including:
  • An input unit configured to input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1;
  • a sorting unit configured to sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low;
  • the selection unit is used to set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0;
  • a determining unit configured to determine an overlapping area between the i-th frame and the target frame, and the i-th frame is any frame whose mask is 1;
  • the setting unit is configured to set the mask of the i-th frame to 0 when the overlapping area is greater than a preset threshold.
  • an embodiment of the present application provides an electronic device, including a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor,
  • the above program includes instructions for performing the steps in the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the first embodiment of the present application. Part or all of the steps described in one aspect.
  • an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to execute as implemented in the present application Examples of some or all of the steps described in the first aspect.
  • the computer program product may be a software installation package.
  • the image to be processed is obtained, and the image to be processed is input to a preset convolutional neural network to obtain M first-type frames, each of the first-type frames
  • the box corresponds to a score
  • M is an integer greater than 1
  • the M first-type boxes are sorted according to the order of the scores of each box in the M first-type boxes from high to low, and the mask of all boxes is set to 1, after sorting Select one of the M first-class boxes as the target box, set the mask of the target box to 0, determine the overlap area between the i-th box and the target box, and the i-th box is any box with a mask of 1,
  • the overlap area is greater than the preset threshold, set the mask of the i-th frame to 0.
  • some frames can be filtered out, which can reduce the number of iterations and reduce the computational complexity.
  • FIG. 1A is a schematic flowchart of an embodiment of a target detection method provided by an embodiment of the present application
  • FIG. 1B is a schematic diagram of a block provided by an embodiment of the present application.
  • FIG. 1C is a schematic diagram illustrating the overlapping area of the frame provided by the embodiment of the present application.
  • FIG. 2 is a schematic flowchart of another embodiment of a target detection method provided by an embodiment of the present application.
  • 3A is a schematic structural diagram of an embodiment of a target detection device provided by an embodiment of the present application.
  • FIG. 3B is a schematic structural diagram of another embodiment of a target detection device provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an embodiment of an electronic device provided by an embodiment of the present application.
  • the electronic device in the embodiment of the present application can be connected to multiple cameras, each camera can be used to capture video images, and each camera can have a corresponding position mark, or, there can be a The corresponding number.
  • cameras can be installed in public places, such as schools, museums, intersections, pedestrian streets, office buildings, garages, airports, hospitals, subway stations, stations, bus platforms, supermarkets, hotels, entertainment venues, and so on. After the camera captures the video image, the video image can be saved to the memory of the system where the electronic device is located. Multiple image libraries can be stored in the memory, and each image library can contain different video images of the same person. Of course, each image library can also be used to store video images of an area or video images taken by a specified camera.
  • each frame of video image captured by the camera corresponds to one piece of attribute information
  • the attribute information is at least one of the following: the shooting time of the video image, the position of the video image, and the attribute parameters of the video image ( Format, size, resolution, etc.), the number of the video image, and the character attributes of the video image.
  • the character characteristic attributes in the video image may include, but are not limited to: the number of characters in the video image, the position of the character, the angle value of the character, the age, the image quality, and so on.
  • the angle value information of the face image may be planned.
  • the above angle value information may include but is not limited to: horizontal Rotation angle value, pitch angle or inclination.
  • the dynamic face image data requires that the distance between the eyes is not less than 30 pixels, and more than 60 pixels is recommended.
  • the horizontal rotation angle value does not exceed ⁇ 30°, the pitch angle does not exceed ⁇ 20°, and the tilt angle does not exceed ⁇ 45°. It is recommended that the horizontal rotation angle value should not exceed ⁇ 15°, the pitch angle should not exceed ⁇ 10°, and the tilt angle should not exceed ⁇ 15°.
  • the image formats of the video images in the embodiments of the present application may include, but are not limited to: BMP, JPEG, JPEG2000, PNG, etc., the size of which may be between 10-30KB, each video image may also correspond to a shooting time, and shooting The camera's unified number of the video image, the link of the panoramic large image corresponding to the face image, and other information (the face image and the global image establish a characteristic correspondence file).
  • the requirements on the device are very low, and only a single camera capable of capturing RGB images or videos is needed to complete the data collection and point cloud generation, and then send the point cloud data and the original RGB images to the subsequent package.
  • Three-dimensional reconstruction of the scene can be achieved in the process.
  • the scene 3D reconstruction technology based on single camera depth of field prediction can be divided into: video stream acquisition, image preprocessing, depth feature extraction and scene depth map generation, depth map-based point cloud data generation, RGB image and point cloud data matching fusion, 3D Six modules are generated on the surface of the object. Among them, video stream acquisition, image pre-processing, RGB image matching with point cloud data, and 3D object surface generation technology are relatively mature. This application can optimize the method of generating point cloud data from the scene, greatly reducing its equipment and computing. Ability requirements.
  • FIG. 1A is a schematic flowchart of an embodiment of a target detection method provided by an embodiment of the present application.
  • the target detection method described in this embodiment includes the following steps:
  • the embodiment of the present application is applied to electronic equipment, specifically, it can be applied to target detection, and the image to be processed may be an image including a target, and the target may be at least one of the following: people, animals, license plates, vehicles, buildings Things, etc., are not limited here.
  • the image to be processed may be captured by a camera, and the image to be processed may be designated by a user or captured by the camera.
  • acquiring the target face image may include the following steps:
  • the environmental parameters may include at least one of the following: temperature, humidity, location, magnetic field interference intensity, weather, ambient light brightness, number of ambient light sources, etc., which are not limited herein.
  • the above environmental parameters can be collected by environmental sensors, which can be integrated into electronic devices.
  • the environmental sensor may be at least one of the following: a temperature sensor, a humidity sensor, a positioning device, a magnetic field detection sensor, a processor, an ambient light sensor, a color sensor, etc., which are not limited herein, for example, a temperature sensor may be used to detect temperature,
  • the humidity sensor can be used to detect humidity, the global positioning system GPS can be used to detect position, the magnetic field detection sensor can be used to detect magnetic field strength, and the processor can be used to obtain weather (for example, a weather APP is installed in an electronic device and obtained through the weather APP Weather), the ambient light sensor can be used to detect ambient brightness, the color sensor can be used to detect the number of ambient light sources, and so on.
  • the shooting parameters may be at least one of the following: exposure duration, shooting mode (such as seascape mode, desert mode, night scene mode, panorama mode, etc.), sensitivity ISO, focal length, object distance, aperture size, etc., here No limitation.
  • mapping relationship between the preset environmental parameters and the shooting parameters can also be pre-stored in the electronic device.
  • the following provides a mapping relationship between the environmental parameters and the shooting parameters, as follows:
  • the electronic device can obtain the target environmental parameters, and then, according to the mapping relationship between the preset environmental parameters and the shooting parameters, determine the target shooting parameters corresponding to the target environmental parameters, and shoot according to the target shooting parameters to obtain pending processing
  • the image in this way, can get an image suitable for the environment, improving the monitoring efficiency.
  • the above-mentioned preset convolutional neural network may be preset.
  • the electronic device can input the image to be processed into the preset convolutional neural network to obtain M first-type frames, and each first-type frame corresponds to a score.
  • the score can be understood as the probability that the corresponding frame has a target, the higher the score , The area where the frame is located is more likely to be the target.
  • the above M is an integer greater than 1.
  • two coordinates corresponding to the diagonal of each frame in the M first-type frames may be taken, and the two The coordinates are used to mark the frame.
  • FIG. 1B shows a box, the dotted line represents the diagonal of the box, and (x 0a , y 0a ), (x 1a , y 1a ) represents the two vertices corresponding to the diagonal .
  • the electronic device obtains the score of each frame in the M first-type frames, and sorts the M first-type frames according to the score of each frame in the M first-type frames. Specifically, The M first-type frames can be sorted in order from high to low.
  • mask is a mask.
  • selecting one frame from the M first-type frames after sorting as the target frame may be implemented as follows:
  • a frame with the highest score is selected from the M first-class frames after sorting as the target frame.
  • the electronic device may select the frame with the highest score from the sorted M first-class frames as the target frame.
  • the electronic device can calculate the overlapping area between the i-th frame and the target frame, specifically, the number of overlapping pixels between the two.
  • the i-th frame is any frame whose mask is 1,
  • any frame with a mask of 1 other than the target frame and the score ranking after the target frame in the M first-type frames may also be used.
  • the above-mentioned preset threshold can be set by the user or the system default.
  • the electronic device includes a vector register. After the above step 106, the electronic device may further include the following steps:
  • A2 Use the preset vector register to take a second-type frame of a preset dimension, where the second-type frame is a vector frame corresponding to the i-th frame;
  • A3. Calculate the target overlap area between the second type frame and the target frame using a vector operation method, and the target overlap area is a vector;
  • A5. Determine a preset comparison formula according to the target overlap area, the vector area, and the preset threshold, and set the corresponding mask of the second type frame to 0 according to the preset comparison formula.
  • the above-mentioned preset dimensions can be set by the user or the system default.
  • the electronic device may take 64/32/16 (related to the capabilities of the vector processor) second type frame through the vector register, that is, the preset dimension may be 64, 32 or 16, and the electronic device may use Set the vector register to take the second-type box of the preset dimension.
  • the second-type box is a vector box. Specifically, the vector box corresponding to the i-th box. Specifically, expand the parameters (such as area) of the i-th box ( Copy) is the preset dimension.
  • the black area represents the overlapping area between the two
  • 1, 2 are the coordinates of two vertices of one diagonal of a frame
  • 3, 4 are the other.
  • the coordinates of the two vertices of a diagonal line of the frame, based on the four vertices 1, 2, 3, and 4, the overlapping area between the two frames can be calculated.
  • the electronic device can determine the target overlap area between the second type frame and the target frame, and the target overlap area is a vector. Further, similarly, based on this principle, the vector area of the second type frame can be calculated, specifically , Calculate the vector area of the second type of box according to the following formula:
  • S B represents the vector area of the second type frame
  • (X 0B , Y 0B ) and (X 1B , Y 1B ) are the coordinates of two vertices of a diagonal line of the second type frame.
  • the electronic device determines a preset comparison formula according to the target overlap area, vector area, and preset threshold, and sets the mask of the i-th box to 0 according to the preset comparison formula.
  • calculating the area value of the target frame may be implemented as follows:
  • calculating the target overlapping area between the second type frame and the target frame using a vector operation method may be implemented as follows:
  • a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type box is mapped according to the preset comparison formula
  • the mask is set to 0, which can be implemented as follows:
  • the preset comparison formula is constructed as follows:
  • s a +S B -S overlap *thres, where s a is a vector and is obtained by scalar s a vectorization. Specifically, the area is expanded (copied) to a preset dimension, and the number of s a dimensions is S overlap has the same number of dimensions, where thres is the preset threshold, and S B represents the vector area of the second type of frame;
  • a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type box is mapped according to the preset comparison formula
  • the mask is set to 0, which can be implemented as follows:
  • the preset comparison formula is constructed as follows:
  • s a is a vector
  • the resulting scalar s a vector processing in particular, the area of the expanded (copied) as the default dimension, s a dimension number of S overlap
  • the number of dimensions is the same, where thres is the preset threshold, and S B represents the vector area of the second type of frame;
  • S overlap is compared with min(s a , S B )*thres, specifically: the k-th element of S overlap is compared with the corresponding k-th element in min(s a , S B )*thres, if If it is greater, the mask of the k-th element of the second type frame is set to 0, otherwise, the mask of the k-th element of the second type frame is kept at 1, and k is any element position in S overlap .
  • the frame can be Recorded as (x 0a , y 0a , x 1a , y 1a ), respectively corresponding to the coordinates of the upper left corner of the image and the coordinates of the lower right corner (you can default the coordinates of the point in the upper left corner of the image to (0,0)), each box corresponds
  • the mask is 1, the frame a (x 0a , y 0a , x 1a , y 1a ) with the highest score is obtained. If it cannot be obtained (the masks are all 0), the NMS is completed; if it can be obtained, the mask is set after it is taken Is 0, this box is the one that satisfies the condition is saved in the result, and the area s a of box a
  • the min situation is as follows:
  • the remaining frames are used in the non-maximum suppression operation to obtain at least one frame, and the area corresponding to the at least one frame is used as the target image.
  • NMS operation efficiency can also be improved.
  • the above steps may include the following steps after using the area corresponding to the at least one frame as the target image:
  • the mapping relationship between the distribution density of the preset feature points and the matching threshold may be pre-stored in the electronic device, and the preset database may also be established in advance, and the preset database includes at least one face image.
  • the electronic device can extract feature points from the target image to obtain a target feature point set. Based on the target feature point set, the target feature point distribution density of the target image can be determined.
  • the target feature point distribution density the target feature point set Number/area of the target image
  • the target matching threshold corresponding to the distribution density of the target feature points can be determined according to the above mapping relationship, and according to the target matching threshold, the target image can be searched in a preset database to obtain a match with the target image
  • a successful target object that is, when the matching value between the target image and the face image of the target object is greater than the target matching threshold, the two can be considered as a successful match.
  • the matching threshold can be dynamically adjusted to improve retrieval efficiency.
  • searching in a preset database according to the target matching threshold and the target image to obtain a target object successfully matched with the target image may include the following steps:
  • the electronic device can extract the contour of the target image to obtain the contour of the target periphery, and can match the target feature point set with the feature point set of the face image x to obtain the first matching value.
  • steps 102 and 103 may also be included between the above steps 102 and 103:
  • sorting the M first-type frames according to the score of each frame in the M first-type frames may be implemented as follows:
  • the N first-type frames are sorted according to the score of each of the N first-type frames.
  • the above-mentioned preset area value can be set by the user or the system default.
  • the image to be processed may be segmented first to obtain at least one target area, that is, an area where the target may be initially identified, and then determine the overlapping area of each frame in the M frames with at least one target area to obtain multiple overlaps Area, select the overlapping area greater than the preset area value from multiple overlapping areas to obtain N overlapping areas, and obtain N frames corresponding to the N overlapping areas, N is an integer less than or equal to M, so it can be reduced
  • the number of NMS operations in subsequent frames improves the speed of the operation and also improves the recognition accuracy.
  • the image to be processed is obtained, and the image to be processed is input into a preset convolutional neural network to obtain M first-type frames, each of which corresponds to one Score, M is an integer greater than 1, sort the M first-type frames according to the score of each frame in the M first-type frames from high to low, set all frame masks to 1, from the M after sorting Select a frame as the target frame in the first type of frame, set the mask of the target frame to 0, determine the overlap area between the i-th frame and the target frame, the i-th frame is any frame with a mask of 1, and the overlap area When it is greater than the preset threshold, the mask of the i-th box is set to 0.
  • some boxes can be filtered out, which can reduce the number of iterations and reduce the calculation complexity. Afterwards, you can select the mask with the highest score of 1 as the target frame from the remaining first-type frames, and repeat the above overlapping area filtering until the last target frame with the mask of 1 is taken out, which can reduce the NMS running time.
  • the method of the embodiments of the present application is first used to filter the frames, which can reduce the number of subsequent NMS operations. Compared with the traditional use of all frames for NMS operations, it can reduce the number of iterations. Reduced computational complexity and improved target detection efficiency.
  • FIG. 2 is a schematic flowchart of an embodiment of a target detection method provided by an embodiment of the present application.
  • the target detection method described in this embodiment includes the following steps:
  • the i-th frame is any frame whose mask is 1.
  • the preset vector register uses the preset vector register to take a second type frame of a preset dimension, where the second type frame is a vector frame corresponding to the i-th frame.
  • the image to be processed is obtained, and the image to be processed is input into a preset convolutional neural network to obtain M first-type frames, each of which corresponds to one Score, M is an integer greater than 1, sort the M first-type frames according to the score of each frame in the M first-type frames from high to low, set all frame masks to 1, from the M after sorting Select a frame as the target frame in the first type of frame, set the mask of the target frame to 0, determine the overlap area between the i-th frame and the target frame, the i-th frame is any frame with a mask of 1, and the overlap area
  • set the mask of the i-th box to 0 use the scalar register to calculate the area value of the target box, and use the preset vector register to take the second-type box of the preset dimension, the second-type box is the i-th box
  • the vector operation method uses the vector operation method to calculate the area value of the target box.
  • the target overlap area is a vector. Use the vector operation method to calculate the vector area of the second type box. According to the target overlap area, The vector area and the preset threshold determine the preset comparison formula, and set the corresponding mask of the second type of frame to 0 according to the preset comparison formula. During the target detection process, some frames can be filtered out, which can reduce the number of iterations. Reduced computational complexity.
  • FIG. 3 is a schematic structural diagram of an embodiment of a target detection device according to an embodiment of the present application.
  • the target detection device described in this embodiment includes: an acquisition unit 301, an input unit 302, a sorting unit 303, a selection unit 304, a determination unit 305, and a setting unit 306, as follows:
  • the obtaining unit 301 is used to obtain an image to be processed
  • the input unit 302 is configured to input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each of the first-type frames corresponds to a score, and M is an integer greater than 1;
  • the sorting unit 303 is configured to sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low;
  • the selection unit 304 is used to set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0;
  • the determining unit 305 is configured to determine an overlapping area between the i-th frame and the target frame, and the i-th frame is any frame whose mask is 1.
  • the setting unit 306 is configured to set the mask of the i-th frame to 0 when the overlapping area is greater than a preset threshold.
  • the image to be processed is acquired, and the image to be processed is input into a preset convolutional neural network to obtain M first-type frames, each of which corresponds to one Score, M is an integer greater than 1, sort the M first-type frames according to the score of each frame in the M first-type frames from high to low, set all frame masks to 1, from the M after sorting Select a frame as the target frame in the first type of frame, set the mask of the target frame to 0, determine the overlap area between the i-th frame and the target frame, the i-th frame is any frame with a mask of 1, and the overlap area When it is greater than the preset threshold, the mask of the i-th box is set to 0. During the target detection process, some boxes can be filtered out, which can reduce the number of iterations and reduce the calculation complexity.
  • the above obtaining unit 301 can be used to implement the method described in step 101 above
  • the input unit 302 can be used to implement the method described in step 102 above
  • the sorting unit 303 can be used to implement the method described in step 103 above
  • the selection unit 304 described above It can be used to implement the method described in step 104 above
  • the determination unit 305 can be used to implement the method described in step 105 above
  • the setting unit 306 can be used to implement the method described in step 106 above, and so on.
  • the sorting unit 303 is specifically configured to:
  • a frame with the highest score is selected from the M first-class frames after sorting as the target frame.
  • the electronic device includes a vector register.
  • FIG. 3B is another modified structure of the target detection device shown in FIG. 3A. Compared with FIG. 3A, it may further include: The method further includes: a calculation unit 307 and an execution unit 308, as follows:
  • the calculation unit 307 is configured to calculate the area value of the target frame using a scalar register
  • the obtaining unit 301 is configured to use the preset vector register to obtain a second type frame of a preset dimension, where the second type frame is a vector frame corresponding to the i-th frame;
  • the determining unit 305 is configured to calculate a target overlapping area between the second type frame and the target frame using a vector operation method, and the target overlapping area is a vector;
  • the calculation unit 307 is also used to calculate the vector area of the second type frame by using a vector operation method
  • the execution unit 308 is further configured to determine a preset comparison formula according to the target overlap area, the vector area and the preset threshold, and according to the preset comparison formula The corresponding mask is set to 0.
  • the calculation unit 307 is specifically configured to:
  • the area value, (x 0a, y 0a) , (x 1a, y 1a) two vertex coordinates of the target frame is a diagonal, s a of the target frame.
  • the execution unit 308 is specifically configured to:
  • a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type of frame is determined according to the preset comparison formula
  • the corresponding mask of is set to 0, and the execution unit 308 is specifically used to:
  • the preset comparison formula is constructed as follows:
  • a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type of frame is determined according to the preset comparison formula
  • the corresponding mask of is set to 0, and the determination unit is specifically used to:
  • the preset comparison formula is constructed as follows:
  • S overlap is compared with min(s a , S B )*thres, specifically: the k-th element of S overlap is compared with the corresponding k-th element in min(s a , S B )*thres, if If it is greater, the mask of the k-th element of the second type frame is set to 0, otherwise, the mask of the k-th element of the second type frame is kept at 1, and k is any element position in S overlap .
  • each program module of the target detection device in this embodiment may be specifically implemented according to the method in the above method embodiment, and the specific implementation process may refer to the related description of the above method embodiment, which will not be repeated here.
  • FIG. 4 is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present application.
  • the electronic device described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, such as a CPU; and memory 4000, the above input device 1000, output device 2000, processor 3000 and The memory 4000 is connected through a bus 5000.
  • the input device 1000 may specifically be a touch panel, physical buttons, or a mouse.
  • the above output device 2000 may specifically be a display screen.
  • the above-mentioned memory 4000 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the above memory 4000 is used to store a set of program codes, and the above input device 1000, output device 2000, and processor 3000 are used to call the program codes stored in the memory 4000, and perform the following operations:
  • the aforementioned processor 3000 is used for:
  • Input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1;
  • the i-th frame is any frame whose mask is 1;
  • the mask of the i-th frame is set to 0.
  • the image to be processed is acquired, and the image to be processed is input into a preset convolutional neural network to obtain M first-type frames, each of the first-type frames corresponds to a score , M is an integer greater than 1, and sort the M first-type frames according to the score of each frame in the M first-type frames from high to low, set all frame masks to 1, from the M Select a frame as the target frame in a type of frame, set the mask of the target frame to 0, and determine the overlap area between the i-th frame and the target frame.
  • the i-th frame is any frame whose mask is 1, and the overlap area is greater than
  • the mask of the i-th frame is set to 0.
  • some frames can be filtered out, which can reduce the number of iterations and reduce the calculation complexity.
  • the processor 3000 is specifically used to:
  • a frame with the highest score is selected from the M first-class frames after sorting as the target frame.
  • the electronic device includes a vector register
  • the processor 3000 is further specifically used to:
  • the target overlap area is a vector
  • a preset comparison formula is determined according to the target overlap area, the vector area, and the preset threshold, and the corresponding mask of the second type frame is set to 0 according to the preset comparison formula.
  • the processor 3000 is further specifically used to:
  • the area value, (x 0a, y 0a) , (x 1a, y 1a) two vertex coordinates of the target frame is a diagonal, s a of the target frame.
  • the processor 3000 is specifically used to:
  • a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type of frame is determined according to the preset comparison formula
  • the corresponding mask of is set to 0, and the above processor 3000 is specifically used for:
  • the preset comparison formula is constructed as follows:
  • a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type of frame is determined according to the preset comparison formula
  • the corresponding mask of is set to 0, and the above processor 3000 is specifically used for:
  • the preset comparison formula is constructed as follows:
  • S overlap is compared with min(s a , S B )*thres, specifically: the k-th element of S overlap is compared with the corresponding k-th element in min(s a , S B )*thres, if If it is greater, the mask of the k-th element of the second type frame is set to 0, otherwise, the mask of the k-th element of the second type frame is kept at 1, and k is any element position in S overlap .
  • An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, it includes some or all steps of any one of the target detection methods described in the foregoing method embodiments.
  • An embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to execute as described in the embodiment of the present application Part or all of the steps described in any target detection method.
  • the computer program product may be a software installation package.

Abstract

A target detection method and a related product. The method comprises: obtaining an image to be processed (101); inputting the image to be processed into a preset convolutional neural network to obtain M first-type frames, wherein each first-type frame corresponds to a score, and M is an integer greater than 1 (102); sorting the M first-type frames in the descending order of the scores of the M first-type frames (103); setting the mask of all the frames to be 1, selecting one of the sorted M first-type frames as a target frame, and setting the mask of the target frame to be 0 (104); determining an overlapping area between an ith frame and the target frame, wherein the ith frame is any one frame with the mask being 1 (105); and when the overlapping area is greater than a preset threshold, setting the mask of the ith frame to be 0 (106). By means of the method, the complexity of calculation can be reduced, and an NMS operation time can be shortened.

Description

目标检测方法及相关产品Target detection methods and related products
本申请要求于2018年12月29日提交中国专利局,申请号为201811645347.6、发明名称为“目标检测方法及相关产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application filed on December 29, 2018, with the application number 201811645347.6 and the invention titled "Target Detection Method and Related Products", the entire contents of which are incorporated by reference in this application.
技术领域Technical field
本申请涉及目标检测技术领域,具体涉及一种目标检测方法及相关产品。This application relates to the field of target detection technology, and in particular to a target detection method and related products.
背景技术Background technique
随着电子技术的快速发展,电子设备(如手机、平板电脑等)越来越智能化,例如,电子设备可以实现拍照,能够实现目标检测,但是,检测算法中,常采用非极大值抑制(non maximum suppression,NMS)方法滤除重叠的框(检测出来的一个物体,就是一个框)。而NMS算法由于其本身的迭代-遍历-消除的算法性质,需要逐个遍历,迭代次数多,且计算复杂度高。With the rapid development of electronic technology, electronic devices (such as mobile phones, tablet computers, etc.) are becoming more and more intelligent. For example, electronic devices can take pictures and realize target detection. However, non-maximum suppression is often used in detection algorithms The (non-maximum suppression (NMS) method) filters out overlapping frames (an object detected is a frame). However, due to its inherent iterative-traversal-elimination algorithmic nature, the NMS algorithm needs to be traversed one by one, with a large number of iterations and high computational complexity.
发明内容Summary of the invention
本申请实施例提供了一种目标检测方法及相关产品,可以减少迭代次数,降低计算复杂度。The embodiments of the present application provide a target detection method and related products, which can reduce the number of iterations and reduce the calculation complexity.
本申请实施例第一方面提供了一种目标检测方法,应用于电子设备,包括:The first aspect of the embodiments of the present application provides a target detection method, which is applied to an electronic device and includes:
获取待处理图像;Get the image to be processed;
将所述待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数;Input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1;
依据所述M个第一类框中每一框的得分从高到低顺序对所述M个第一类框进行排序;Sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low;
设置所有框mask为1,从排序后的所述M个第一类框中选取一个框作为目标框,所述目标框的mask置为0;Set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0;
确定第i个框与所述目标框之间的重叠面积,所述第i个框为任一mask为1的框;Determine the overlapping area between the i-th frame and the target frame, the i-th frame is any frame whose mask is 1;
在所述重叠面积大于预设阈值时,将所述第i个框的mask设置为0。When the overlapping area is greater than a preset threshold, the mask of the i-th frame is set to 0.
本申请实施例第二方面提供了一种目标检测装置,包括:A second aspect of an embodiment of the present application provides a target detection device, including:
获取单元,用于获取待处理图像;An acquisition unit for acquiring an image to be processed;
输入单元,用于将所述待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数;An input unit, configured to input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1;
排序单元,用于依据所述M个第一类框中每一框的得分从高到低顺序对所述M个第一类框进行排序;A sorting unit, configured to sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low;
选取单元,用于设置所有框mask为1,从排序后的所述M个第一类框中选取一个框作为目标框,所述目标框的mask置为0;The selection unit is used to set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0;
确定单元,用于确定第i个框与所述目标框之间的重叠面积,所述第i个框为任一mask为1的框;A determining unit, configured to determine an overlapping area between the i-th frame and the target frame, and the i-th frame is any frame whose mask is 1;
设置单元,用于在所述重叠面积大于预设阈值时,将所述第i个框的mask设置为0。The setting unit is configured to set the mask of the i-th frame to 0 when the overlapping area is greater than a preset threshold.
第三方面,本申请实施例提供一种电子设备,包括处理器、存储器以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行本申请实施例第一方面中的步骤的指令。In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, The above program includes instructions for performing the steps in the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面中所描述的部分或全部步骤。According to a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes the computer to execute the first embodiment of the present application. Part or all of the steps described in one aspect.
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to execute as implemented in the present application Examples of some or all of the steps described in the first aspect. The computer program product may be a software installation package.
实施本申请实施例,具备如下有益效果:The implementation of the embodiments of the present application has the following beneficial effects:
可以看出,通过本申请实施例所描述的目标检测方法及相关产品,获取待处理图像,将待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数,依据M个第一类框中每一框的得分从高到低顺序对M个第一类框进行排序,设置所有框mask为1,从排序后的M个第一类框中选取一个框作为目标框,目标框的mask置为0,确定第i个框与目标框之间的重叠面积,第i个框为任一mask为1的框,在重叠面积大于预设阈值时,将第i个框的mask设置为0,在目标检测过程中,可以过滤掉一些框,从而可以减少迭代次数,降低了计算复杂度。It can be seen that through the target detection method and related products described in the embodiments of the present application, the image to be processed is obtained, and the image to be processed is input to a preset convolutional neural network to obtain M first-type frames, each of the first-type frames The box corresponds to a score, M is an integer greater than 1, the M first-type boxes are sorted according to the order of the scores of each box in the M first-type boxes from high to low, and the mask of all boxes is set to 1, after sorting Select one of the M first-class boxes as the target box, set the mask of the target box to 0, determine the overlap area between the i-th box and the target box, and the i-th box is any box with a mask of 1, When the overlap area is greater than the preset threshold, set the mask of the i-th frame to 0. During the target detection process, some frames can be filtered out, which can reduce the number of iterations and reduce the computational complexity.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Those of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1A是本申请实施例提供的一种目标检测方法的实施例流程示意图;1A is a schematic flowchart of an embodiment of a target detection method provided by an embodiment of the present application;
图1B是本申请实施例提供的框的演示示意图;FIG. 1B is a schematic diagram of a block provided by an embodiment of the present application;
图1C是本申请实施例提供的框的重叠区域的演示示意图;FIG. 1C is a schematic diagram illustrating the overlapping area of the frame provided by the embodiment of the present application;
图2是本申请实施例提供的一种目标检测方法的另一实施例流程示意图;2 is a schematic flowchart of another embodiment of a target detection method provided by an embodiment of the present application;
图3A是本申请实施例提供的一种目标检测装置的实施例结构示意图;3A is a schematic structural diagram of an embodiment of a target detection device provided by an embodiment of the present application;
图3B是本申请实施例提供的另一种目标检测装置的实施例结构示意图;FIG. 3B is a schematic structural diagram of another embodiment of a target detection device provided by an embodiment of the present application;
图4是本申请实施例提供的一种电子设备的实施例结构示意图。4 is a schematic structural diagram of an embodiment of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
需要说明的是,本申请实施例中的电子设备可与多个摄像头连接,每一摄像头均可用于抓拍视频图像,每一摄像头均可有一个与之对应的位置标记,或 者,可有一个与之对应的编号。通常情况下,摄像头可设置在公共场所,例如,学校、博物馆、十字路口、步行街、写字楼、车库、机场、医院、地铁站、车站、公交站台、超市、酒店、娱乐场所等等。摄像头在拍摄到视频图像后,可将该视频图像保存到电子设备所在系统的存储器。存储器中可存储有多个图像库,每一图像库可包含同一人的不同视频图像,当然,每一图像库还可以用于存储一个区域的视频图像或者某个指定摄像头拍摄的视频图像。It should be noted that the electronic device in the embodiment of the present application can be connected to multiple cameras, each camera can be used to capture video images, and each camera can have a corresponding position mark, or, there can be a The corresponding number. Generally, cameras can be installed in public places, such as schools, museums, intersections, pedestrian streets, office buildings, garages, airports, hospitals, subway stations, stations, bus platforms, supermarkets, hotels, entertainment venues, and so on. After the camera captures the video image, the video image can be saved to the memory of the system where the electronic device is located. Multiple image libraries can be stored in the memory, and each image library can contain different video images of the same person. Of course, each image library can also be used to store video images of an area or video images taken by a specified camera.
进一步可选地,本申请实施例中,摄像头拍摄的每一帧视频图像均对应一个属性信息,属性信息为以下至少一种:视频图像的拍摄时间、视频图像的位置、视频图像的属性参数(格式、大小、分辨率等)、视频图像的编号和视频图像中的人物特征属性。上述视频图像中的人物特征属性可包括但不仅限于:视频图像中的人物个数、人物位置、人物角度值、年龄、图像质量等等。Further optionally, in the embodiment of the present application, each frame of video image captured by the camera corresponds to one piece of attribute information, and the attribute information is at least one of the following: the shooting time of the video image, the position of the video image, and the attribute parameters of the video image ( Format, size, resolution, etc.), the number of the video image, and the character attributes of the video image. The character characteristic attributes in the video image may include, but are not limited to: the number of characters in the video image, the position of the character, the angle value of the character, the age, the image quality, and so on.
进一步需要说明的是,每一摄像头采集的视频图像通常为动态人脸图像,因而,本申请实施例中可以对人脸图像的角度值信息进行规划,上述角度值信息可包括但不仅限于:水平转动角度值、俯仰角或者倾斜度。例如,可定义动态人脸图像数据要求两眼间距不小于30像素,建议60像素以上。水平转动角度值不超过±30°、俯仰角不超过±20°、倾斜角不超过±45°。建议水平转动角度值不超过±15°、俯仰角不超过±10°、倾斜角不超过±15°。例如,还可对人脸图像是否被其他物体遮挡进行筛选,通常情况下,饰物不应遮挡脸部主要区域,饰物如深色墨镜、口罩和夸张首饰等,当然,也有可能摄像头上面布满灰尘,导致人脸图像被遮挡。本申请实施例中的视频图像的图像格式可包括但不仅限于:BMP,JPEG,JPEG2000,PNG等等,其大小可以在10-30KB之间,每一视频图像还可以对应一个拍摄时间、以及拍摄该视频图像的摄像头统一编号、与人脸图像对应的全景大图的链接等信息(人脸图像和全局图像建立特点对应性关系文件)。It should be further noted that the video image collected by each camera is usually a dynamic face image. Therefore, in this embodiment of the present application, the angle value information of the face image may be planned. The above angle value information may include but is not limited to: horizontal Rotation angle value, pitch angle or inclination. For example, it can be defined that the dynamic face image data requires that the distance between the eyes is not less than 30 pixels, and more than 60 pixels is recommended. The horizontal rotation angle value does not exceed ±30°, the pitch angle does not exceed ±20°, and the tilt angle does not exceed ±45°. It is recommended that the horizontal rotation angle value should not exceed ±15°, the pitch angle should not exceed ±10°, and the tilt angle should not exceed ±15°. For example, you can also filter whether the face image is blocked by other objects. Generally, accessories should not cover the main area of the face. Accessories such as dark sunglasses, masks and exaggerated jewelry, of course, may also be covered with dust on the camera , Causing the face image to be blocked. The image formats of the video images in the embodiments of the present application may include, but are not limited to: BMP, JPEG, JPEG2000, PNG, etc., the size of which may be between 10-30KB, each video image may also correspond to a shooting time, and shooting The camera's unified number of the video image, the link of the panoramic large image corresponding to the face image, and other information (the face image and the global image establish a characteristic correspondence file).
本申请实施例,在设备上要求很低,仅需要能够拍摄RGB图像或视频的单个摄像头即可完成数据的采集与点云的生成,再将点云数据与原始RGB图像送 入后续封装好的流程中即可实现场景的三维重建。基于单摄像头景深预测的场景三维重建技术可分为:视频流获取、图像预处理、深度特征提取与场景深度图生成、基于深度图的点云数据生成、RGB图像与点云数据匹配融合、三维物体表面生成六个模块。其中视频流获取、图像预处理已经后面的RGB图像与点云数据匹配融合、三维物体表面生成技术相对成熟,本申请可优化从场景中生成点云数据的方法,大大降低了其对设备和计算能力的要求。In the embodiment of the present application, the requirements on the device are very low, and only a single camera capable of capturing RGB images or videos is needed to complete the data collection and point cloud generation, and then send the point cloud data and the original RGB images to the subsequent package. Three-dimensional reconstruction of the scene can be achieved in the process. The scene 3D reconstruction technology based on single camera depth of field prediction can be divided into: video stream acquisition, image preprocessing, depth feature extraction and scene depth map generation, depth map-based point cloud data generation, RGB image and point cloud data matching fusion, 3D Six modules are generated on the surface of the object. Among them, video stream acquisition, image pre-processing, RGB image matching with point cloud data, and 3D object surface generation technology are relatively mature. This application can optimize the method of generating point cloud data from the scene, greatly reducing its equipment and computing. Ability requirements.
请参阅图1A,为本申请实施例提供的一种目标检测方法的实施例流程示意图。本实施例中所描述的目标检测方法,包括以下步骤:Please refer to FIG. 1A, which is a schematic flowchart of an embodiment of a target detection method provided by an embodiment of the present application. The target detection method described in this embodiment includes the following steps:
101、获取待处理图像。101. Acquire an image to be processed.
其中,本申请实施例中,应用于电子设备,具体地,可以应用于目标检测,待处理图像可以为包括目标的图像,该目标可以为以下至少一种:人、动物、车牌、车、建筑物等等,在此不做限定。Among them, the embodiment of the present application is applied to electronic equipment, specifically, it can be applied to target detection, and the image to be processed may be an image including a target, and the target may be at least one of the following: people, animals, license plates, vehicles, buildings Things, etc., are not limited here.
其中,待处理图像可以由摄像头拍摄,上述待处理图像可以由用户指定或者由摄像头拍摄得到。The image to be processed may be captured by a camera, and the image to be processed may be designated by a user or captured by the camera.
可选地,上述步骤101,获取目标人脸图像,可以包括如下步骤:Optionally, in step 101 above, acquiring the target face image may include the following steps:
11、获取目标环境参数;11. Obtain target environmental parameters;
12、按照预设的环境参数与拍摄参数之间的映射关系,确定所述目标环境参数对应的目标拍摄参数;12. Determine the target shooting parameters corresponding to the target environment parameters according to the mapping relationship between the preset environment parameters and the shooting parameters;
13、依据所述目标拍摄参数进行拍摄,得到所述待处理图像。13. Shoot according to the target shooting parameters to obtain the image to be processed.
其中,本申请实施例中,环境参数可以包括以下至少一种:温度、湿度、位置、磁场干扰强度、天气、环境光亮度、环境光源数量等等,在此不做限定。上述环境参数可以由环境传感器采集,环境传感器可以集成到电子设备中。环境传感器可以为以下至少一种:温度传感器、湿度传感器、定位装置、磁场检测传感器、处理器、环境光传感器、颜色传感器等等,在此不做限定,例如,温度传感器可以用于检测温度,湿度传感器可以用于检测湿度,全球定位系统GPS可以用于检测位置,磁场检测传感器可以用于检测磁场强度,处理器可以 用于获取天气(例如,电子设备中安装天气APP,通过该天气APP获取天气),环境光传感器可以用于检测环境亮度,颜色传感器可以用于检测环境光源数量等等。In the embodiment of the present application, the environmental parameters may include at least one of the following: temperature, humidity, location, magnetic field interference intensity, weather, ambient light brightness, number of ambient light sources, etc., which are not limited herein. The above environmental parameters can be collected by environmental sensors, which can be integrated into electronic devices. The environmental sensor may be at least one of the following: a temperature sensor, a humidity sensor, a positioning device, a magnetic field detection sensor, a processor, an ambient light sensor, a color sensor, etc., which are not limited herein, for example, a temperature sensor may be used to detect temperature, The humidity sensor can be used to detect humidity, the global positioning system GPS can be used to detect position, the magnetic field detection sensor can be used to detect magnetic field strength, and the processor can be used to obtain weather (for example, a weather APP is installed in an electronic device and obtained through the weather APP Weather), the ambient light sensor can be used to detect ambient brightness, the color sensor can be used to detect the number of ambient light sources, and so on.
进一步地,拍摄参数可以为以下至少一种:曝光时长、拍摄模式(如海景模式、沙漠模式、夜景模式、全景模式等等)、感光度ISO、焦距、物距、光圈大小等等,在此不做限定。Further, the shooting parameters may be at least one of the following: exposure duration, shooting mode (such as seascape mode, desert mode, night scene mode, panorama mode, etc.), sensitivity ISO, focal length, object distance, aperture size, etc., here No limitation.
另外,电子设备中还可以预先存储预设的环境参数与拍摄参数之间的映射关系,如下提供一种环境参数与拍摄参数之间的映射关系,具体如下:In addition, the mapping relationship between the preset environmental parameters and the shooting parameters can also be pre-stored in the electronic device. The following provides a mapping relationship between the environmental parameters and the shooting parameters, as follows:
环境参数Environmental parameters 拍摄参数Shooting parameters
环境参数1 Environmental parameters 1 拍摄参数1 Shooting parameters 1
环境参数2 Environmental parameters 2 拍摄参数2 Shooting parameters 2
...... ......
环境参数nEnvironmental parameter n 拍摄参数nShooting parameters n
具体实现中,电子设备可以获取目标环境参数,进而,按照预设的环境参数与拍摄参数之间的映射关系,确定目标环境参数对应的目标拍摄参数,并依据目标拍摄参数进行拍摄,得到待处理图像,如此,可以得到与环境相宜的图像,提升了监控效率。In a specific implementation, the electronic device can obtain the target environmental parameters, and then, according to the mapping relationship between the preset environmental parameters and the shooting parameters, determine the target shooting parameters corresponding to the target environmental parameters, and shoot according to the target shooting parameters to obtain pending processing The image, in this way, can get an image suitable for the environment, improving the monitoring efficiency.
102、将所述待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数。102. Input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each of the first-type frames corresponds to a score, and M is an integer greater than 1.
其中,上述预设卷积神经网络可以预先设置。电子设备可以将待处理图像输入到预设卷积神经网络中,得到M个第一类框,每一第一类框对应一个得分,得分可以理解为对应的框存在目标的概率,得分越高,则框所在区域越有可能是目标,上述M为大于1的整数,具体实现中,可以取M个第一类框中每一框的对角线对应的2个坐标,并由该2个坐标用来标记框。如图1B所示,图1B示出了一个框,虚线表示该框的对角线,而(x 0a,y 0a)、(x 1a,y 1a)则表示该对角线对应的两个顶点。 Among them, the above-mentioned preset convolutional neural network may be preset. The electronic device can input the image to be processed into the preset convolutional neural network to obtain M first-type frames, and each first-type frame corresponds to a score. The score can be understood as the probability that the corresponding frame has a target, the higher the score , The area where the frame is located is more likely to be the target. The above M is an integer greater than 1. In a specific implementation, two coordinates corresponding to the diagonal of each frame in the M first-type frames may be taken, and the two The coordinates are used to mark the frame. As shown in FIG. 1B, FIG. 1B shows a box, the dotted line represents the diagonal of the box, and (x 0a , y 0a ), (x 1a , y 1a ) represents the two vertices corresponding to the diagonal .
103、依据所述M个第一类框中每一框的得分从高到低顺序对所述M个第一类框进行排序。103. Sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low.
具体实现中,电子设备获取对M个第一类框中每一框的的得分,并依据M个第一类框中每一框的得分对该M个第一类框进行排序,具体地,可以为得到由高到低的顺序对M个第一类框进行排序。In a specific implementation, the electronic device obtains the score of each frame in the M first-type frames, and sorts the M first-type frames according to the score of each frame in the M first-type frames. Specifically, The M first-type frames can be sorted in order from high to low.
104、设置所有框mask为1,从排序后的所述M个第一类框中选取一个框作为目标框,所述目标框的mask置为0。104. Set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0.
其中,本申请实施例中,mask为掩膜,当对一个图像设置mask=1时,该图像的所有像素点的像素值为1,当对一个图像中的某个像素点设置mask=1时,该像素点的像素值为1,电子设备可以从排序后的M个第一类框中选取任一框作为目标框,当然,该任一框不为排序的最后一个框,并设置所有框为mask=1,即所有框的像素点的像素值为1,以便于后续计算面积,在选取目标框之后,可以将目标框的mask设置为0,即目标框中所有像素点的像素值为0。In the embodiment of the present application, mask is a mask. When mask=1 is set for an image, the pixel value of all pixels of the image is 1, when mask=1 is set for a certain pixel in an image , The pixel value of the pixel is 1, and the electronic device can select any frame from the sorted M first-type frames as the target frame. Of course, this any frame is not the last frame in the sort, and set all the frames Is mask=1, that is, the pixel value of the pixels of all frames is 1, so that the area can be calculated later. After selecting the target frame, you can set the mask of the target frame to 0, that is, the pixel value of all pixels in the target frame 0.
可选地,上述步骤104,从排序后的所述M个第一类框中选取一个框作为目标框,可按照如下方式实施:Optionally, in the above step 104, selecting one frame from the M first-type frames after sorting as the target frame may be implemented as follows:
从排序后的所述M个第一类框中选取得分最高的一个框作为所述目标框。A frame with the highest score is selected from the M first-class frames after sorting as the target frame.
其中,电子设备可以从排序后的M个第一类框中选取得分最高的一个框作为目标框。Among them, the electronic device may select the frame with the highest score from the sorted M first-class frames as the target frame.
105、确定第i个框与所述目标框之间的重叠面积,所述第i个框为任一mask为1的框。105. Determine the overlapping area between the i-th frame and the target frame, where the i-th frame is any frame whose mask is 1.
其中,电子设备可以计算第i个框与目标框之间的重叠面积,具体地,可以计算两者之间重叠的像素点个数,上述第i个框为为任一mask为1的框,当然也可以为M个第一类框中除了目标框之外且得分排序在目标框之后的任一mask为1的框。The electronic device can calculate the overlapping area between the i-th frame and the target frame, specifically, the number of overlapping pixels between the two. The i-th frame is any frame whose mask is 1, Of course, any frame with a mask of 1 other than the target frame and the score ranking after the target frame in the M first-type frames may also be used.
106、在所述重叠面积大于预设阈值时,将所述第i个框的mask设置为0。106. When the overlapping area is greater than a preset threshold, set the mask of the i-th frame to 0.
其中,上述预设阈值可以用户自行设置或者系统默认。电子设备可以在重 叠面积大于预设阈值时,将第i个框的mask设置为0,则相当于过滤掉第i个框,反之,则可以保留第i个框,执行i=i+1,重复步骤105-步骤106,可以将剩余的框采用NMS进行去重处理,得到至少一个框,将该对应的区域为目标图像,即最终代表目标所在区域的图像。反之,在重叠面积小于预设阈值时,则可以保留第i框的mask为1。The above-mentioned preset threshold can be set by the user or the system default. The electronic device can set the mask of the i-th frame to 0 when the overlapping area is greater than the preset threshold, which is equivalent to filtering out the i-th frame, otherwise, the i-th frame can be retained and i=i+1 is executed, Repeating steps 105-106, the remaining frames can be deduplicated using NMS to obtain at least one frame, and the corresponding area is used as the target image, that is, the image that ultimately represents the area where the target is located. Conversely, when the overlap area is less than the preset threshold, the mask of the i-th box can be kept as 1.
可选地,所述电子设备包括矢量寄存器,在上述步骤106之后,还可以包括如下步骤:Optionally, the electronic device includes a vector register. After the above step 106, the electronic device may further include the following steps:
A1、用标量寄存器计算所述目标框的面积值;A1. Use the scalar register to calculate the area value of the target box;
A2、采用所述预设矢量寄存器取预设维度的第二类框,所述第二类框为所述第i个框对应的矢量框;A2. Use the preset vector register to take a second-type frame of a preset dimension, where the second-type frame is a vector frame corresponding to the i-th frame;
A3、用矢量运算方法计算所述第二类框与所述目标框之间的目标重叠面积,所述目标重叠面积为一矢量;A3. Calculate the target overlap area between the second type frame and the target frame using a vector operation method, and the target overlap area is a vector;
A4、用矢量运算方法计算所述第二类框的矢量面积;A4. Calculate the vector area of the frame of the second type using a vector operation method;
A5、根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0。A5. Determine a preset comparison formula according to the target overlap area, the vector area, and the preset threshold, and set the corresponding mask of the second type frame to 0 according to the preset comparison formula.
其中,上述预设维度可以由用户自行设置或者系统默认。本申请实施例中,电子设备可以通过矢量寄存器取64/32/16(跟矢量处理器的能力相关)个第二类框,即预设维度可以为64或者32或者16,电子设备可以采用预设矢量寄存器取预设维度的第二类框,第二类框为一个矢量框,具体地,即第i个框对应的矢量框,具体地,将第i框的参数(如面积)拓展(复制)为预设维度。The above-mentioned preset dimensions can be set by the user or the system default. In the embodiment of the present application, the electronic device may take 64/32/16 (related to the capabilities of the vector processor) second type frame through the vector register, that is, the preset dimension may be 64, 32 or 16, and the electronic device may use Set the vector register to take the second-type box of the preset dimension. The second-type box is a vector box. Specifically, the vector box corresponding to the i-th box. Specifically, expand the parameters (such as area) of the i-th box ( Copy) is the preset dimension.
针对重叠面积的理解,如图1C所示,图1C中,黑色区域代表两者之间的重叠区域,1、2为一个框的一条对角线的两个顶点坐标,3、4为另一个框的一条对角线的两个顶点坐标,基于该1、2、3、4四个顶点可以计算两个框之间的重叠面积。For the understanding of the overlapping area, as shown in FIG. 1C, in FIG. 1C, the black area represents the overlapping area between the two, 1, 2 are the coordinates of two vertices of one diagonal of a frame, and 3, 4 are the other. The coordinates of the two vertices of a diagonal line of the frame, based on the four vertices 1, 2, 3, and 4, the overlapping area between the two frames can be calculated.
进一步地,电子设备可以确定第二类框与目标框之间的目标重叠面积,目 标重叠面积为一矢量,进一步地,类似地,基于此原理,可以计算第二类框的矢量面积,具体地,按照如下公式计算第二类框的矢量面积:Further, the electronic device can determine the target overlap area between the second type frame and the target frame, and the target overlap area is a vector. Further, similarly, based on this principle, the vector area of the second type frame can be calculated, specifically , Calculate the vector area of the second type of box according to the following formula:
其中,S B表示第二类框的矢量面积,(X 0B,Y 0B)、(X 1B,Y 1B)为所述第二类框的一条对角线的两个顶点坐标。 Where, S B represents the vector area of the second type frame, and (X 0B , Y 0B ) and (X 1B , Y 1B ) are the coordinates of two vertices of a diagonal line of the second type frame.
进一步地,电子设备根据目标重叠面积、矢量面积与预设阈值确定预设比对公式,并依据预设比对公式将第i个框的mask设置为0。Further, the electronic device determines a preset comparison formula according to the target overlap area, vector area, and preset threshold, and sets the mask of the i-th box to 0 according to the preset comparison formula.
可选地,上述步骤A1,计算所述目标框的面积值,可以按照如下方式实施:Optionally, in the above step A1, calculating the area value of the target frame may be implemented as follows:
按照如下公式计算所述目标框的面积值:Calculate the area value of the target frame according to the following formula:
其中,(x 0a,y 0a)、(x 1a,y 1a)为所述目标框的一条对角线的两个顶点坐标,s a为所述目标框的面积值,为一标量+。 Where, (x 0a, y 0a) , (x 1a, y 1a) of the target frame coordinates of two vertices of a diagonal line, s a frame area of the target value is a scalar +.
可选地,上述步骤A3,用矢量运算方法计算所述第二类框与所述目标框之间的目标重叠面积,可以按照如下方式实施:Optionally, in the above step A3, calculating the target overlapping area between the second type frame and the target frame using a vector operation method may be implemented as follows:
按照如下公式计算所述第二类框与所述目标框之间的目标重叠面积:Calculate the target overlap area between the second type frame and the target frame according to the following formula:
其中,(x 0a,y 0a)、(x 1a,y 1a)为所述目标框的一条对角线的两个顶点坐标,(X 0B,Y 0B)、(X 1B,Y 1B)为所述第二类框的一条对角线的两个顶点坐标,S overlap表示所述第二类框与所述目标框之间的目标重叠面积,结合图1C,(x 0a,y 0a)、(x 1a,y 1a)可以视作图1C中一个框的顶点,(X 0B,Y 0B)、(X 1B,Y 1B)可以视作图1C中另一个框的顶点,基于该4个顶点可以计算两个框之间的重叠面积。 Where (x 0a , y 0a ), (x 1a , y 1a ) are the coordinates of two vertices of a diagonal line of the target frame, (X 0B , Y 0B ), (X 1B , Y 1B ) are all The two vertex coordinates of a diagonal line of the second type frame, S overlap represents the target overlap area between the second type frame and the target frame, combined with FIG. 1C, (x 0a , y 0a ), ( x 1a , y 1a ) can be regarded as the vertices of a box in Figure 1C, (X 0B , Y 0B ), (X 1B , Y 1B ) can be regarded as the vertices of another box in Figure 1C, based on the four vertices Calculate the area of overlap between the two boxes.
可选地,上述步骤A5,根据所述目标重叠面积、所述矢量面积与所述预设 阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0,可以按照如下方式实施:Optionally, in the above step A5, a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type box is mapped according to the preset comparison formula The mask is set to 0, which can be implemented as follows:
构建所述预设对比公式,如下:The preset comparison formula is constructed as follows:
(s a+S B-S overlap)*thres,其中,s a为矢量,且由标量s a矢量化处理得到,具体地,将面积拓展(复制)为预设维度,s a的维度数量与S overlap的维度数量相同,其中,thres为所述预设阈值,S B表示所述第二类框的矢量面积; (s a +S B -S overlap )*thres, where s a is a vector and is obtained by scalar s a vectorization. Specifically, the area is expanded (copied) to a preset dimension, and the number of s a dimensions is S overlap has the same number of dimensions, where thres is the preset threshold, and S B represents the vector area of the second type of frame;
将S overlap与(s a+S B-S overlap)*thres进行比较,具体为:将S overlap的第j个元素与(s a+S B-S overlap)*thres(s a+S B-S overlap)*thres中对应的第j个元素进行比对,若大于,则将第二类框的第j个元素的mask设置为0,反之,将所述第二类框的第j个元素的mask保持为1,j为S overlap中任一元素位置。 Compare S overlap with (s a +S B -S overlap )*thres, specifically: the jth element of S overlap and (s a +S B -S overlap )*thres(s a +S B- S overlap ) *thres The corresponding jth element is compared, if it is greater, the mask of the jth element of the second type frame is set to 0, otherwise, the jth element of the second type frame is set The mask of is kept at 1, and j is any element position in S overlap .
可选地,上述步骤A5,根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0,可以按照如下方式实施:Optionally, in the above step A5, a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type box is mapped according to the preset comparison formula The mask is set to 0, which can be implemented as follows:
构建所述预设对比公式,如下:The preset comparison formula is constructed as follows:
min(s a,S B)*thres,其中,s a为矢量,且由标量s a矢量化处理得到,具体地,将面积拓展(复制)为预设维度,s a的维度数量与S overlap的维度数量相同,其中,thres为所述预设阈值,S B表示所述第二类框的矢量面积; min (s a, S B) * thres, wherein, s a is a vector, and the resulting scalar s a vector processing, in particular, the area of the expanded (copied) as the default dimension, s a dimension number of S overlap The number of dimensions is the same, where thres is the preset threshold, and S B represents the vector area of the second type of frame;
S overlap与min(s a,S B)*thres进行比较,具体为:将S overlap的第k个元素与min(s a,S B)*thres中对应的第k个元素进行比对,若大于,则将第二类框的第k个元素的mask设置为0,反之,将所述第二类框的第k个元素的mask保持为1,k为S overlap中任一元素位置。 S overlap is compared with min(s a , S B )*thres, specifically: the k-th element of S overlap is compared with the corresponding k-th element in min(s a , S B )*thres, if If it is greater, the mask of the k-th element of the second type frame is set to 0, otherwise, the mask of the k-th element of the second type frame is kept at 1, and k is any element position in S overlap .
举例说明下,对于任意框,如图1B所示,取图1B中的框的一对角线的两个顶点的坐标(x 0a,y 0a)、(x 1a,y 1a),则框可以记作(x 0a,y 0a,x 1a,y 1a),分别对应图像左上角的坐标和右下角的坐标(可以默认图像左上角的点的坐标为(0,0)),每个框对应一个得分,可以执行如下步 骤: For example, for any frame, as shown in FIG. 1B, taking the coordinates (x 0a , y 0a ) and (x 1a , y 1a ) of the two vertices of the diagonal line of the frame in FIG. 1B, the frame can be Recorded as (x 0a , y 0a , x 1a , y 1a ), respectively corresponding to the coordinates of the upper left corner of the image and the coordinates of the lower right corner (you can default the coordinates of the point in the upper left corner of the image to (0,0)), each box corresponds For a score, you can perform the following steps:
1、根据得分对M个框从大到小进行排序;1. Sort the M boxes from large to small according to the score;
2、针对每个框设置一个mask,初始化为1;2. Set a mask for each frame and initialize to 1;
3、取mask为1,得分最大的框a(x 0a,y 0a,x 1a,y 1a),如果不能取到(mask均为0),则NMS完成;如果能取到,取完后mask置为0,此框为满足条件的框保存在结果中,同时计算框a的面积s a 3. If the mask is 1, the frame a (x 0a , y 0a , x 1a , y 1a ) with the highest score is obtained. If it cannot be obtained (the masks are all 0), the NMS is completed; if it can be obtained, the mask is set after it is taken Is 0, this box is the one that satisfies the condition is saved in the result, and the area s a of box a
4、用矢量寄存器取64/32/16(跟矢量处理器的能力相关)个框B(X 0B,Y 0B,Y 1B,Y 1B),计算B与a的重叠面积S overlap,各个框B的面积S B4. Use the vector register to take 64/32/16 (related to the capabilities of the vector processor) box B (X 0B , Y 0B , Y 1B , Y 1B ), calculate the overlap area S overlap of B and a, each box B The area S B ;
注:上述S overlap、S B均为矢量。 Note: The above S overlap and S B are vectors.
5、判断是否满足预设阈值thres(将除法转换成乘法),未超过门限的mask置0;5. Determine whether the preset threshold thres is met (convert division to multiplication), and the mask that does not exceed the threshold is set to 0;
可以采用如下两种比较方式,union和min,具体选哪种可以由用户自行决定。You can use the following two comparison methods, union and min, the specific choice can be determined by the user.
union情况如下:The union situation is as follows:
矢量比较S overlap和(s a+S B-S overlap)*thres; Vector comparison S overlap and (s a +S B -S overlap )*thres;
若S overlap中某一个元素大于(s a+S B-S overlap)*thres中对应的元素,则对应的框中该元素对应位置设置mask为0,反之,则对应的框中该元素对应位置设置mask=1; If an element in S overlap is greater than the corresponding element in (s a +S B -S overlap )*thres, the corresponding position of the element in the corresponding frame is set to mask 0, otherwise, the corresponding position of the element in the corresponding frame Set mask=1;
min情况如下:The min situation is as follows:
矢量比较S overlap和min(s a,S B)*thres; Vector comparison S overlap and min(s a , S B )*thres;
若S overlap中某一个元素大于大于min(s a,S B)*thres,则对应的框中该元素对应位置设置mask为0,反之,则对应的框中该元素对应位置设置mask=1; If an element in S overlap is greater than min(s a , S B )*thres, the corresponding position of the element in the corresponding frame is set to mask 0, otherwise, the corresponding position of the element in the corresponding frame is set to mask=1;
6、重复4和5,直到把a以后的所有的框都遍历完;6. Repeat 4 and 5 until all the frames after a are traversed;
7、回到步骤3。7. Return to step 3.
可选地,上述步骤106之后,还可以包括如下步骤:Optionally, after the above step 106, the following steps may also be included:
将剩余的框用于非极大值抑制运算,得到至少一个框,将该至少一个框对应的区域作为目标图像。The remaining frames are used in the non-maximum suppression operation to obtain at least one frame, and the area corresponding to the at least one frame is used as the target image.
如此,通过减少框的数量,另外,还可以提升NMS运算效率。In this way, by reducing the number of frames, in addition, NMS operation efficiency can also be improved.
进一步可选地,在上述目标图像包括人脸图像时,上述步骤,将该至少一个框对应的区域作为目标图像之后,还可以包括如下步骤:Further optionally, when the target image includes a face image, the above steps may include the following steps after using the area corresponding to the at least one frame as the target image:
B1、对所述目标图像进行特征点提取,得到目标特征点集;B1. Perform feature point extraction on the target image to obtain a target feature point set;
B2、依据所述目标特征点集,确定所述目标图像的目标特征点分布密度;B2. Determine the distribution density of the target feature points of the target image according to the target feature point set;
B3、按照预设的特征点分布密度与匹配阈值之间的映射关系,确定所述目标特征点分布密度对应的目标匹配阈值;B3. Determine the target matching threshold corresponding to the target feature point distribution density according to the preset mapping relationship between the distribution density of the feature points and the matching threshold;
B4、依据所述目标匹配阈值以及所述目标图像在预设数据库中进行搜索,得到与所述目标图像匹配成功的目标对象。B4. Perform a search in a preset database according to the target matching threshold and the target image to obtain a target object that successfully matches the target image.
其中,电子设备中可以预先存储预设的特征点分布密度与匹配阈值之间的映射关系,预设数据库也可以事先建立,该预设数据库中包括至少一个人脸图像。具体实现中,电子设备可以对目标图像进行特征点提取,得到目标特征点集,依据该目标特征点集,可以确定目标图像的目标特征点分布密度,目标特征点分布密度=目标特征点集的数量/目标图像的面积,进一步地,可以依据上述映射关系确定目标特征点分布密度对应的目标匹配阈值,依据该目标匹配阈值,可以将目标图像在预设数据库中进行搜索,得到与目标图像匹配成功的目标对象,即目标图像与目标对象的人脸图像之间的匹配值大于目标匹配阈值时,则可以认为两者匹配成功,如此,可以动态调整匹配阈值,提高检索效率。Wherein, the mapping relationship between the distribution density of the preset feature points and the matching threshold may be pre-stored in the electronic device, and the preset database may also be established in advance, and the preset database includes at least one face image. In a specific implementation, the electronic device can extract feature points from the target image to obtain a target feature point set. Based on the target feature point set, the target feature point distribution density of the target image can be determined. The target feature point distribution density = the target feature point set Number/area of the target image, further, the target matching threshold corresponding to the distribution density of the target feature points can be determined according to the above mapping relationship, and according to the target matching threshold, the target image can be searched in a preset database to obtain a match with the target image A successful target object, that is, when the matching value between the target image and the face image of the target object is greater than the target matching threshold, the two can be considered as a successful match. In this way, the matching threshold can be dynamically adjusted to improve retrieval efficiency.
进一步地,上述步骤B4,依据所述目标匹配阈值以及所述目标图像在预设数据库中进行搜索,得到与所述目标图像匹配成功的目标对象,可包括如下步骤:Further, in the above step B4, searching in a preset database according to the target matching threshold and the target image to obtain a target object successfully matched with the target image may include the following steps:
B41、对所述目标图像进行轮廓提取,得到目标外围轮廓;B41. Perform contour extraction on the target image to obtain the peripheral contour of the target;
B42、将所述目标特征点集与人脸图像x的特征点集进行匹配,得到第一匹配值,所述人脸图像x为所述预设数据库中的任一人脸图像;B42. Match the target feature point set with the feature point set of the face image x to obtain a first matching value, and the face image x is any face image in the preset database;
B43、将所述目标外围轮廓与所述人脸图像x的外围轮廓进行匹配,得到第二匹配值;B43. Match the peripheral contour of the target with the peripheral contour of the face image x to obtain a second matching value;
B44、获取特征点集对应的第一权值,以及外围轮廓对应的第二权值;B44. Obtain the first weight value corresponding to the feature point set and the second weight value corresponding to the peripheral contour;
B45、依据所述第一匹配值、所述第二匹配值、所述第一权值和所述第二权值进行加权运算,得到目标匹配值;B45. Perform a weighted operation according to the first matching value, the second matching value, the first weight value, and the second weight value to obtain a target matching value;
B46、在所述目标匹配值大于所述目标匹配阈值时,确认所述人脸图像x为目标对象;B46. When the target matching value is greater than the target matching threshold, confirm that the face image x is a target object;
B47、在所述目标匹配值小于或等于所述目标匹配阈值时,确认所述人脸图像x不为所述目标对象。B47. When the target matching value is less than or equal to the target matching threshold, confirm that the face image x is not the target object.
其中,具体实现中,电子设备可以对目标图像进行轮廓提取,得到目标外围轮廓,可以将目标特征点集与人脸图像x的特征点集进行匹配,得到第一匹配值,上述人脸图像x为预设数据库中的任意人脸图像,可以将目标外围轮廓与人脸图像x的外围轮廓进行匹配,得到第二匹配值,获取特征点集对应的第一权值,以及外围轮廓对应的第二权值,该第一权值、第二权值均可以预先设置,第一权值+第二权值=1,进而,目标匹配值=第一匹配值*第一权值+第二匹配值*第二权值,在目标匹配值大于目标匹配阈值时,确认人脸图像x为目标对象,反之,在目标匹配值小于或等于目标匹配阈值时,确认人脸图像x不为目标对象,如此,可以更精准地实现人脸识别。Among them, in a specific implementation, the electronic device can extract the contour of the target image to obtain the contour of the target periphery, and can match the target feature point set with the feature point set of the face image x to obtain the first matching value. For any face image in the preset database, you can match the outer contour of the target with the outer contour of the face image x to obtain the second matching value, obtain the first weight corresponding to the feature point set, and the third corresponding to the outer contour Two weights, both the first weight and the second weight can be set in advance, the first weight + the second weight = 1, and further, the target matching value = the first matching value * the first weight + the second matching Value*second weight value, when the target matching value is greater than the target matching threshold, confirm that the face image x is the target object, otherwise, when the target matching value is less than or equal to the target matching threshold, confirm that the face image x is not the target object, In this way, face recognition can be realized more accurately.
可选地,在上述步骤102与步骤103之间还可以包括如下步骤:Optionally, the following steps may also be included between the above steps 102 and 103:
C1、对所述待处理图像进行图像分割,得到至少一个目标区域;C1. Perform image segmentation on the image to be processed to obtain at least one target area;
C2、确定所述M个框中每一框与所述至少一个目标区域的重叠面积,得到多个重叠面积;C2. Determine the overlapping area of each frame of the M frames and the at least one target area to obtain multiple overlapping areas;
C3、从所述多个重叠面积中选取大于预设面积值的重叠面积,得到N个重 叠面积,并获取该N个重叠面积对应的N个框,N为小于或等于所述M的整数;C3. Select an overlapping area greater than a preset area value from the plurality of overlapping areas to obtain N overlapping areas, and obtain N frames corresponding to the N overlapping areas, where N is an integer less than or equal to the M;
则上述步骤103,依据所述M个第一类框中每一框的得分,对所述M个第一类框进行排序,可以按照如下方式实施:Then, in the above step 103, sorting the M first-type frames according to the score of each frame in the M first-type frames may be implemented as follows:
依据所述N个第一类框中每一框的得分,对所述N个第一类框进行排序。The N first-type frames are sorted according to the score of each of the N first-type frames.
其中,上述预设面积值可以由用户自行设置或者系统默认。具体实现中,可以先对待处理图像进行图像分割,得到至少一个目标区域,即初步识别目标可能存在的区域,再确定M个框中每一框与至少一个目标区域的重叠面积,得到多个重叠面积,从多个重叠面积中选取大于预设面积值的重叠面积,得到N个重叠面积,并获取该N个重叠面积对应的N个框,N为小于或等于M的整数,如此,可以减少后续框进行NMS运算的数量,提升了运算速度,也提升了识别精度。Among them, the above-mentioned preset area value can be set by the user or the system default. In a specific implementation, the image to be processed may be segmented first to obtain at least one target area, that is, an area where the target may be initially identified, and then determine the overlapping area of each frame in the M frames with at least one target area to obtain multiple overlaps Area, select the overlapping area greater than the preset area value from multiple overlapping areas to obtain N overlapping areas, and obtain N frames corresponding to the N overlapping areas, N is an integer less than or equal to M, so it can be reduced The number of NMS operations in subsequent frames improves the speed of the operation and also improves the recognition accuracy.
可以看出,通过本申请实施例所描述的目标检测方法,获取待处理图像,将待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数,依据M个第一类框中每一框的得分从高到低顺序对M个第一类框进行排序,设置所有框mask为1,从排序后的M个第一类框中选取一个框作为目标框,目标框的mask置为0,确定第i个框与目标框之间的重叠面积,第i个框为任一mask为1的框,在重叠面积大于预设阈值时,将第i个框的mask设置为0,在目标检测过程中,可以过滤掉一些框,从而可以减少迭代次数,降低了计算复杂度。之后还可以再从剩下的第一类框中选取mask为1且得分最高的作为目标框,重复上述重叠面积过滤,直至取出最后一个mask为1的目标框,可以缩减NMS运行时间。It can be seen that, through the target detection method described in the embodiments of the present application, the image to be processed is obtained, and the image to be processed is input into a preset convolutional neural network to obtain M first-type frames, each of which corresponds to one Score, M is an integer greater than 1, sort the M first-type frames according to the score of each frame in the M first-type frames from high to low, set all frame masks to 1, from the M after sorting Select a frame as the target frame in the first type of frame, set the mask of the target frame to 0, determine the overlap area between the i-th frame and the target frame, the i-th frame is any frame with a mask of 1, and the overlap area When it is greater than the preset threshold, the mask of the i-th box is set to 0. During the target detection process, some boxes can be filtered out, which can reduce the number of iterations and reduce the calculation complexity. Afterwards, you can select the mask with the highest score of 1 as the target frame from the remaining first-type frames, and repeat the above overlapping area filtering until the last target frame with the mask of 1 is taken out, which can reduce the NMS running time.
另外,本申请实施例中,先采用本申请实施例的方法对框进行过滤,可以减少后续用于NMS运算的数量,相较于传统的直接将所有框用于NMS运算,可以减少迭代次数,降低了计算复杂度,提升了目标检测效率。In addition, in the embodiments of the present application, the method of the embodiments of the present application is first used to filter the frames, which can reduce the number of subsequent NMS operations. Compared with the traditional use of all frames for NMS operations, it can reduce the number of iterations. Reduced computational complexity and improved target detection efficiency.
与上述一致地,请参阅图2,为本申请实施例提供的一种目标检测方法的实施例流程示意图。本实施例中所描述的目标检测方法,包括以下步骤:Consistent with the above, please refer to FIG. 2, which is a schematic flowchart of an embodiment of a target detection method provided by an embodiment of the present application. The target detection method described in this embodiment includes the following steps:
201、获取待处理图像。201. Acquire an image to be processed.
202、将所述待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数。202. Input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1.
203、依据所述M个第一类框中每一框的得分从高到低顺序对所述M个第一类框进行排序。203. Sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low.
204、设置所有框mask为1,从排序后的所述M个第一类框中选取一个框作为目标框,所述目标框的mask置为0。204. Set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0.
205、确定第i个框与所述目标框之间的重叠面积,所述第i个框为任一mask为1的框。205. Determine the overlapping area between the i-th frame and the target frame. The i-th frame is any frame whose mask is 1.
206、在所述重叠面积大于预设阈值时,将所述第i个框的mask设置为0。206. When the overlapping area is greater than a preset threshold, set the mask of the i-th frame to 0.
207、用标量寄存器计算所述目标框的面积值。207. Calculate the area value of the target frame using a scalar register.
208、采用所述预设矢量寄存器取预设维度的第二类框,所述第二类框为所述第i个框对应的矢量框。208. Use the preset vector register to take a second type frame of a preset dimension, where the second type frame is a vector frame corresponding to the i-th frame.
209、用矢量运算方法计算所述第二类框与所述目标框之间的目标重叠面积,所述目标重叠面积为一矢量。209. Calculate the target overlap area between the second type frame and the target frame using a vector operation method, and the target overlap area is a vector.
210、用矢量运算方法计算所述第二类框的矢量面积。210. Use a vector operation method to calculate the vector area of the second type of box.
211、根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0。211. Determine a preset comparison formula according to the target overlap area, the vector area, and the preset threshold, and set the corresponding mask of the second type frame to 0 according to the preset comparison formula.
其中,上述步骤201-步骤211所描述的目标检测方法可参考图1A所描述的目标检测方法的对应步骤。For the target detection method described in the above steps 201-211, reference may be made to the corresponding steps of the target detection method described in FIG. 1A.
可以看出,通过本申请实施例所描述的目标检测方法,获取待处理图像,将待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数,依据M个第一类框中每一框的得分从高到低顺序对M个第一类框进行排序,设置所有框mask为1,从排序后的M个第一 类框中选取一个框作为目标框,目标框的mask置为0,确定第i个框与目标框之间的重叠面积,第i个框为任一mask为1的框,在重叠面积大于预设阈值时,将第i个框的mask设置为0,用标量寄存器计算目标框的面积值,采用预设矢量寄存器取预设维度的第二类框,第二类框为第i个框对应的矢量框,用矢量运算方法计算第二类框与目标框之间的目标重叠面积,目标重叠面积为一矢量,用矢量运算方法计算第二类框的矢量面积,根据目标重叠面积、矢量面积与预设阈值确定预设比对公式,并依据预设比对公式将第二类框的对应mask设置为0,在目标检测过程中,可以过滤掉一些框,从而可以减少迭代次数,降低了计算复杂度。It can be seen that, through the target detection method described in the embodiments of the present application, the image to be processed is obtained, and the image to be processed is input into a preset convolutional neural network to obtain M first-type frames, each of which corresponds to one Score, M is an integer greater than 1, sort the M first-type frames according to the score of each frame in the M first-type frames from high to low, set all frame masks to 1, from the M after sorting Select a frame as the target frame in the first type of frame, set the mask of the target frame to 0, determine the overlap area between the i-th frame and the target frame, the i-th frame is any frame with a mask of 1, and the overlap area When it is greater than the preset threshold, set the mask of the i-th box to 0, use the scalar register to calculate the area value of the target box, and use the preset vector register to take the second-type box of the preset dimension, the second-type box is the i-th box For the vector box corresponding to the box, use the vector operation method to calculate the target overlap area between the second type box and the target box. The target overlap area is a vector. Use the vector operation method to calculate the vector area of the second type box. According to the target overlap area, The vector area and the preset threshold determine the preset comparison formula, and set the corresponding mask of the second type of frame to 0 according to the preset comparison formula. During the target detection process, some frames can be filtered out, which can reduce the number of iterations. Reduced computational complexity.
与上述一致地,以下为实施上述目标检测方法的装置,具体如下:Consistent with the above, the following is a device for implementing the above target detection method, specifically as follows:
请参阅图3,为本申请实施例提供的一种目标检测装置的实施例结构示意图。本实施例中所描述的目标检测装置,包括:获取单元301、输入单元302、排序单元303、选取单元304、确定单元305和设置单元306,具体如下:Please refer to FIG. 3, which is a schematic structural diagram of an embodiment of a target detection device according to an embodiment of the present application. The target detection device described in this embodiment includes: an acquisition unit 301, an input unit 302, a sorting unit 303, a selection unit 304, a determination unit 305, and a setting unit 306, as follows:
获取单元301,用于获取待处理图像;The obtaining unit 301 is used to obtain an image to be processed;
输入单元302,用于将所述待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数;The input unit 302 is configured to input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each of the first-type frames corresponds to a score, and M is an integer greater than 1;
排序单元303,用于依据所述M个第一类框中每一框的得分从高到低顺序对所述M个第一类框进行排序;The sorting unit 303 is configured to sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low;
选取单元304,用于设置所有框mask为1,从排序后的所述M个第一类框中选取一个框作为目标框,所述目标框的mask置为0;The selection unit 304 is used to set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0;
确定单元305,用于确定第i个框与所述目标框之间的重叠面积,所述第i个框为任一mask为1的框;The determining unit 305 is configured to determine an overlapping area between the i-th frame and the target frame, and the i-th frame is any frame whose mask is 1.
设置单元306,用于在所述重叠面积大于预设阈值时,将所述第i个框的mask设置为0。The setting unit 306 is configured to set the mask of the i-th frame to 0 when the overlapping area is greater than a preset threshold.
可以看出,通过本申请实施例所描述的目标检测装置,获取待处理图像,将待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类 框对应一个得分,M为大于1的整数,依据M个第一类框中每一框的得分从高到低顺序对M个第一类框进行排序,设置所有框mask为1,从排序后的M个第一类框中选取一个框作为目标框,目标框的mask置为0,确定第i个框与目标框之间的重叠面积,第i个框为任一mask为1的框,在重叠面积大于预设阈值时,将第i个框的mask设置为0,在目标检测过程中,可以过滤掉一些框,从而可以减少迭代次数,降低了计算复杂度。It can be seen that, through the target detection device described in the embodiment of the present application, the image to be processed is acquired, and the image to be processed is input into a preset convolutional neural network to obtain M first-type frames, each of which corresponds to one Score, M is an integer greater than 1, sort the M first-type frames according to the score of each frame in the M first-type frames from high to low, set all frame masks to 1, from the M after sorting Select a frame as the target frame in the first type of frame, set the mask of the target frame to 0, determine the overlap area between the i-th frame and the target frame, the i-th frame is any frame with a mask of 1, and the overlap area When it is greater than the preset threshold, the mask of the i-th box is set to 0. During the target detection process, some boxes can be filtered out, which can reduce the number of iterations and reduce the calculation complexity.
其中,上述获取单元301可用于实现上述步骤101所描述的方法,输入单元302可用于实现上述步骤102所描述的方法,上述排序单元303可用于实现上述步骤103所描述的方法,上述选取单元304可用于实现上述步骤104所描述的方法,上述确定单元305可用于实现上述步骤105所描述的方法,上述设置单元306可用于实现上述步骤106所描述的方法,以下如此类推。The above obtaining unit 301 can be used to implement the method described in step 101 above, the input unit 302 can be used to implement the method described in step 102 above, the sorting unit 303 can be used to implement the method described in step 103 above, the selection unit 304 described above It can be used to implement the method described in step 104 above, the determination unit 305 can be used to implement the method described in step 105 above, the setting unit 306 can be used to implement the method described in step 106 above, and so on.
在一个可能的示例中,在所述从排序后的所述M个第一类框中选取一个框作为目标框方面,所述排序单元303具体用于:In a possible example, in terms of selecting one frame from the M first-class frames after sorting as the target frame, the sorting unit 303 is specifically configured to:
从排序后的所述M个第一类框中选取得分最高的一个框作为所述目标框。A frame with the highest score is selected from the M first-class frames after sorting as the target frame.
在一个可能的示例中,所述电子设备包括矢量寄存器,如图3B所示,图3B为图3A所示的目标检测装置的又一变型结构,其与图3A相比较,还可以包括:所述方法还包括:计算单元307和执行单元308,具体如下:In a possible example, the electronic device includes a vector register. As shown in FIG. 3B, FIG. 3B is another modified structure of the target detection device shown in FIG. 3A. Compared with FIG. 3A, it may further include: The method further includes: a calculation unit 307 and an execution unit 308, as follows:
计算单元307,用于用标量寄存器计算所述目标框的面积值;The calculation unit 307 is configured to calculate the area value of the target frame using a scalar register;
所述获取单元301,用于采用所述预设矢量寄存器取预设维度的第二类框,所述第二类框为所述第i个框对应的矢量框;The obtaining unit 301 is configured to use the preset vector register to obtain a second type frame of a preset dimension, where the second type frame is a vector frame corresponding to the i-th frame;
所述确定单元305,用于用矢量运算方法计算所述第二类框与所述目标框之间的目标重叠面积,所述目标重叠面积为一矢量;The determining unit 305 is configured to calculate a target overlapping area between the second type frame and the target frame using a vector operation method, and the target overlapping area is a vector;
所述计算单元307,还用于用矢量运算方法计算所述第二类框的矢量面积;The calculation unit 307 is also used to calculate the vector area of the second type frame by using a vector operation method;
所述执行单元308,还用于根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0。The execution unit 308 is further configured to determine a preset comparison formula according to the target overlap area, the vector area and the preset threshold, and according to the preset comparison formula The corresponding mask is set to 0.
在一个可能的示例中,在所述用标量寄存器计算所述目标框的面积值方面,所述计算单元307具体用于:In a possible example, in terms of using the scalar register to calculate the area value of the target frame, the calculation unit 307 is specifically configured to:
按照如下公式计算所述目标框的面积值:Calculate the area value of the target frame according to the following formula:
其中,(x 0a,y 0a)、(x 1a,y 1a)为所述目标框的一条对角线的两个顶点坐标,s a为所述目标框的面积值。 Wherein the area value, (x 0a, y 0a) , (x 1a, y 1a) two vertex coordinates of the target frame is a diagonal, s a of the target frame.
在一个可能的示例中,在所述用矢量运算方法计算所述所述第二类框与所述目标框之间的目标重叠面积方面,所述执行单元308具体用于:In a possible example, in terms of calculating the target overlapping area between the second-type frame and the target frame using a vector operation method, the execution unit 308 is specifically configured to:
按照如下公式计算所述第二类框与所述目标框之间的目标重叠面积:Calculate the target overlap area between the second type frame and the target frame according to the following formula:
其中,(X 0B,Y 0B)、(X 1B,Y 1B)为所述第二类框的一条对角线的两个顶点坐标,S overlap表示所述第二类框与所述目标框之间的目标重叠面积。 Where (X 0B , Y 0B ), (X 1B , Y 1B ) are the coordinates of two vertices of a diagonal line of the second type frame, and S overlap represents the difference between the second type frame and the target frame The target overlap area between.
在一个可能的示例中,在所述根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0方面,所述执行单元308具体用于:In a possible example, a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type of frame is determined according to the preset comparison formula The corresponding mask of is set to 0, and the execution unit 308 is specifically used to:
构建所述预设对比公式,如下:The preset comparison formula is constructed as follows:
(s a+S B-S overlap)*thres,其中,s a为矢量,且由s a矢量化处理得到,s a的维度数量与S overlap的维度数量相同,其中,thres为所述预设阈值,S B表示所述第二类框的矢量面积; (s a +S B -S overlap )*thres, where s a is a vector and is obtained by s a vectorization processing, the number of dimensions of s a is the same as the number of dimensions of S overlap , where thres is the preset the threshold value, S B denotes a vector area of the second frame type;
将S overlap与(s a+S B-S overlap)*thres进行比较,具体为:将S overlap的第j个元素与(s a+S B-S overlap)*thres中对应的第j个元素进行比对,若大于,则将第二类框的第j个元素的mask设置为0,反之,将所述第二类框的第j个元素的mask保持为1,j为S overlap中任一元素位置。 Compare S overlap with (s a +S B -S overlap )*thres, specifically: the jth element of S overlap and the corresponding jth element in (s a +S B -S overlap )*thres Comparing, if it is greater, set the mask of the jth element of the second type frame to 0, otherwise, keep the mask of the jth element of the second type frame to 1, and j is any of S overlap An element position.
在一个可能的示例中,在所述根据所述目标重叠面积、所述矢量面积与所 述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0方面,所述确定单元具体用于:In a possible example, a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type of frame is determined according to the preset comparison formula The corresponding mask of is set to 0, and the determination unit is specifically used to:
构建所述预设对比公式,如下:The preset comparison formula is constructed as follows:
min(s a,S B)*thres,其中,s a为矢量,且由s a矢量化处理得到,s a的维度数量与S overlap的维度数量相同,其中,thres为所述预设阈值,S B表示所述第二类框的矢量面积; min (s a, S B) * thres, wherein, a vector s a, and the process to obtain the vector s a, s a number of the same dimension and S overlap dimension, wherein, for the thres is a predetermined threshold value, S B represents the vector area of the second type of box;
S overlap与min(s a,S B)*thres进行比较,具体为:将S overlap的第k个元素与min(s a,S B)*thres中对应的第k个元素进行比对,若大于,则将第二类框的第k个元素的mask设置为0,反之,将所述第二类框的第k个元素的mask保持为1,k为S overlap中任一元素位置。 S overlap is compared with min(s a , S B )*thres, specifically: the k-th element of S overlap is compared with the corresponding k-th element in min(s a , S B )*thres, if If it is greater, the mask of the k-th element of the second type frame is set to 0, otherwise, the mask of the k-th element of the second type frame is kept at 1, and k is any element position in S overlap .
可以理解的是,本实施例的目标检测装置的各程序模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。It can be understood that the functions of each program module of the target detection device in this embodiment may be specifically implemented according to the method in the above method embodiment, and the specific implementation process may refer to the related description of the above method embodiment, which will not be repeated here.
与上述一致地,请参阅图4,为本申请实施例提供的一种电子设备的实施例结构示意图。本实施例中所描述的电子设备,包括:至少一个输入设备1000;至少一个输出设备2000;至少一个处理器3000,例如CPU;和存储器4000,上述输入设备1000、输出设备2000、处理器3000和存储器4000通过总线5000连接。Consistent with the above, please refer to FIG. 4, which is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present application. The electronic device described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, such as a CPU; and memory 4000, the above input device 1000, output device 2000, processor 3000 and The memory 4000 is connected through a bus 5000.
其中,上述输入设备1000具体可为触控面板、物理按键或者鼠标。The input device 1000 may specifically be a touch panel, physical buttons, or a mouse.
上述输出设备2000具体可为显示屏。The above output device 2000 may specifically be a display screen.
上述存储器4000可以是高速RAM存储器,也可为非易失存储器(non-volatile memory),例如磁盘存储器。上述存储器4000用于存储一组程序代码,上述输入设备1000、输出设备2000和处理器3000用于调用存储器4000中存储的程序代码,执行如下操作:The above-mentioned memory 4000 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. The above memory 4000 is used to store a set of program codes, and the above input device 1000, output device 2000, and processor 3000 are used to call the program codes stored in the memory 4000, and perform the following operations:
上述处理器3000,用于:The aforementioned processor 3000 is used for:
获取待处理图像;Get the image to be processed;
将所述待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数;Input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1;
依据所述M个第一类框中每一框的得分从高到低顺序对所述M个第一类框进行排序;Sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low;
设置所有框mask为1,从排序后的所述M个第一类框中选取一个框作为目标框,所述目标框的mask置为0;Set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0;
确定第i个框与所述目标框之间的重叠面积,所述第i个框为任一mask为1的框;Determine the overlapping area between the i-th frame and the target frame, the i-th frame is any frame whose mask is 1;
在所述重叠面积大于预设阈值时,将所述第i个框的mask设置为0。When the overlapping area is greater than a preset threshold, the mask of the i-th frame is set to 0.
可以看出,通过本申请实施例所描述的电子设备,获取待处理图像,将待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数,依据M个第一类框中每一框的得分从高到低顺序对M个第一类框进行排序,设置所有框mask为1,从排序后的M个第一类框中选取一个框作为目标框,目标框的mask置为0,确定第i个框与目标框之间的重叠面积,第i个框为任一mask为1的框,在重叠面积大于预设阈值时,将第i个框的mask设置为0,在目标检测过程中,可以过滤掉一些框,从而可以减少迭代次数,降低了计算复杂度。It can be seen that through the electronic device described in the embodiment of the present application, the image to be processed is acquired, and the image to be processed is input into a preset convolutional neural network to obtain M first-type frames, each of the first-type frames corresponds to a score , M is an integer greater than 1, and sort the M first-type frames according to the score of each frame in the M first-type frames from high to low, set all frame masks to 1, from the M Select a frame as the target frame in a type of frame, set the mask of the target frame to 0, and determine the overlap area between the i-th frame and the target frame. The i-th frame is any frame whose mask is 1, and the overlap area is greater than When the threshold is preset, the mask of the i-th frame is set to 0. During the target detection process, some frames can be filtered out, which can reduce the number of iterations and reduce the calculation complexity.
在一个可能的示例中,在所述从排序后的所述M个第一类框中选取一个框作为目标框方面,上述处理器3000具体用于:In a possible example, in terms of selecting one frame from the M first-class frames after sorting as the target frame, the processor 3000 is specifically used to:
从排序后的所述M个第一类框中选取得分最高的一个框作为所述目标框。A frame with the highest score is selected from the M first-class frames after sorting as the target frame.
在一个可能的示例中,所述电子设备包括矢量寄存器,上述处理器3000还具体用于:In a possible example, the electronic device includes a vector register, and the processor 3000 is further specifically used to:
用标量寄存器计算所述目标框的面积值;Calculate the area value of the target box with a scalar register;
采用所述预设矢量寄存器取预设维度的第二类框,所述第二类框为所述第i个框对应的矢量框;Adopting the preset vector register to take a second-type frame of a preset dimension, where the second-type frame is a vector frame corresponding to the i-th frame;
用矢量运算方法计算所述第二类框与所述目标框之间的目标重叠面积,所述目标重叠面积为一矢量;Calculate the target overlap area between the second type frame and the target frame using a vector operation method, the target overlap area is a vector;
用矢量运算方法计算所述第二类框的矢量面积;Use the vector operation method to calculate the vector area of the second type of box;
根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0。A preset comparison formula is determined according to the target overlap area, the vector area, and the preset threshold, and the corresponding mask of the second type frame is set to 0 according to the preset comparison formula.
在一个可能的示例中,在所述用标量寄存器计算所述目标框的面积值方面,上述处理器3000还具体用于:In a possible example, in terms of using the scalar register to calculate the area value of the target frame, the processor 3000 is further specifically used to:
按照如下公式计算所述目标框的面积值:Calculate the area value of the target frame according to the following formula:
其中,(x 0a,y 0a)、(x 1a,y 1a)为所述目标框的一条对角线的两个顶点坐标,s a为所述目标框的面积值。 Wherein the area value, (x 0a, y 0a) , (x 1a, y 1a) two vertex coordinates of the target frame is a diagonal, s a of the target frame.
在一个可能的示例中,在所述用矢量运算方法计算所述所述第二类框与所述目标框之间的目标重叠面积方面,上述处理器3000具体用于:In a possible example, in terms of calculating the target overlapping area between the second-type frame and the target frame using a vector operation method, the processor 3000 is specifically used to:
按照如下公式计算所述第二类框与所述目标框之间的目标重叠面积:Calculate the target overlap area between the second type frame and the target frame according to the following formula:
其中,(X 0B,Y 0B)、(X 1B,Y 1B)为所述第二类框的一条对角线的两个顶点坐标,S overlap表示所述第二类框与所述目标框之间的目标重叠面积。 Where (X 0B , Y 0B ), (X 1B , Y 1B ) are the coordinates of two vertices of a diagonal line of the second type frame, and S overlap represents the difference between the second type frame and the target frame The target overlap area between.
在一个可能的示例中,在所述根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0方面,上述处理器3000具体用于:In a possible example, a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type of frame is determined according to the preset comparison formula The corresponding mask of is set to 0, and the above processor 3000 is specifically used for:
构建所述预设对比公式,如下:The preset comparison formula is constructed as follows:
(s a+S B-S overlap)*thres,其中,s a为矢量,且由s a矢量化处理得到,s a的维度数量与S overlap的维度数量相同,其中,thres为所述预设阈值,S B表示所述第二类框的矢量面积; (s a +S B -S overlap )*thres, where s a is a vector and is obtained by s a vectorization processing, the number of dimensions of s a is the same as the number of dimensions of S overlap , where thres is the preset the threshold value, S B denotes a vector area of the second frame type;
将S overlap与(s a+S B-S overlap)*thres进行比较,具体为:将S overlap的第j个元素与(s a+S B-S overlap)*thres中对应的第j个元素进行比对,若大于,则将第二类框的第j个元素的mask设置为0,反之,将所述第二类框的第j个元素的mask保持为1,j为S overlap中任一元素位置。 Compare S overlap with (s a +S B -S overlap )*thres, specifically: the jth element of S overlap and the corresponding jth element in (s a +S B -S overlap )*thres Comparing, if it is greater, set the mask of the jth element of the second type frame to 0, otherwise, keep the mask of the jth element of the second type frame to 1, and j is any of S overlap An element position.
在一个可能的示例中,在所述根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0方面,上述处理器3000具体用于:In a possible example, a preset comparison formula is determined according to the target overlap area, the vector area and the preset threshold, and the second type of frame is determined according to the preset comparison formula The corresponding mask of is set to 0, and the above processor 3000 is specifically used for:
构建所述预设对比公式,如下:The preset comparison formula is constructed as follows:
min(s a,S B)*thres,其中,s a为矢量,且由s a矢量化处理得到,s a的维度数量与S overlap的维度数量相同,其中,thres为所述预设阈值,S B表示所述第二类框的矢量面积; min (s a, S B) * thres, wherein, a vector s a, and the process to obtain the vector s a, s a number of the same dimension and S overlap dimension, wherein, for the thres is a predetermined threshold value, S B represents the vector area of the second type of box;
S overlap与min(s a,S B)*thres进行比较,具体为:将S overlap的第k个元素与min(s a,S B)*thres中对应的第k个元素进行比对,若大于,则将第二类框的第k个元素的mask设置为0,反之,将所述第二类框的第k个元素的mask保持为1,k为S overlap中任一元素位置。 S overlap is compared with min(s a , S B )*thres, specifically: the k-th element of S overlap is compared with the corresponding k-th element in min(s a , S B )*thres, if If it is greater, the mask of the k-th element of the second type frame is set to 0, otherwise, the mask of the k-th element of the second type frame is kept at 1, and k is any element position in S overlap .
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种目标检测方法的部分或全部步骤。An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, it includes some or all steps of any one of the target detection methods described in the foregoing method embodiments.
本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例所记载的任何一种目标检测方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。An embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to execute as described in the embodiment of the present application Part or all of the steps described in any target detection method. The computer program product may be a software installation package.

Claims (10)

  1. 一种目标检测方法,其特征在于,应用于电子设备,所述方法包括:A target detection method is characterized in that it is applied to an electronic device, and the method includes:
    获取待处理图像;Get the image to be processed;
    将所述待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数;Input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1;
    依据所述M个第一类框中每一框的得分从高到低顺序对所述M个第一类框进行排序;Sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low;
    设置所有框mask为1,从排序后的所述M个第一类框中选取一个框作为目标框,所述目标框的mask置为0;Set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0;
    确定第i个框与所述目标框之间的重叠面积,所述第i个框为任一mask为1的框;Determine the overlapping area between the i-th frame and the target frame, the i-th frame is any frame whose mask is 1;
    在所述重叠面积大于预设阈值时,将所述第i个框的mask设置为0。When the overlapping area is greater than a preset threshold, the mask of the i-th frame is set to 0.
  2. 根据权利要求1所述的方法,其特征在于,所述从排序后的所述M个第一类框中选取一个框作为目标框,包括:The method according to claim 1, wherein the selecting one of the M first-type frames after sorting as the target frame includes:
    从排序后的所述M个第一类框中选取得分最高的一个框作为所述目标框。A frame with the highest score is selected from the M first-class frames after sorting as the target frame.
  3. 根据权利要求1或2所述的方法,其特征在于,所述电子设备包括矢量寄存器,所述方法还包括:The method according to claim 1 or 2, wherein the electronic device includes a vector register, and the method further includes:
    用标量寄存器计算所述目标框的面积值;Calculate the area value of the target box with a scalar register;
    采用所述预设矢量寄存器取预设维度的第二类框,所述第二类框为所述第i个框对应的矢量框;Adopting the preset vector register to take a second-type frame of a preset dimension, where the second-type frame is a vector frame corresponding to the i-th frame;
    用矢量运算方法计算所述第二类框与所述目标框之间的目标重叠面积,所述目标重叠面积为一矢量;Calculate the target overlap area between the second type frame and the target frame using a vector operation method, the target overlap area is a vector;
    用矢量运算方法计算所述第二类框的矢量面积;Use the vector operation method to calculate the vector area of the second type of box;
    根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0。A preset comparison formula is determined according to the target overlap area, the vector area, and the preset threshold, and the corresponding mask of the second type frame is set to 0 according to the preset comparison formula.
  4. 根据权利要求3所述的方法,其特征在于,所述用标量寄存器计算所述目标框的面积值,包括:The method according to claim 3, wherein the calculating the area value of the target frame using a scalar register includes:
    按照如下公式计算所述目标框的面积值:Calculate the area value of the target frame according to the following formula:
    其中,(x 0a,y 0a)、(x 1a,y 1a)为所述目标框的一条对角线的两个顶点坐标,s a为所述目标框的面积值。 Wherein the area value, (x 0a, y 0a) , (x 1a, y 1a) two vertex coordinates of the target frame is a diagonal, s a of the target frame.
  5. 根据权利要求4所述的方法,其特征在于,所述用矢量运算方法计算所述所述第二类框与所述目标框之间的目标重叠面积,包括:The method according to claim 4, wherein the calculation of the target overlapping area between the second type frame and the target frame using a vector operation method includes:
    按照如下公式计算所述第二类框与所述目标框之间的目标重叠面积:Calculate the target overlap area between the second type frame and the target frame according to the following formula:
    其中,(X 0B,Y 0B)、(X 1B,Y 1B)为所述第二类框的一条对角线的两个顶点坐标,S overlap表示所述第二类框与所述目标框之间的目标重叠面积。 Where (X 0B , Y 0B ), (X 1B , Y 1B ) are the coordinates of two vertices of a diagonal line of the second type frame, and S overlap represents the difference between the second type frame and the target frame The target overlap area between.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将所述第二类框的对应mask设置为0,包括:The method according to claim 5, characterized in that the predetermined comparison formula is determined according to the target overlap area, the vector area and the predetermined threshold, and according to the predetermined comparison formula The corresponding mask of the second type frame is set to 0, including:
    构建所述预设对比公式,如下:The preset comparison formula is constructed as follows:
    (s a+S B-S overlap)*thres,其中,s a为矢量,且由s a矢量化处理得到,s a的维度数量与S overlap的维度数量相同,其中,thres为所述预设阈值,S B表示所述第二类框的矢量面积; (s a +S B -S overlap )*thres, where s a is a vector and is obtained by s a vectorization processing, the number of dimensions of s a is the same as the number of dimensions of S overlap , where thres is the preset the threshold value, S B denotes a vector area of the second frame type;
    将S overlap与(s a+S B-S overlap)*thres进行比较,具体为:将S overlap的第j个元素与(s a+S B-S overlap)*thres中对应的第j个元素进行比对,若大于,则将第二类框的第j个元素的mask设置为0,反之,将所述第二类框的第j个元素的mask保持为1,j为S overlap中任一元素位置。 Compare S overlap with (s a +S B -S overlap )*thres, specifically: the jth element of S overlap and the corresponding jth element in (s a +S B -S overlap )*thres Comparing, if it is greater, set the mask of the jth element of the second type frame to 0, otherwise, keep the mask of the jth element of the second type frame to 1, and j is any of S overlap An element position.
  7. 根据权利要求5所述的方法,其特征在于,所述根据所述目标重叠面积、所述矢量面积与所述预设阈值确定预设比对公式,并依据所述预设比对公式将 所述第二类框的对应mask设置为0,包括:The method according to claim 5, characterized in that the predetermined comparison formula is determined according to the target overlap area, the vector area and the predetermined threshold, and according to the predetermined comparison formula The corresponding mask of the second type frame is set to 0, including:
    构建所述预设对比公式,如下:The preset comparison formula is constructed as follows:
    min(s a,S B)*thres,其中,s a为矢量,且由s a矢量化处理得到,s a的维度数量与S overlap的维度数量相同,其中,thres为所述预设阈值,S B表示所述第二类框的矢量面积; min (s a, S B) * thres, wherein, a vector s a, and the process to obtain the vector s a, s a number of the same dimension and S overlap dimension, wherein, for the thres is a predetermined threshold value, S B represents the vector area of the second type of box;
    S overlap与min(s a,S B)*thres进行比较,具体为:将S overlap的第k个元素与min(s a,S B)*thres中对应的第k个元素进行比对,若大于,则将第二类框的第k个元素的mask设置为0,反之,将所述第二类框的第k个元素的mask保持为1,k为S overlap中任一元素位置。 S overlap is compared with min(s a , S B )*thres, specifically: the k-th element of S overlap is compared with the corresponding k-th element in min(s a , S B )*thres, if If it is greater, the mask of the k-th element of the second type frame is set to 0, otherwise, the mask of the k-th element of the second type frame is kept at 1, and k is any element position in S overlap .
  8. 一种目标检测装置,其特征在于,包括:An object detection device, characterized in that it includes:
    获取单元,用于获取待处理图像;An acquisition unit for acquiring an image to be processed;
    输入单元,用于将所述待处理图像输入到预设卷积神经网络,得到M个第一类框,每一第一类框对应一个得分,M为大于1的整数;An input unit, configured to input the image to be processed into a preset convolutional neural network to obtain M first-type frames, each first-type frame corresponds to a score, and M is an integer greater than 1;
    排序单元,用于依据所述M个第一类框中每一框的得分从高到低顺序对所述M个第一类框进行排序;A sorting unit, configured to sort the M first-type frames according to the order of the scores of each frame in the M first-type frames from high to low;
    选取单元,用于设置所有框mask为1,从排序后的所述M个第一类框中选取一个框作为目标框,所述目标框的mask置为0;The selection unit is used to set the masks of all frames to 1, select one frame from the M first-class frames after sorting as the target frame, and set the mask of the target frame to 0;
    确定单元,用于确定第i个框与所述目标框之间的重叠面积,所述第i个框为任一mask为1的框;A determining unit, configured to determine an overlapping area between the i-th frame and the target frame, and the i-th frame is any frame whose mask is 1;
    设置单元,用于在所述重叠面积大于预设阈值时,将所述第i个框的mask设置为0。The setting unit is configured to set the mask of the i-th frame to 0 when the overlapping area is greater than a preset threshold.
  9. 一种电子设备,其特征在于,包括处理器、存储器,所述存储器用于存储一个或多个程序,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-7任一项所述的方法中的步骤的指令。An electronic device, characterized in that it includes a processor and a memory, and the memory is used to store one or more programs, and is configured to be executed by the processor, the program including is used to execute claims 1-7 The instructions of the steps in the method of any one.
  10. 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行以实现如权利要求1-7任一项所述的方法。A computer-readable storage medium storing a computer program, the computer program being executed by a processor to implement the method according to any one of claims 1-7.
PCT/CN2019/114330 2018-12-29 2019-10-30 Target detection method and related product WO2020134528A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811645347.6A CN109815843B (en) 2018-12-29 2018-12-29 Image processing method and related product
CN201811645347.6 2018-12-29

Publications (1)

Publication Number Publication Date
WO2020134528A1 true WO2020134528A1 (en) 2020-07-02

Family

ID=66603279

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114330 WO2020134528A1 (en) 2018-12-29 2019-10-30 Target detection method and related product

Country Status (2)

Country Link
CN (1) CN109815843B (en)
WO (1) WO2020134528A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464938A (en) * 2020-12-18 2021-03-09 深圳赛安特技术服务有限公司 License plate detection and identification method, device, equipment and storage medium
CN112699808A (en) * 2020-12-31 2021-04-23 深圳市华尊科技股份有限公司 Dense target detection method, electronic equipment and related product
CN113192048A (en) * 2021-05-17 2021-07-30 广州市勤思网络科技有限公司 Multi-mode fused people number identification and statistics method
CN113283307A (en) * 2021-04-30 2021-08-20 北京雷石天地电子技术有限公司 Method and system for identifying object in video and computer storage medium
CN113449373A (en) * 2021-07-21 2021-09-28 深圳须弥云图空间科技有限公司 Overlap detection method and device and electronic equipment
CN115050129A (en) * 2022-06-27 2022-09-13 北京睿家科技有限公司 Data processing method and system for intelligent access control
CN117274814A (en) * 2023-10-08 2023-12-22 北京香田智能科技有限公司 Tobacco field image processing method

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815843B (en) * 2018-12-29 2021-09-14 深圳云天励飞技术有限公司 Image processing method and related product
CN112101061A (en) * 2019-06-17 2020-12-18 富士通株式会社 Target detection method and device and image processing equipment
CN111652158A (en) * 2020-06-04 2020-09-11 浙江大华技术股份有限公司 Target object detection method and device, storage medium and electronic device
CN111951601B (en) * 2020-08-05 2021-10-26 智慧互通科技股份有限公司 Method and device for identifying parking positions of distribution vehicles
CN111709951B (en) * 2020-08-20 2020-11-13 成都数之联科技有限公司 Target detection network training method and system, network, device and medium
CN116824059A (en) * 2021-03-02 2023-09-29 武汉联影智融医疗科技有限公司 Target surface reconstruction method, device, equipment and medium based on three-dimensional image

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325690A (en) * 2007-06-12 2008-12-17 上海正电科技发展有限公司 Method and system for detecting human flow analysis and crowd accumulation process of monitoring video flow
US20150278631A1 (en) * 2014-03-28 2015-10-01 International Business Machines Corporation Filtering methods for visual object detection
CN107909005A (en) * 2017-10-26 2018-04-13 西安电子科技大学 Personage's gesture recognition method under monitoring scene based on deep learning
CN108921017A (en) * 2018-05-24 2018-11-30 北京飞搜科技有限公司 Method for detecting human face and system
CN109815843A (en) * 2018-12-29 2019-05-28 深圳云天励飞技术有限公司 Object detection method and Related product

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228137A (en) * 2016-07-26 2016-12-14 广州市维安科技股份有限公司 A kind of ATM abnormal human face detection based on key point location
CN106485215B (en) * 2016-09-29 2020-03-06 西交利物浦大学 Face shielding detection method based on deep convolutional neural network
CN108416250B (en) * 2017-02-10 2021-06-22 浙江宇视科技有限公司 People counting method and device
CN108171694B (en) * 2017-12-28 2021-05-14 开立生物医疗科技(武汉)有限公司 Method, system and equipment for detecting nodule based on convolutional neural network
CN108898610B (en) * 2018-07-20 2020-11-20 电子科技大学 Object contour extraction method based on mask-RCNN

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325690A (en) * 2007-06-12 2008-12-17 上海正电科技发展有限公司 Method and system for detecting human flow analysis and crowd accumulation process of monitoring video flow
US20150278631A1 (en) * 2014-03-28 2015-10-01 International Business Machines Corporation Filtering methods for visual object detection
CN107909005A (en) * 2017-10-26 2018-04-13 西安电子科技大学 Personage's gesture recognition method under monitoring scene based on deep learning
CN108921017A (en) * 2018-05-24 2018-11-30 北京飞搜科技有限公司 Method for detecting human face and system
CN109815843A (en) * 2018-12-29 2019-05-28 深圳云天励飞技术有限公司 Object detection method and Related product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NIE, SHANLAN: ""Inshore Ship Detection Based on Mask R-CNN", https://ieeexplore.ieee.org/document/8519123", IEEE, 5 November 2018 (2018-11-05), XP033438312, DOI: 20200114112118X *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464938A (en) * 2020-12-18 2021-03-09 深圳赛安特技术服务有限公司 License plate detection and identification method, device, equipment and storage medium
CN112464938B (en) * 2020-12-18 2024-04-12 深圳赛安特技术服务有限公司 License plate detection and identification method, device, equipment and storage medium
CN112699808A (en) * 2020-12-31 2021-04-23 深圳市华尊科技股份有限公司 Dense target detection method, electronic equipment and related product
CN113283307A (en) * 2021-04-30 2021-08-20 北京雷石天地电子技术有限公司 Method and system for identifying object in video and computer storage medium
CN113192048A (en) * 2021-05-17 2021-07-30 广州市勤思网络科技有限公司 Multi-mode fused people number identification and statistics method
CN113449373A (en) * 2021-07-21 2021-09-28 深圳须弥云图空间科技有限公司 Overlap detection method and device and electronic equipment
CN115050129A (en) * 2022-06-27 2022-09-13 北京睿家科技有限公司 Data processing method and system for intelligent access control
CN117274814A (en) * 2023-10-08 2023-12-22 北京香田智能科技有限公司 Tobacco field image processing method
CN117274814B (en) * 2023-10-08 2024-02-20 北京香田智能科技有限公司 Tobacco field image processing method

Also Published As

Publication number Publication date
CN109815843B (en) 2021-09-14
CN109815843A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
WO2020134528A1 (en) Target detection method and related product
US10198823B1 (en) Segmentation of object image data from background image data
US9965865B1 (en) Image data segmentation using depth data
US10217195B1 (en) Generation of semantic depth of field effect
CN109961009B (en) Pedestrian detection method, system, device and storage medium based on deep learning
WO2019218824A1 (en) Method for acquiring motion track and device thereof, storage medium, and terminal
US8750573B2 (en) Hand gesture detection
US8792722B2 (en) Hand gesture detection
WO2020063139A1 (en) Face modeling method and apparatus, electronic device and computer-readable medium
CN107256377B (en) Method, device and system for detecting object in video
CN109727264A (en) Image generating method, the training method of neural network, device and electronic equipment
CN112052831B (en) Method, device and computer storage medium for face detection
CN110084299B (en) Target detection method and device based on multi-head fusion attention
TW202013252A (en) License plate recognition system and license plate recognition method
WO2018210047A1 (en) Data processing method, data processing apparatus, electronic device and storage medium
WO2023082784A1 (en) Person re-identification method and apparatus based on local feature attention
WO2020134818A1 (en) Image processing method and related product
WO2023011013A1 (en) Splicing seam search method and apparatus for video image, and video image splicing method and apparatus
CN109816745A (en) Human body thermodynamic chart methods of exhibiting and Related product
WO2019080743A1 (en) Target detection method and apparatus, and computer device
WO2022174523A1 (en) Method for extracting gait feature of pedestrian, and gait recognition method and system
Pintore et al. Recovering 3D existing-conditions of indoor structures from spherical images
CN109840885B (en) Image fusion method and related product
CN109785439B (en) Face sketch image generation method and related products
CN109447022A (en) A kind of lens type recognition methods and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19901541

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19901541

Country of ref document: EP

Kind code of ref document: A1