WO2021083151A1 - Target detection method and apparatus, storage medium and unmanned aerial vehicle - Google Patents

Target detection method and apparatus, storage medium and unmanned aerial vehicle Download PDF

Info

Publication number
WO2021083151A1
WO2021083151A1 PCT/CN2020/124055 CN2020124055W WO2021083151A1 WO 2021083151 A1 WO2021083151 A1 WO 2021083151A1 CN 2020124055 W CN2020124055 W CN 2020124055W WO 2021083151 A1 WO2021083151 A1 WO 2021083151A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
image
sub
rectangular frame
boundary
Prior art date
Application number
PCT/CN2020/124055
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 WO2021083151A1 publication Critical patent/WO2021083151A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/32Normalisation of the pattern dimensions
    • 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
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Definitions

  • the embodiments of the present invention relate to the technical field of drones, and in particular to target detection methods, devices, storage media, and drones.
  • Unmanned Aerial Vehicles refer to unmanned aircraft operated by radio remote control equipment and independent program control equipment, or fully or intermittently autonomously operated by onboard computers. Compared with manned aircraft, unmanned aerial vehicles have the advantages of small size, low cost, low environmental requirements, and strong survivability, and are often more suitable for tasks in dangerous or harsh environments. With the rapid development of the UAV manufacturing industry, UAV systems are widely used in areas such as smart city management and intelligent traffic monitoring. Among them, target detection is a basic but challenging functional requirement in UAV systems, which is closely related to applications such as infrastructure inspection, city perception, map reconstruction, and traffic control. These applications have promoted the development of online monitoring systems based on drones. These online systems can perform various tasks, such as on-site facility inspections and detection of violations, identification of unhealthy crops, and acquisition of map data.
  • the UAV is generally integrated with an image processing chip, and the image analysis unit in the image processing chip analyzes and processes the images taken by the PTZ camera on the UAV to achieve target detection.
  • the resolution of the input image of the image processing chip is generally low, and the resolution of the pan/tilt camera is very high. It is necessary to resize the image taken by the pan/tilt camera before performing the resize operation. Handed over to the image processing chip for processing, which makes part of the image information lost in the image processing process, making the detection of some small targets very difficult or even impossible. Therefore, the existing UAV target detection scheme needs to be improved.
  • the embodiments of the present invention provide a target detection method, device, storage medium, and equipment, which can optimize the existing target detection scheme.
  • an embodiment of the present invention provides a target detection method, which is applied to an unmanned aerial vehicle, in which at least two image analysis units are integrated, and the method includes:
  • the at least two sub-images are input into the at least two image analysis units, and the target detection result is determined according to the analysis results of the at least two image analysis units.
  • an embodiment of the present invention provides a target detection device applied to an unmanned aerial vehicle. At least two image analysis units are integrated in the unmanned aerial vehicle, and the device includes:
  • the image acquisition module is used to acquire the first image taken by the pan-tilt camera
  • An image segmentation module configured to perform segmentation processing on the first image to obtain at least two segmented images
  • a size changing module configured to perform a size changing operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units;
  • the target detection module is configured to input the at least two sub-images into the at least two image analysis units, and determine the target detection result according to the analysis results of the at least two image analysis units.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the target detection method as provided in the embodiment of the present invention is implemented.
  • an embodiment of the present invention provides an unmanned aerial vehicle, including a memory, at least two image analysis units, a processor, and a computer program stored in the memory and running on the processor, wherein the When the processor executes the computer program, the target detection method as provided in the embodiment of the present invention is implemented.
  • the target detection solution provided in the embodiment of the present invention is applied to an unmanned aerial vehicle.
  • the unmanned aerial vehicle is integrated with at least two image analysis units to obtain the first image taken by the pan/tilt camera, and perform segmentation processing on the first image to determine at least Perform a size change operation on two divided images, and the resolutions of the obtained at least two sub-images match the resolutions corresponding to the at least two image analysis units.
  • the at least two sub-images are input into the at least two image analysis units, and the The analysis results of the two image analysis units determine the target detection result.
  • the loss of image information can be reduced when the size is changed, and then it can be analyzed by at least two image analysis units, which can improve the target detection Accuracy and success rate.
  • FIG. 1 is a schematic flowchart of a target detection method according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of an image taken by a pan-tilt camera according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic diagram of an image that has undergone size modification processing according to Embodiment 1 of the present invention.
  • FIG. 4 is a schematic diagram of a left side image after segmentation according to Embodiment 1 of the present invention.
  • FIG. 5 is a schematic diagram of a right side image after segmentation according to Embodiment 1 of the present invention.
  • FIG. 6 is a schematic diagram of a left side image after a size change according to Embodiment 1 of the present invention.
  • FIG. 7 is a schematic diagram of a right side image after a size change according to Embodiment 1 of the present invention.
  • FIG. 8 is a schematic flowchart of a target detection method according to Embodiment 2 of the present invention.
  • FIG. 9 is a schematic flowchart of a target detection method according to Embodiment 3 of the present invention.
  • FIG. 10 is a schematic diagram of a left side image including position information according to Embodiment 3 of the present invention.
  • FIG. 11 is a schematic diagram of a right image including position information according to Embodiment 3 of the present invention.
  • FIG. 12 is a schematic diagram of fusion of analysis results according to Embodiment 3 of the present invention.
  • FIG. 13 is a structural block diagram of a target detection device provided by Embodiment 4 of the present invention.
  • FIG. 14 is a structural block diagram of an unmanned aerial vehicle according to Embodiment 6 of the present invention.
  • Fig. 1 is a schematic flow chart of a target detection method provided by Embodiment 1 of the present invention.
  • the method can be executed by a target detection device, where the device can be implemented by software and/or hardware, and generally can be integrated in a drone.
  • the method includes:
  • Step 101 Obtain a first image taken by a pan-tilt camera.
  • the pan/tilt camera can be integrated inside the drone, or externally placed on the drone, to establish a connection with the drone through wired or wireless methods.
  • the gimbal camera can collect images in real time during the flight of the drone, and can obtain the images taken by the gimbal camera in real time or at a preset frequency.
  • the first image may be an image taken at any time, which is not limited in the embodiment of the present invention.
  • At least two image analysis units are integrated in the drone, and the specific type of the image analysis unit is not limited.
  • it may be a forward inference engine (Neural Network Inference Engine, NNIE) that is accelerated based on a neural network. ).
  • the image analysis unit can be integrated in an image processing chip, such as the HI3559C chip, which carries two forward reasoners specifically aimed at the acceleration of neural networks. The two forward reasoners can handle tasks such as detection and classification independently.
  • Step 102 Perform segmentation processing on the first image to obtain at least two segmented images.
  • the resolution of the current pan/tilt camera can reach very high, such as 8K, and the ratio of the captured image is generally 4:3 or 16:9.
  • the resolution of the input image of the image analysis unit is generally low, such as 512*512. In this way, when the image taken by the pan/tilt camera is resized, it will lose more Image information reduces the accuracy of target detection, and it is especially difficult to detect small targets.
  • targets on the ground are smaller in the image and more difficult to detect.
  • FIG. 2 is a schematic diagram of an image taken by a pan-tilt camera according to Embodiment 1 of the present invention.
  • the image ratio is 16:9 and the resolution is 1920*1080.
  • Fig. 3 is a schematic diagram of an image that has undergone a resizing process according to the first embodiment of the present invention. After resize, the image in Fig. 2 becomes the 1:1 image in Fig. 3, with a resolution of 512*512, so , Most of the information in Figure 2 is lost, resulting in unsatisfactory detection of small targets.
  • the first image may be segmented according to a preset rule to obtain at least two segmented images.
  • the preset rules can include specific number of divisions and division methods, such as equal division or proportional division, etc., such as the division of left and right structures, the division of upper and lower structures, the division of Tian shape, and the division of Jiugong format.
  • the specific number of segmentation and the segmentation method can be determined according to the number of image analysis units and other reference factors, which are not limited in the embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a divided left image according to Embodiment 1 of the present invention
  • FIG. 5 is a schematic diagram of a divided right image according to Embodiment 1 of the present invention. Referring to FIG. 4 and FIG. The image in 2 is divided equally between the left and right structure, and two divided images with an image ratio of 8:9 are obtained.
  • Step 103 Perform a size change operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units.
  • the specific manner of performing the resizing operation on the segmented image is not limited, and the purpose of the resizing operation is to match the resolutions of at least two sub-images with the resolutions corresponding to at least two image analysis units.
  • the resolutions corresponding to at least two image analysis units are equal, so that the resolutions of at least two sub-images are the same as the resolution.
  • the size change operation may include a size change operation performed by an interpolation algorithm.
  • the interpolation algorithm may be, for example, the nearest neighbor method, the bilinear method, the bicubic method, the algorithm based on the pixel region relationship, and the Lanzos interpolation method.
  • FIG. 6 is a schematic diagram of a left side image after a size change provided in the first embodiment of the present invention
  • FIG. 7 is a schematic diagram of a right side image after a size change provided in the first embodiment of the present invention.
  • the size change operation is performed on the images in FIGS. 5 and 6 respectively, and two images with an image ratio of 1:1 and a resolution of 512*512 are obtained.
  • Step 104 Input the at least two sub-images into the at least two image analysis units, and determine a target detection result according to the analysis results of the at least two image analysis units.
  • the total area of the image input to the image analysis unit becomes larger. Referring to the above example, it is equivalent to double the target in the image. If the number of divided images is more, the magnification is also Larger, reducing the difficulty of target detection, can effectively improve the accuracy and success rate of target detection.
  • the method further includes: controlling the at least two image analysis units to analyze and process the received sub-images in parallel.
  • the advantage of this setting is that it improves the accuracy and success rate of target detection while ensuring real-time detection.
  • the content contained in the analysis result of the image analysis unit is related to the specific type, model, and function of the image analysis unit, which is not limited in the embodiment of the present invention.
  • the analysis result may include the location information and type information of the analyzed target.
  • the target can be a target object or a target person, etc. It can be a pre-designated target or an automatically recognized target, which can be set according to actual needs.
  • the analysis results of at least two image analysis units can be integrated to determine the final target detection result.
  • the target detection method provided in the embodiment of the present invention is applied to an unmanned aerial vehicle.
  • the unmanned aerial vehicle is integrated with at least two image analysis units to acquire the first image taken by the pan/tilt camera, and perform segmentation processing on the first image, and at least Perform a size change operation on two divided images, and the resolutions of the obtained at least two sub-images match the resolutions corresponding to the at least two image analysis units.
  • the at least two sub-images are input into the at least two image analysis units, and the The analysis results of the two image analysis units determine the target detection result.
  • the loss of image information can be reduced when the size is changed, and then it can be analyzed by at least two image analysis units, which can improve the target detection Accuracy and success rate.
  • FIG. 8 is a schematic flowchart of a target detection method according to the second embodiment of the present invention. The method is optimized on the basis of the above embodiment, and the specific process of determining the target detection result according to the analysis results of the at least two image analysis units To refine.
  • the determining the target detection result according to the analysis results of the at least two image analysis units includes: acquiring the analysis results of the at least two image analysis units; performing fusion processing on the at least two analysis results to obtain the target Test results.
  • the advantage of this setting is that during the segmentation process, the target may be in the segmentation position, resulting in the target being detected in the adjacent images.
  • the analysis results can be fused to determine the segmentation of the target.
  • the analysis results are merged.
  • the analysis result includes the type information and position information of the analyzed target
  • the fusion processing of at least two analysis results includes: sequentially recording every two adjacent sub-images as a current sub-image pair ,
  • the current sub-image pair includes a first sub-image and a second sub-image, and the following operations are performed on the current sub-image pair: determining the first target in the first sub-image, and determining the first target in the second sub-image According to the first position information and first type information corresponding to the first target, and the second position information and second type information corresponding to the second target, the first target and the Whether the second target corresponds to the same target, and if so, the first target and the second target are merged into the same target.
  • the advantage of this setting is that it can determine whether there is an image corresponding to the segmented target in every two adjacent sub-images one by one according to the position information and the type information, and can accurately identify the segmented target in the image.
  • the method includes the following steps:
  • Step 201 Obtain a first image taken by a pan-tilt camera.
  • Step 202 Perform segmentation processing on the first image to obtain at least two segmented images.
  • Step 203 Perform a size change operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units.
  • Step 204 Input at least two sub-images into the at least two image analysis units, and control the at least two image analysis units to analyze and process the received sub-images in parallel.
  • Step 205 Obtain analysis results of at least two image analysis units.
  • Step 206 Record every two adjacent sub-images as a current sub-image pair in turn, and perform the following operations for the current sub-image pair: determine the first target in the first sub-image and the second target in the second sub-image; According to the first location information and the first type information corresponding to the first target, and the second location information and the second type information corresponding to the second target, it is determined whether the first target and the second target correspond to the same target. A target and the second target merge into the same target.
  • the analysis result includes the type information and position information of the analyzed target, and the current sub-image pair includes the first sub-image and the second sub-image.
  • the first target may be any target analyzed in the first sub-image
  • the second target may be any target analyzed in the second sub-image.
  • a preliminary screening may be performed on the first target and the second target, and the target closer to the segmentation boundary may be determined as the first target or the second target.
  • the first target as an example, record the boundary overlapping with the second sub-image in the first sub-image as the segmentation boundary, obtain the candidate targets analyzed in the first sub-image, and determine for each candidate target The fifth distance between the current candidate target and the segmentation boundary, and if the fifth distance is less than a third preset threshold, the current candidate target is determined as the first target.
  • the third preset threshold may be set according to the size of the sub-image, for example, it may be a preset ratio of the side length of the side perpendicular to the segmentation boundary, and the preset ratio may be, for example, 10%.
  • the position information in the analysis result may include a coordinate range
  • the coordinate range may form a certain shape, such as a circle, an ellipse, or a rectangle, or a shape that matches the shape of the target.
  • the position information includes the coordinates of a rectangular frame, and the rectangular frame contains an image corresponding to the analyzed target.
  • the rectangular frame corresponding to the first target is recorded as a first rectangular frame
  • the rectangular frame corresponding to the second target is recorded as a second rectangular frame.
  • Type information can be determined by the specific capabilities of the image analysis unit. For example, it can analyze whether it is a moving object or a still life, an animal or a person, and it can also analyze specific categories, such as vehicles, houses, etc., and analyze more detailed categories. , Such as cars, buses, fire trucks, ambulances, etc.
  • the same rule is adopted for numbering the four sides of the first rectangle and the second rectangle, and then it is determined whether the two rectangles correspond to the same target based on the distance between the sides and the type information corresponding to the two targets.
  • the first target and the first type information are determined according to the first position information and the first type information corresponding to the first target, and the second position information and the second type information corresponding to the second target. Whether the second target corresponds to the same target can include:
  • the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame, and the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame are calculated.
  • the first boundary in each rectangular frame is the left boundary
  • the first sub-image and the second sub-image are up and down
  • adjacent the first boundary in each rectangle is the upper boundary;
  • the first ratio is less than a first preset threshold
  • the second ratio is greater than a second preset threshold
  • the first type information and the second type information are the same
  • the first target and the second type information are determined Whether the second target corresponds to the same target, wherein the first preset threshold is smaller than the second preset threshold.
  • the first preset threshold and the second preset threshold can be set according to actual needs, for example, the first preset threshold is 0.1 and the second preset threshold is 0.6.
  • the fusing the first target and the second target into the same target includes: determining a target rectangular frame according to the coordinates of the first rectangular frame and the coordinates of the second rectangle, the target The rectangular frame includes both the first rectangular frame and the second rectangular frame; the target rectangular frame and the first type information are determined as the analysis result corresponding to the fused target.
  • the advantage of this setting is that when the first target and the second target are determined to be the same target, the target rectangular frame containing both the first rectangular frame and the second rectangular frame can be determined as the final position information of the target, avoiding the final target The number of targets in the test result is wrong.
  • Step 207 Determine the result after the fusion processing as the target detection result.
  • the target detection method In the target detection method provided by the embodiment of the present invention, after the image segmentation and size change are performed, it is handed over to at least two image analysis units for parallel processing. After the preliminary analysis results of each image analysis unit are obtained, it is fully considered that the same target is segmented into The conditions in the two sub-images are merged with the analysis results of the determined segmented targets, and finally an accurate target detection result is obtained.
  • the target detection result may further include performing a splicing operation on at least two sub-images containing the target detection result, and output to the user equipment.
  • the user equipment may be a device such as a mobile terminal or a computer for the user to view the target detection result.
  • Fig. 9 is a schematic flow chart of a target detection method provided in the third embodiment of the present invention. The method is described by taking the example of integrating two image analysis units in a drone to divide the image into left and right equally. Specifically, the method Including the following steps:
  • Step 301 Obtain a first image taken by a pan-tilt camera.
  • the following description is made by taking the image in FIG. 2 as the first image as an example.
  • the image ratio is 16:9 and the resolution is 1920*1080.
  • Step 302 Perform left and right average division processing on the first image to obtain two divided images.
  • Step 303 Perform a size change operation on the two divided images to obtain two sub-images, and the resolutions of the two sub-images match the resolutions corresponding to the two image analysis units.
  • the two image analysis units are the two forward reasoners that are carried on the HI3559C chip specifically for accelerating neural networks, and the resolution supported by each reasoner is 512*512.
  • the resolution supported by each reasoner is 512*512.
  • Resizing the images in Figure 5 and Figure 6 were performed to obtain two images with an image ratio of 1:1 and a resolution of 512*512.
  • Step 304 Input two sub-images into two image analysis units, and control the two image analysis units to analyze and process the received sub-images in parallel.
  • Step 305 Obtain the analysis results of the two image analysis units.
  • the two reasoners will respectively provide location information (BBox) and category (Class) information of the analyzed target in the sub-image to which it belongs.
  • the position information is represented by the coordinates of the rectangular frame.
  • the two reasoners will also respectively give the position information of the car in the sub-image for which they are responsible.
  • FIG. 10 is a schematic diagram of a left side image including location information provided by Embodiment 3 of the present invention
  • FIG. 11 is a schematic diagram of a right side image including location information provided by Embodiment 3 of the present invention, as shown in FIGS. 10 and 11 , Respectively use rectangular boxes to circle the positions of the analyzed targets.
  • Step 306 Determine the first target in the first sub-image and the second target in the second sub-image, according to the first location information and the first type information corresponding to the first target, and the second location information corresponding to the second target With the second type of information, it is determined whether the first target and the second target correspond to the same target, and if so, the first target and the second target are merged into the same target.
  • Fig. 12 is a schematic diagram of a fusion of analysis results provided by Embodiment 3 of the present invention.
  • the left rectangular box Left BBox represents the first rectangular box of the first target
  • the right rectangular box Right BBox represents the second target’s first rectangular box.
  • the rectangular frame in the left picture and the rectangular frame in the right picture are in the same coordinate system, and the coordinate system can be determined according to the spliced image of the first sub-image and the second sub-image, for example, the lower left corner of the image is the coordinate
  • the origin, the lower boundary is the horizontal axis, and the left boundary is the vertical axis.
  • the rectangular box on the left can be represented by coordinates (Ltop, Lbottom, Lleft, Lrigth), and the rectangular box on the right can be represented by coordinates (Rtop, Rbottom, Rleft, Rrigth).
  • W, w, H, and h in the figure are as follows Formula representation.
  • the left and right BBoxes are the same target.
  • the merged BBox is (Ltop, Rbottom, Lleft, Rrigth).
  • 0.1 is the first preset threshold
  • 0.6 is the second preset threshold.
  • the merged BBox is (min(Ltop, Rtop), max(Lbottom, Rbottom) ), Lleft, Rrigth).
  • Step 307 Determine the result after the fusion processing as the target detection result.
  • the original image collected by the pan/tilt camera is divided equally between the left and right structure, and the size is changed, and then the two reasoners are processed in parallel, and the preliminary analysis of the two reasoners is obtained. After the result, the situation that the same target is segmented into two sub-images is fully considered, and the analysis results of the determined segmented targets are merged, and finally an accurate target detection result is obtained.
  • the detection resolution is expanded from 512*512 to 1024*512, which can improve the detection success rate of small targets.
  • the parallel operation of dual reasoners is the same as that of 512*512 with single reasoners.
  • the image resizing of :9 is 1:1 compared to the image resizing of 16:9 to 1:1. The resizing process retains more information of the image and further improves the accuracy and success rate of target detection.
  • Fig. 13 is a structural block diagram of a target detection device provided by the fourth embodiment of the present invention.
  • the device can be implemented by software and/or hardware, and can generally be integrated in an unmanned aerial vehicle.
  • Target detection can be performed by executing a target detection method.
  • At least two image analysis units are integrated in the drone.
  • the device includes:
  • the image acquisition module 401 is used to acquire the first image taken by the pan-tilt camera;
  • the image segmentation module 402 is configured to perform segmentation processing on the first image to obtain at least two segmented images
  • the size changing module 403 is configured to perform a size changing operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units ;
  • the target detection module 404 is configured to input the at least two sub-images into the at least two image analysis units, and determine the target detection result according to the analysis results of the at least two image analysis units.
  • the target detection device provided in the embodiment of the present invention is applied to an unmanned aerial vehicle.
  • the unmanned aerial vehicle is integrated with at least two image analysis units to acquire the first image taken by the pan/tilt camera, and perform segmentation processing on the first image to determine at least Perform a size change operation on two divided images, and the resolutions of the obtained at least two sub-images match the resolutions corresponding to the at least two image analysis units.
  • the at least two sub-images are input into the at least two image analysis units, and the The analysis results of the two image analysis units determine the target detection result.
  • the loss of image information can be reduced when the size is changed, and then it can be analyzed by at least two image analysis units, which can improve the target detection Accuracy and success rate.
  • the determining the target detection result according to the analysis results of the at least two image analysis units includes:
  • the analysis result includes type information and location information of the analyzed target
  • the fusion processing of at least two analysis results includes:
  • each two adjacent sub-images are recorded as a current sub-image pair in turn, the current sub-image pair includes a first sub-image and a second sub-image, and the following operations are performed on the current sub-image pair:
  • the position information includes the coordinates of a rectangular frame, which contains an image corresponding to the analyzed target; the rectangular frame corresponding to the first target is marked as the first rectangular frame, and the second target corresponds to The rectangular frame of is marked as the second rectangular frame;
  • the first target and the second target are determined according to the first location information and the first type information corresponding to the first target, and the second location information and the second type information corresponding to the second target Whether it corresponds to the same target, including:
  • the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame, and the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame are calculated.
  • the first boundary in each rectangular frame is the left boundary
  • the first sub-image and the second sub-image are up and down
  • the first boundary in each rectangular box is the upper boundary;
  • the first ratio is less than a first preset threshold
  • the second ratio is greater than a second preset threshold
  • the first type information and the second type information are the same
  • the first target and the second type information are determined Whether the second target corresponds to the same target, wherein the first preset threshold is smaller than the second preset threshold.
  • the fusing the first target and the second target into the same target includes:
  • a target rectangular frame according to the coordinates of the first rectangular frame and the coordinates of the second rectangle, the target rectangular frame including both the first rectangular frame and the second rectangular frame;
  • the target rectangular frame and the first type information are determined as the analysis result corresponding to the fused target.
  • determining the first target in the first sub-image includes:
  • For each candidate target determine the fifth distance between the current candidate target and the segmentation boundary, and if the fifth distance is less than the third preset threshold, determine the current candidate target as the first target.
  • the at least two image analysis units include at least two forward reasoners NNIE that are accelerated based on a neural network.
  • An embodiment of the present invention also provides a storage medium containing computer-executable instructions, which are used to execute a target detection method when executed by a computer processor, and the method includes:
  • the at least two sub-images are input into the at least two image analysis units, and the target detection result is determined according to the analysis results of the at least two image analysis units.
  • Storage medium any of various types of storage devices or storage devices.
  • the term "storage medium” is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Rambus RAM, etc.; Volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc.
  • the storage medium may further include other types of memory or a combination thereof.
  • the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the Internet).
  • the second computer system can provide the program instructions to the first computer for execution.
  • storage media may include two or more storage media that may reside in different locations (for example, in different computer systems connected through a network).
  • the storage medium may store program instructions (for example, embodied as a computer program) executable by one or more processors.
  • a storage medium containing computer-executable instructions provided by an embodiment of the present invention is not limited to the above-mentioned target detection operation, and can also execute the target detection method provided in any embodiment of the present invention. Related operations.
  • FIG. 14 is a structural block diagram of an unmanned aerial vehicle according to Embodiment 6 of the present invention.
  • the drone 500 may include: a memory 501, a processor 502, and at least two image analysis units 503 (only one is shown in the figure).
  • a computer program stored on the memory 501 and running on a processor, the processor 502 executing The computer program implements the target detection method described in the embodiment of the present invention.
  • the method may include:
  • the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units;
  • the at least two sub-images are input into the at least two image analysis units, and the target detection result is determined according to the analysis results of the at least two image analysis units.
  • the computer device provided by the embodiment of the present invention can reduce the loss of image information during the size change operation after the original image taken by the pan/tilt camera is divided, and then it can be analyzed by at least two image analysis units, which can improve The accuracy and success rate of target detection.
  • the target detection device, storage medium, and computer equipment provided in the foregoing embodiments can execute the target detection method provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects for executing the method.
  • the target detection method provided in any embodiment of the present invention can execute the target detection method provided in any embodiment of the present invention.

Abstract

A target detection method and apparatus, a storage medium, and an unmanned aerial vehicle. The method comprises: acquiring a first image captured by a gimbal camera (101); performing segmentation processing on the first image to obtain at least two segmented images (102); performing a size change operation on the at least two segmented images to obtain at least two sub-images, the resolutions of the at least two sub-images matching the resolutions corresponding to at least two image analysis units (103); and inputting the at least two sub-images into the at least two image analysis units, and determining a target detection result according to the analysis results of the at least two image analysis units (104). The use of the technical solution in the present method can reduce the loss of image information and improve the accuracy and success rate of target detection.

Description

目标检测方法、装置、存储介质及无人机Target detection method, device, storage medium and drone
本申请要求于2019年11月01日提交中国专利局、申请号为201911060737.1、申请名称为“目标检测方法、装置、存储介质及无人机”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on November 1, 2019, with application number 201911060737.1, application titled "Target Detection Method, Device, Storage Medium, and UAV", the entire content of which is incorporated by reference Incorporated in this application.
技术领域Technical field
本发明实施例涉及无人机技术领域,尤其涉及目标检测方法、装置、存储介质及无人机。The embodiments of the present invention relate to the technical field of drones, and in particular to target detection methods, devices, storage media, and drones.
背景技术Background technique
无人机(Unmanned Aerial Vehicles,UAVs)是指通过无线电遥控设备和独立程序控制设备操作的无人驾驶飞机,或者由机载计算机完全地或间歇地自主操作。与有人驾驶飞机相比,无人机具有体积小、造价低、对环境要求低、生存能力较强等优点,往往更适合危险或环境恶劣的任务。随着无人机制造业的快速发展,无人机系统被广泛应用于智慧城市管理以及智能交通监控等领域。其中,目标检测是无人机系统中一个基本但是具有挑战性的功能需求,与基础设施检查、城市感知、地图重构以及交通控制等应用密切相关。这些应用推动了基于无人机的在线监控系统的发展,这些在线系统可以执行各种任务,例如现场设施的检查和违规的检测、不健康农作物的识别以及地图数据的获取等。Unmanned Aerial Vehicles (UAVs) refer to unmanned aircraft operated by radio remote control equipment and independent program control equipment, or fully or intermittently autonomously operated by onboard computers. Compared with manned aircraft, unmanned aerial vehicles have the advantages of small size, low cost, low environmental requirements, and strong survivability, and are often more suitable for tasks in dangerous or harsh environments. With the rapid development of the UAV manufacturing industry, UAV systems are widely used in areas such as smart city management and intelligent traffic monitoring. Among them, target detection is a basic but challenging functional requirement in UAV systems, which is closely related to applications such as infrastructure inspection, city perception, map reconstruction, and traffic control. These applications have promoted the development of online monitoring systems based on drones. These online systems can perform various tasks, such as on-site facility inspections and detection of violations, identification of unhealthy crops, and acquisition of map data.
无人机上一般集成有图像处理芯片,图像处理芯片中的图像分析单元对无人机上的云台相机拍摄的图像进行分析处理,实现目标检测。目前,为了保证检测的实时性,图像处理芯片的输入图像的分辨率一般较低,而云台相机的分辨率很高,需要将云台相机拍摄的图像进行尺寸变更(resize)操作后,再交给 图像处理芯片进行处理,这使得图像处理过程中会丢失部分图像信息,使得一些小目标的检测变得非常困难,甚至无法检测,因此现有的无人机目标检测方案需要改进。The UAV is generally integrated with an image processing chip, and the image analysis unit in the image processing chip analyzes and processes the images taken by the PTZ camera on the UAV to achieve target detection. At present, in order to ensure the real-time detection, the resolution of the input image of the image processing chip is generally low, and the resolution of the pan/tilt camera is very high. It is necessary to resize the image taken by the pan/tilt camera before performing the resize operation. Handed over to the image processing chip for processing, which makes part of the image information lost in the image processing process, making the detection of some small targets very difficult or even impossible. Therefore, the existing UAV target detection scheme needs to be improved.
发明内容Summary of the invention
本发明实施例提供了目标检测方法、装置、存储介质及设备,可以优化现有的目标检测方案。The embodiments of the present invention provide a target detection method, device, storage medium, and equipment, which can optimize the existing target detection scheme.
第一方面,本发明实施例提供了一种目标检测方法,应用于无人机,所述无人机中集成有至少两个图像分析单元,所述方法包括:In the first aspect, an embodiment of the present invention provides a target detection method, which is applied to an unmanned aerial vehicle, in which at least two image analysis units are integrated, and the method includes:
获取云台相机拍摄的第一图像;Obtain the first image taken by the pan/tilt camera;
对所述第一图像进行分割处理,得到至少两个分割图像;Performing segmentation processing on the first image to obtain at least two segmented images;
对所述至少两个分割图像进行尺寸变更操作,得到至少两个子图像,所述至少两个子图像的分辨率与所述至少两个图像分析单元对应的分辨率相匹配;Performing a size change operation on the at least two divided images to obtain at least two sub-images, the resolutions of the at least two sub-images matching the resolutions corresponding to the at least two image analysis units;
将所述至少两个子图像输入至所述至少两个图像分析单元中,并根据所述至少两个图像分析单元的分析结果确定目标检测结果。The at least two sub-images are input into the at least two image analysis units, and the target detection result is determined according to the analysis results of the at least two image analysis units.
第二方面,本发明实施例提供了一种目标检测装置,应用于无人机,所述无人机中集成有至少两个图像分析单元,所述装置包括:In a second aspect, an embodiment of the present invention provides a target detection device applied to an unmanned aerial vehicle. At least two image analysis units are integrated in the unmanned aerial vehicle, and the device includes:
图像获取模块,用于获取云台相机拍摄的第一图像;The image acquisition module is used to acquire the first image taken by the pan-tilt camera;
图像分割模块,用于对所述第一图像进行分割处理,得到至少两个分割图像;An image segmentation module, configured to perform segmentation processing on the first image to obtain at least two segmented images;
尺寸变更模块,用于对所述至少两个分割图像进行尺寸变更操作,得到至少两个子图像,所述至少两个子图像的分辨率与所述至少两个图像分析单元对应的分辨率相匹配;A size changing module, configured to perform a size changing operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units;
目标检测模块,用于将所述至少两个子图像输入至所述至少两个图像分析单元中,并根据所述至少两个图像分析单元的分析结果确定目标检测结果。The target detection module is configured to input the at least two sub-images into the at least two image analysis units, and determine the target detection result according to the analysis results of the at least two image analysis units.
第三方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明实施例提供的目标检测方法。In a third aspect, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the target detection method as provided in the embodiment of the present invention is implemented.
第四方面,本发明实施例提供了一种无人机,包括存储器、至少两个图像分析单元、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如本发明实施例提供的目标检测方法。In a fourth aspect, an embodiment of the present invention provides an unmanned aerial vehicle, including a memory, at least two image analysis units, a processor, and a computer program stored in the memory and running on the processor, wherein the When the processor executes the computer program, the target detection method as provided in the embodiment of the present invention is implemented.
本发明实施例中提供的目标检测方案,应用于无人机,无人机中集成有至少两个图像分析单元,获取云台相机拍摄的第一图像,对第一图像进行分割处理,对至少两个分割图像进行尺寸变更操作,得到的至少两个子图像的分辨率与至少两个图像分析单元对应的分辨率相匹配,将至少两个子图像输入至至少两个图像分析单元中,并根据至少两个图像分析单元的分析结果确定目标检测结果。通过采用上述技术方案,将云台相机拍摄的原始图像进行分割后,在进行尺寸变更操作时,可减少图像信息的丢失量,随后交由至少两个图像分析单元进行分析,可提升目标检测的准确率和成功率。The target detection solution provided in the embodiment of the present invention is applied to an unmanned aerial vehicle. The unmanned aerial vehicle is integrated with at least two image analysis units to obtain the first image taken by the pan/tilt camera, and perform segmentation processing on the first image to determine at least Perform a size change operation on two divided images, and the resolutions of the obtained at least two sub-images match the resolutions corresponding to the at least two image analysis units. The at least two sub-images are input into the at least two image analysis units, and the The analysis results of the two image analysis units determine the target detection result. By adopting the above technical solution, after the original image taken by the pan/tilt camera is divided, the loss of image information can be reduced when the size is changed, and then it can be analyzed by at least two image analysis units, which can improve the target detection Accuracy and success rate.
附图说明Description of the drawings
图1为本发明实施例一提供的一种目标检测方法的流程示意图;FIG. 1 is a schematic flowchart of a target detection method according to Embodiment 1 of the present invention;
图2为本发明实施例一提供的一种云台相机拍摄的图像示意图;2 is a schematic diagram of an image taken by a pan-tilt camera according to Embodiment 1 of the present invention;
图3为本发明实施例一提供的一种经过尺寸变更处理的图像示意图;FIG. 3 is a schematic diagram of an image that has undergone size modification processing according to Embodiment 1 of the present invention; FIG.
图4为本发明实施例一提供的一种分割后的左侧图像示意图;4 is a schematic diagram of a left side image after segmentation according to Embodiment 1 of the present invention;
图5为本发明实施例一提供的一种分割后的右侧图像示意图;5 is a schematic diagram of a right side image after segmentation according to Embodiment 1 of the present invention;
图6为本发明实施例一提供的一种尺寸变更后的左侧图像示意图;FIG. 6 is a schematic diagram of a left side image after a size change according to Embodiment 1 of the present invention; FIG.
图7为本发明实施例一提供的一种尺寸变更后的右侧图像示意图;FIG. 7 is a schematic diagram of a right side image after a size change according to Embodiment 1 of the present invention; FIG.
图8为本发明实施例二提供的一种目标检测方法的流程示意图;8 is a schematic flowchart of a target detection method according to Embodiment 2 of the present invention;
图9为本发明实施例三提供的一种目标检测方法的流程示意图;FIG. 9 is a schematic flowchart of a target detection method according to Embodiment 3 of the present invention;
图10为本发明实施例三提供的一种包含位置信息的左侧图像示意图;FIG. 10 is a schematic diagram of a left side image including position information according to Embodiment 3 of the present invention;
图11为本发明实施例三提供的一种包含位置信息的右侧图像示意图;FIG. 11 is a schematic diagram of a right image including position information according to Embodiment 3 of the present invention;
图12为本发明实施例三提供的一种分析结果融合示意图;FIG. 12 is a schematic diagram of fusion of analysis results according to Embodiment 3 of the present invention;
图13为本发明实施例四提供的一种目标检测装置的结构框图;FIG. 13 is a structural block diagram of a target detection device provided by Embodiment 4 of the present invention;
图14为本发明实施例六提供的一种无人机的结构框图。FIG. 14 is a structural block diagram of an unmanned aerial vehicle according to Embodiment 6 of the present invention.
具体实施方式Detailed ways
下面结合附图并通过具体实施方式来进一步说明本发明的技术方案。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The technical solutions of the present invention will be further described below in conjunction with the drawings and specific implementations. It can be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for ease of description, the drawings only show a part of the structure related to the present invention instead of all of the structure.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart describes the steps as sequential processing, many of the steps can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the steps can be rearranged. The processing may be terminated when its operation is completed, but may also have additional steps not included in the drawings. The processing may correspond to methods, functions, procedures, subroutines, subroutines, and so on.
实施例一Example one
图1为本发明实施例一提供的一种目标检测方法的流程示意图,该方法可 以由目标检测装置执行,其中该装置可由软件和/或硬件实现,一般可集成在无人机中。如图1所示,该方法包括:Fig. 1 is a schematic flow chart of a target detection method provided by Embodiment 1 of the present invention. The method can be executed by a target detection device, where the device can be implemented by software and/or hardware, and generally can be integrated in a drone. As shown in Figure 1, the method includes:
步骤101、获取云台相机拍摄的第一图像。Step 101: Obtain a first image taken by a pan-tilt camera.
本发明实施例中,云台相机可以集成在无人机内部,也可外置于无人机上,通过有线或无线等方式与无人机建立连接。云台相机能够在无人机的飞行过程中实时进行图像采集,可以实时或以预设频率获取云台相机拍摄的图像。第一图像可以是任意时刻拍摄的图像,本发明实施例不做限定。In the embodiment of the present invention, the pan/tilt camera can be integrated inside the drone, or externally placed on the drone, to establish a connection with the drone through wired or wireless methods. The gimbal camera can collect images in real time during the flight of the drone, and can obtain the images taken by the gimbal camera in real time or at a preset frequency. The first image may be an image taken at any time, which is not limited in the embodiment of the present invention.
本发明实施例中,无人机中集成有至少两个图像分析单元,对图像分析单元的具体类型不做限定,例如可以是基于神经网络进行加速的正向推理器(Neural Network Inference Engine,NNIE)。图像分析单元可以集成在图像处理芯片内,如HI3559C芯片,该芯片携带两个专门针对神经网络进行加速的正向推理器,两个正向推理器可以单独地处理检测及分类等任务。In the embodiment of the present invention, at least two image analysis units are integrated in the drone, and the specific type of the image analysis unit is not limited. For example, it may be a forward inference engine (Neural Network Inference Engine, NNIE) that is accelerated based on a neural network. ). The image analysis unit can be integrated in an image processing chip, such as the HI3559C chip, which carries two forward reasoners specifically aimed at the acceleration of neural networks. The two forward reasoners can handle tasks such as detection and classification independently.
步骤102、对所述第一图像进行分割处理,得到至少两个分割图像。Step 102: Perform segmentation processing on the first image to obtain at least two segmented images.
随着相机技术的快速发展,目前云台相机的分辨率可以达到很高,如8K,所拍摄的图像的比例一般为4:3或16:9。为了保证检测的实时性,图像分析单元的输入图像的分辨率一般较低,如512*512,这样,在对云台相机拍摄的图像进行尺寸变更(resize)操作时,就会损失较多的图像信息,使得目标检测准确率下降,尤其难以检测小目标,当无人机飞行高度较高时,地面上的目标在图像中更小,更加难以检出。With the rapid development of camera technology, the resolution of the current pan/tilt camera can reach very high, such as 8K, and the ratio of the captured image is generally 4:3 or 16:9. In order to ensure the real-time detection, the resolution of the input image of the image analysis unit is generally low, such as 512*512. In this way, when the image taken by the pan/tilt camera is resized, it will lose more Image information reduces the accuracy of target detection, and it is especially difficult to detect small targets. When the drone is flying at a high altitude, targets on the ground are smaller in the image and more difficult to detect.
图2为本发明实施例一提供的云台相机拍摄的图像示意图,该图像比例为16:9,分辨率为1920*1080。图3为本发明实施例一提供的一种经过尺寸变更处理的图像示意图,经过resize之后,图2中的图像变成了图3中的1:1的图像,分辨率为512*512,这样,图2中的大部分信息被丢失掉,导致小目标的检测不 理想。FIG. 2 is a schematic diagram of an image taken by a pan-tilt camera according to Embodiment 1 of the present invention. The image ratio is 16:9 and the resolution is 1920*1080. Fig. 3 is a schematic diagram of an image that has undergone a resizing process according to the first embodiment of the present invention. After resize, the image in Fig. 2 becomes the 1:1 image in Fig. 3, with a resolution of 512*512, so , Most of the information in Figure 2 is lost, resulting in unsatisfactory detection of small targets.
本步骤中,可以按照预设规则对第一图像进行分割处理,得到至少两个分割图像。其中,预设规则可以包括具体的分割数量以及分割方式等,如平均分割或按照比例分割等,又如左右结构的分割、上下结构的分割、田字形分割以及九宫格式分割等等。具体的分割数量以及分割方式可根据图像分析单元的数量以及其他参考因素确定,本发明实施例不做限定。In this step, the first image may be segmented according to a preset rule to obtain at least two segmented images. Among them, the preset rules can include specific number of divisions and division methods, such as equal division or proportional division, etc., such as the division of left and right structures, the division of upper and lower structures, the division of Tian shape, and the division of Jiugong format. The specific number of segmentation and the segmentation method can be determined according to the number of image analysis units and other reference factors, which are not limited in the embodiment of the present invention.
本发明实施例中,为了加强与现有技术的对比效果,仍以图2中的图像为例。图4为本发明实施例一提供的一种分割后的左侧图像示意图,图5为本发明实施例一提供的一种分割后的右侧图像示意图,参照图4和图5,可以对图2中的图像进行左右结构的平均分割,得到两个图像比例为8:9的分割图像。In the embodiment of the present invention, in order to enhance the contrast effect with the prior art, the image in FIG. 2 is still taken as an example. FIG. 4 is a schematic diagram of a divided left image according to Embodiment 1 of the present invention, and FIG. 5 is a schematic diagram of a divided right image according to Embodiment 1 of the present invention. Referring to FIG. 4 and FIG. The image in 2 is divided equally between the left and right structure, and two divided images with an image ratio of 8:9 are obtained.
步骤103、对所述至少两个分割图像进行尺寸变更操作,得到至少两个子图像,所述至少两个子图像的分辨率与所述至少两个图像分析单元对应的分辨率相匹配。Step 103: Perform a size change operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units.
本发明实施例中,对分割图像进行尺寸变更操作的具体方式不做限定,该尺寸变更操作的目的是使至少两个子图像的分辨率与至少两个图像分析单元对应的分辨率相匹配。示例性的,一般的,至少两个图像分析单元对应的分辨率相等,这样,至少两个子图像的分辨率与该分辨率相同。In the embodiment of the present invention, the specific manner of performing the resizing operation on the segmented image is not limited, and the purpose of the resizing operation is to match the resolutions of at least two sub-images with the resolutions corresponding to at least two image analysis units. Exemplarily, and generally, the resolutions corresponding to at least two image analysis units are equal, so that the resolutions of at least two sub-images are the same as the resolution.
示例性的,尺寸变更操作可包括利用插值算法进行的尺寸变更操作。插值算法例如可以是最近邻法、双线性法、双三次法、基于像素区域关系的算法、以及兰索斯插值法等。Exemplarily, the size change operation may include a size change operation performed by an interpolation algorithm. The interpolation algorithm may be, for example, the nearest neighbor method, the bilinear method, the bicubic method, the algorithm based on the pixel region relationship, and the Lanzos interpolation method.
图6为本发明实施例一提供的一种尺寸变更后的左侧图像示意图,图7为本发明实施例一提供的一种尺寸变更后的右侧图像示意图。参照图6和图7,分别对图5和图6中的图像进行尺寸变更操作,得到两张图像比例为1:1的图像, 分辨率为512*512。FIG. 6 is a schematic diagram of a left side image after a size change provided in the first embodiment of the present invention, and FIG. 7 is a schematic diagram of a right side image after a size change provided in the first embodiment of the present invention. Referring to FIGS. 6 and 7, the size change operation is performed on the images in FIGS. 5 and 6 respectively, and two images with an image ratio of 1:1 and a resolution of 512*512 are obtained.
步骤104、将所述至少两个子图像输入至所述至少两个图像分析单元中,并根据所述至少两个图像分析单元的分析结果确定目标检测结果。Step 104: Input the at least two sub-images into the at least two image analysis units, and determine a target detection result according to the analysis results of the at least two image analysis units.
通过采用本发明实施例的方案,使得输入至图像分析单元的图像的总面积变大,参照上述举例,相当于将图像中的目标放大了一倍,若分割图像数量更多,则放大倍数也更大,降低了目标检测的难度,可有效提高目标检测的准确度以及成功率。By adopting the solution of the embodiment of the present invention, the total area of the image input to the image analysis unit becomes larger. Referring to the above example, it is equivalent to double the target in the image. If the number of divided images is more, the magnification is also Larger, reducing the difficulty of target detection, can effectively improve the accuracy and success rate of target detection.
所述至少两个图像分析单元的工作时序本发明实施例不做具体限定。可选的,所述将所述至少两个子图像输入至所述至少两个图像分析单元中之后,还包括:控制所述至少两个图像分析单元并行对所接收到的子图像进行分析处理。这样设置的好处在于,在保证检测实时性的同时,提升目标检测的准确率和成功率。The working sequence of the at least two image analysis units is not specifically limited in the embodiment of the present invention. Optionally, after inputting the at least two sub-images into the at least two image analysis units, the method further includes: controlling the at least two image analysis units to analyze and process the received sub-images in parallel. The advantage of this setting is that it improves the accuracy and success rate of target detection while ensuring real-time detection.
示例性的,图像分析单元的分析结果所包含的内容与图像分析单元的具体类型、型号以及功能等有关,本发明实施例不做限定。一般的,分析结果中可包括分析出来的目标的位置信息以及类型信息等。目标可以是目标物体或目标人物等,可以是预先指定的目标,也可以是自动识别出来的目标,可以根据实际需求进行设置。可对至少两个图像分析单元的分析结果进行整合,确定最终的目标检测结果。Exemplarily, the content contained in the analysis result of the image analysis unit is related to the specific type, model, and function of the image analysis unit, which is not limited in the embodiment of the present invention. Generally, the analysis result may include the location information and type information of the analyzed target. The target can be a target object or a target person, etc. It can be a pre-designated target or an automatically recognized target, which can be set according to actual needs. The analysis results of at least two image analysis units can be integrated to determine the final target detection result.
本发明实施例中提供的目标检测方法,应用于无人机,无人机中集成有至少两个图像分析单元,获取云台相机拍摄的第一图像,对第一图像进行分割处理,对至少两个分割图像进行尺寸变更操作,得到的至少两个子图像的分辨率与至少两个图像分析单元对应的分辨率相匹配,将至少两个子图像输入至至少两个图像分析单元中,并根据至少两个图像分析单元的分析结果确定目标检测 结果。通过采用上述技术方案,将云台相机拍摄的原始图像进行分割后,在进行尺寸变更操作时,可减少图像信息的丢失量,随后交由至少两个图像分析单元进行分析,可提升目标检测的准确率和成功率。The target detection method provided in the embodiment of the present invention is applied to an unmanned aerial vehicle. The unmanned aerial vehicle is integrated with at least two image analysis units to acquire the first image taken by the pan/tilt camera, and perform segmentation processing on the first image, and at least Perform a size change operation on two divided images, and the resolutions of the obtained at least two sub-images match the resolutions corresponding to the at least two image analysis units. The at least two sub-images are input into the at least two image analysis units, and the The analysis results of the two image analysis units determine the target detection result. By adopting the above technical solution, after the original image taken by the pan/tilt camera is divided, the loss of image information can be reduced when the size is changed, and then it can be analyzed by at least two image analysis units, which can improve the target detection Accuracy and success rate.
实施例二Example two
图8为本发明实施例二提供的一种目标检测方法的流程示意图,该方法在上述实施例基础上进行优化,对根据所述至少两个图像分析单元的分析结果确定目标检测结果的具体过程进行细化。FIG. 8 is a schematic flowchart of a target detection method according to the second embodiment of the present invention. The method is optimized on the basis of the above embodiment, and the specific process of determining the target detection result according to the analysis results of the at least two image analysis units To refine.
示例性的,所述根据所述至少两个图像分析单元的分析结果确定目标检测结果,包括:获取所述至少两个图像分析单元的分析结果;对至少两个分析结果进行融合处理,得到目标检测结果。这样设置的好处在于,在进行分割处理时,可能目标处于分割位置,导致在相邻图像中均会检测到目标,针对这种情况,可以对分析结果进行融合处理,以对被分割的目标的分析结果进行融合。Exemplarily, the determining the target detection result according to the analysis results of the at least two image analysis units includes: acquiring the analysis results of the at least two image analysis units; performing fusion processing on the at least two analysis results to obtain the target Test results. The advantage of this setting is that during the segmentation process, the target may be in the segmentation position, resulting in the target being detected in the adjacent images. In this case, the analysis results can be fused to determine the segmentation of the target. The analysis results are merged.
进一步的,所述分析结果中包括分析出来的目标的类型信息和位置信息,所述对至少两个分析结果进行融合处理,包括:依次将每两个相邻的子图像记为当前子图像对,所述当前子图像对包括第一子图像和第二子图像,针对所述当前子图像对进行如下操作:确定所述第一子图像中的第一目标,以及所述第二子图像中的第二目标,根据所述第一目标对应的第一位置信息和第一类型信息,以及所述第二目标对应的第二位置信息和第二类型信息,确定所述第一目标和所述第二目标是否对应同一目标,若是,则将所述第一目标和所述第二目标融合为同一目标。这样设置的好处在于,可以根据位置信息和类型信息逐一判断每两个相邻子图像中是否存在被分割的目标对应的图像,能够准确地识别出在图像中被分割的目标。Further, the analysis result includes the type information and position information of the analyzed target, and the fusion processing of at least two analysis results includes: sequentially recording every two adjacent sub-images as a current sub-image pair , The current sub-image pair includes a first sub-image and a second sub-image, and the following operations are performed on the current sub-image pair: determining the first target in the first sub-image, and determining the first target in the second sub-image According to the first position information and first type information corresponding to the first target, and the second position information and second type information corresponding to the second target, the first target and the Whether the second target corresponds to the same target, and if so, the first target and the second target are merged into the same target. The advantage of this setting is that it can determine whether there is an image corresponding to the segmented target in every two adjacent sub-images one by one according to the position information and the type information, and can accurately identify the segmented target in the image.
具体的,该方法包括如下步骤:Specifically, the method includes the following steps:
步骤201、获取云台相机拍摄的第一图像。Step 201: Obtain a first image taken by a pan-tilt camera.
步骤202、对第一图像进行分割处理,得到至少两个分割图像。Step 202: Perform segmentation processing on the first image to obtain at least two segmented images.
步骤203、对至少两个分割图像进行尺寸变更操作,得到至少两个子图像,至少两个子图像的分辨率与至少两个图像分析单元对应的分辨率相匹配。Step 203: Perform a size change operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units.
步骤204、将至少两个子图像输入至所述至少两个图像分析单元中,并控制至少两个图像分析单元并行对所接收到的子图像进行分析处理。Step 204: Input at least two sub-images into the at least two image analysis units, and control the at least two image analysis units to analyze and process the received sub-images in parallel.
步骤205、获取至少两个图像分析单元的分析结果。Step 205: Obtain analysis results of at least two image analysis units.
步骤206、依次将每两个相邻的子图像记为当前子图像对,针对当前子图像对进行如下操作:确定第一子图像中的第一目标以及第二子图像中的第二目标,根据第一目标对应的第一位置信息和第一类型信息,以及第二目标对应的第二位置信息和第二类型信息,确定第一目标和第二目标是否对应同一目标,若是,则将第一目标和所述第二目标融合为同一目标。Step 206: Record every two adjacent sub-images as a current sub-image pair in turn, and perform the following operations for the current sub-image pair: determine the first target in the first sub-image and the second target in the second sub-image; According to the first location information and the first type information corresponding to the first target, and the second location information and the second type information corresponding to the second target, it is determined whether the first target and the second target correspond to the same target. A target and the second target merge into the same target.
其中,所述分析结果中包括分析出来的目标的类型信息和位置信息,当前子图像对包括第一子图像和第二子图像。第一目标可以是第一子图像中分析出来的任意一个目标,第二目标可以是第二子图像中分析出来的任意一个目标。Wherein, the analysis result includes the type information and position information of the analyzed target, and the current sub-image pair includes the first sub-image and the second sub-image. The first target may be any target analyzed in the first sub-image, and the second target may be any target analyzed in the second sub-image.
可选的,为了减少计算量,可以对第一目标和第二目标进行初筛,将距离分割边界较近的目标确定为第一目标或第二目标。示例性的,以第一目标为例,记第一子图像中与第二子图像重合的边界为分割边界,获取第一子图像中分析出来的备选目标,针对每个备选目标,判断当前备选目标与所述分割边界的第五距离,若所述第五距离小于第三预设阈值,则将所述当前备选目标确定为第一目标。同理,可参考上述内容来确定第二目标。其中,第三预设阈值可以根据子图像的尺寸进行设置,例如可以是与分割边界垂直的边的边长的预设比例,预设比例例如可以是10%。Optionally, in order to reduce the amount of calculation, a preliminary screening may be performed on the first target and the second target, and the target closer to the segmentation boundary may be determined as the first target or the second target. Exemplarily, take the first target as an example, record the boundary overlapping with the second sub-image in the first sub-image as the segmentation boundary, obtain the candidate targets analyzed in the first sub-image, and determine for each candidate target The fifth distance between the current candidate target and the segmentation boundary, and if the fifth distance is less than a third preset threshold, the current candidate target is determined as the first target. In the same way, you can refer to the above content to determine the second goal. The third preset threshold may be set according to the size of the sub-image, for example, it may be a preset ratio of the side length of the side perpendicular to the segmentation boundary, and the preset ratio may be, for example, 10%.
示例性的,分析结果中的位置信息可以包括坐标范围,该坐标范围可以形成一定的形状,例如可以是圆形、椭圆形或矩形等,也可以是与目标外形相匹配的形状。Exemplarily, the position information in the analysis result may include a coordinate range, and the coordinate range may form a certain shape, such as a circle, an ellipse, or a rectangle, or a shape that matches the shape of the target.
可选的,所述位置信息包括矩形框的坐标,所述矩形框内包含分析出来的目标对应的图像。所述第一目标对应的矩形框记为第一矩形框,所述第二目标对应的矩形框记为第二矩形框。类型信息可以由图像分析单元的具体能力确定,例如,可以分析出是运动物体还是静物、是动物还是人物,还可以分析出具体的类别,如车辆、房屋等,还可分析出更细致的类别,如轿车、公交车、消防车以及救护车等等。Optionally, the position information includes the coordinates of a rectangular frame, and the rectangular frame contains an image corresponding to the analyzed target. The rectangular frame corresponding to the first target is recorded as a first rectangular frame, and the rectangular frame corresponding to the second target is recorded as a second rectangular frame. Type information can be determined by the specific capabilities of the image analysis unit. For example, it can analyze whether it is a moving object or a still life, an animal or a person, and it can also analyze specific categories, such as vehicles, houses, etc., and analyze more detailed categories. , Such as cars, buses, fire trucks, ambulances, etc.
示例性的,针对第一矩形和第二矩形采用同样的规则进行四条边的编号,然后基于各边之间的距离以及两个目标对应的类型信息来判断两个矩形是否对应同一目标。对于左右相邻情况,可以判断两个矩形框在水平方向上的距离是否足够近,在竖直方向上偏离同一水平线的程度是否足够小;对于上下相邻情况,可以判断两个矩形框在竖直方向上的距离是否足够近,在水平方向上偏离同一垂直线的程度是否足够小。若满足上述条件,且第一目标和第二目标类型信息相同时,可认为第一目标和第二目标为同一目标。Exemplarily, the same rule is adopted for numbering the four sides of the first rectangle and the second rectangle, and then it is determined whether the two rectangles correspond to the same target based on the distance between the sides and the type information corresponding to the two targets. In the case of adjacent left and right, it can be judged whether the distance between the two rectangular boxes in the horizontal direction is close enough, and whether the degree of deviation from the same horizontal line in the vertical direction is small enough; in the case of adjacent upper and lower sides, it can be judged that the two rectangular boxes are in the vertical direction. Whether the distance in the vertical direction is close enough, and whether the deviation from the same vertical line in the horizontal direction is small enough. If the above conditions are met and the first target and the second target have the same type information, the first target and the second target can be considered to be the same target.
具体的,所述根据所述第一目标对应的第一位置信息和第一类型信息,以及所述第二目标对应的第二位置信息和第二类型信息,确定所述第一目标和所述第二目标是否为对应同一目标,可包括:Specifically, the first target and the first type information are determined according to the first position information and the first type information corresponding to the first target, and the second position information and the second type information corresponding to the second target. Whether the second target corresponds to the same target can include:
根据所述第一矩形框的坐标和所述第二矩形框的坐标,计算所述第一矩形框的第一边界与所述第二矩形框的第三边界的第一距离、所述第一矩形框的第三边界与所述第二矩形框的第一边界的第二距离、所述第一矩形框的第二边界与所述第二矩形框的第四边界的第三距离、以及所述第一矩形框的第四边界与 所述第二矩形框的第二边界的第四距离,其中,每个矩形框中的第一边界和第三边界平行,第二边界和第四边界平行,当所述第一子图像与所述第二子图像为左右相邻时,每个矩形框中的第一边界为左边界,当所述第一子图像与所述第二子图像为上下相邻时,每个矩形中的第一边界为上边界;According to the coordinates of the first rectangular frame and the coordinates of the second rectangular frame, the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame, and the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame are calculated. The second distance between the third boundary of the rectangular frame and the first boundary of the second rectangular frame, the third distance between the second boundary of the first rectangular frame and the fourth boundary of the second rectangular frame, and the The fourth distance between the fourth boundary of the first rectangular frame and the second boundary of the second rectangular frame, wherein the first boundary and the third boundary in each rectangular frame are parallel, and the second boundary and the fourth boundary are parallel , When the first sub-image and the second sub-image are left and right adjacent, the first boundary in each rectangular frame is the left boundary, and when the first sub-image and the second sub-image are up and down When adjacent, the first boundary in each rectangle is the upper boundary;
计算所述第一距离和所述第二距离中,数值较小的距离与数值较大的距离的第一比值;以及,计算所述第三距离和所述第四距离中,数值较小的距离与数值较大的距离的第二比值;Calculate the first ratio of the distance with the smaller value to the distance with the larger value in the first distance and the second distance; and calculate the third distance and the fourth distance, with the smaller value The second ratio of the distance to the greater distance;
当所述第一比值小于第一预设阈值、所述第二比值大于第二预设阈值、且所述第一类型信息和所述第二类型信息相同时,确定所述第一目标和所述第二目标是否为对应同一目标,其中,所述第一预设阈值小于所述第二预设阈值。When the first ratio is less than a first preset threshold, the second ratio is greater than a second preset threshold, and the first type information and the second type information are the same, the first target and the second type information are determined Whether the second target corresponds to the same target, wherein the first preset threshold is smaller than the second preset threshold.
其中,第一预设阈值和第二预设阈值可以根据实际需求设置,例如,第一预设阈值为0.1,第二预设阈值为0.6。Wherein, the first preset threshold and the second preset threshold can be set according to actual needs, for example, the first preset threshold is 0.1 and the second preset threshold is 0.6.
可选的,所述将所述第一目标和所述第二目标融合为同一目标,包括:根据所述第一矩形框的坐标和所述第二矩形的坐标确定目标矩形框,所述目标矩形框同时包含所述第一矩形框和所述第二矩形框;将所述目标矩形框和第一类型信息确定为融合后的目标对应的分析结果。这样设置的好处在于,在确定第一目标和第二目标为同一目标时,可以将同时包含第一矩形框和第二矩形框的目标矩形框确定为该目标最终的位置信息,避免最终的目标检测结果中的目标数量出现错误。Optionally, the fusing the first target and the second target into the same target includes: determining a target rectangular frame according to the coordinates of the first rectangular frame and the coordinates of the second rectangle, the target The rectangular frame includes both the first rectangular frame and the second rectangular frame; the target rectangular frame and the first type information are determined as the analysis result corresponding to the fused target. The advantage of this setting is that when the first target and the second target are determined to be the same target, the target rectangular frame containing both the first rectangular frame and the second rectangular frame can be determined as the final position information of the target, avoiding the final target The number of targets in the test result is wrong.
步骤207、将经过融合处理后的结果确定为目标检测结果。Step 207: Determine the result after the fusion processing as the target detection result.
本发明实施例提供的目标检测方法,在进行图像分割以及尺寸变更之后,交由至少两个图像分析单元进行并行处理,在得到各图像分析单元的初步分析结果后,充分考虑同一目标被分割到两个子图像中的情况,对判断出来的被分 割的目标的分析结果进行融合,最终得到准确的目标检测结果。In the target detection method provided by the embodiment of the present invention, after the image segmentation and size change are performed, it is handed over to at least two image analysis units for parallel processing. After the preliminary analysis results of each image analysis unit are obtained, it is fully considered that the same target is segmented into The conditions in the two sub-images are merged with the analysis results of the determined segmented targets, and finally an accurate target detection result is obtained.
在上述实施例基础上,在确定目标检测结果之后,还可包括,将包含目标检测结果的至少两个子图像进行拼接操作,并输出至用户设备。其中,用户设备可以是移动终端或计算机等供用户查看目标检测结果的设备。On the basis of the foregoing embodiment, after the target detection result is determined, it may further include performing a splicing operation on at least two sub-images containing the target detection result, and output to the user equipment. Among them, the user equipment may be a device such as a mobile terminal or a computer for the user to view the target detection result.
实施例三Example three
图9为本发明实施例三提供的一种目标检测方法的流程示意图,该方法以无人机中集成有两个图像分析单元,对图像进行左右平均分割为例进行说明,具体的,该方法包括如下步骤:Fig. 9 is a schematic flow chart of a target detection method provided in the third embodiment of the present invention. The method is described by taking the example of integrating two image analysis units in a drone to divide the image into left and right equally. Specifically, the method Including the following steps:
步骤301、获取云台相机拍摄的第一图像。Step 301: Obtain a first image taken by a pan-tilt camera.
为了便于说明,以图2中的图像为第一图像为例进行下面的描述。该图像比例为16:9,分辨率为1920*1080。For ease of description, the following description is made by taking the image in FIG. 2 as the first image as an example. The image ratio is 16:9 and the resolution is 1920*1080.
步骤302、对第一图像进行左右平均分割处理,得到两个分割图像。Step 302: Perform left and right average division processing on the first image to obtain two divided images.
对图2中的图像进行左右结构的平均分割,得到两个图像比例为8:9的分割图像,如图4和图5所示。Perform the average division of the left and right structure on the image in Fig. 2 to obtain two divided images with an image ratio of 8:9, as shown in Figs. 4 and 5.
步骤303、对两个分割图像进行尺寸变更操作,得到两个子图像,两个子图像的分辨率与两个图像分析单元对应的分辨率相匹配。Step 303: Perform a size change operation on the two divided images to obtain two sub-images, and the resolutions of the two sub-images match the resolutions corresponding to the two image analysis units.
示例性的,两个图像分析单元为HI3559C芯片上携带的两个专门针对神经网络进行加速的正向推理器,每个推理器所支持的分辨率为512*512,参照图6和图7,分别对图5和图6中的图像进行尺寸变更操作,得到两张图像比例为1:1的图像,分辨率为512*512。Exemplarily, the two image analysis units are the two forward reasoners that are carried on the HI3559C chip specifically for accelerating neural networks, and the resolution supported by each reasoner is 512*512. Refer to Figure 6 and Figure 7, Resizing the images in Figure 5 and Figure 6 were performed to obtain two images with an image ratio of 1:1 and a resolution of 512*512.
步骤304、将两个子图像输入至两个图像分析单元中,并控制两个图像分析单元并行对所接收到的子图像进行分析处理。Step 304: Input two sub-images into two image analysis units, and control the two image analysis units to analyze and process the received sub-images in parallel.
步骤305、获取两个图像分析单元的分析结果。Step 305: Obtain the analysis results of the two image analysis units.
示例性的,两个推理器会分别给出分析得到的目标在所属子图像中的位置信息(BBox)和类别(Class)信息。其中,位置信息以矩形框的坐标表示。当一个目标在左右两个子图像中并存时,如图中的汽车,同时出现在图6和图7中,那么两个推理器也会分别给出自己负责的子图像中的汽车的位置信息。图10为本发明实施例三提供的一种包含位置信息的左侧图像示意图,图11为本发明实施例三提供的一种包含位置信息的右侧图像示意图,如图10和图11所示,分别采用矩形框圈出了分析出来的目标的位置。Exemplarily, the two reasoners will respectively provide location information (BBox) and category (Class) information of the analyzed target in the sub-image to which it belongs. Among them, the position information is represented by the coordinates of the rectangular frame. When a target coexists in the left and right sub-images, such as the car in the picture, which appears in both Fig. 6 and Fig. 7, then the two reasoners will also respectively give the position information of the car in the sub-image for which they are responsible. FIG. 10 is a schematic diagram of a left side image including location information provided by Embodiment 3 of the present invention, and FIG. 11 is a schematic diagram of a right side image including location information provided by Embodiment 3 of the present invention, as shown in FIGS. 10 and 11 , Respectively use rectangular boxes to circle the positions of the analyzed targets.
步骤306、确定第一子图像中的第一目标以及第二子图像中的第二目标,根据第一目标对应的第一位置信息和第一类型信息,以及第二目标对应的第二位置信息和第二类型信息,确定第一目标和第二目标是否对应同一目标,若是,则将第一目标和第二目标融合为同一目标。Step 306: Determine the first target in the first sub-image and the second target in the second sub-image, according to the first location information and the first type information corresponding to the first target, and the second location information corresponding to the second target With the second type of information, it is determined whether the first target and the second target correspond to the same target, and if so, the first target and the second target are merged into the same target.
图12为本发明实施例三提供的一种分析结果融合示意图,如图所示,左侧矩形框Left BBox表示第一目标的第一矩形框,右侧矩形框Right BBox表示第二目标的第二矩形框。Fig. 12 is a schematic diagram of a fusion of analysis results provided by Embodiment 3 of the present invention. As shown in the figure, the left rectangular box Left BBox represents the first rectangular box of the first target, and the right rectangular box Right BBox represents the second target’s first rectangular box. Two rectangular boxes.
其中,左图的矩形框和右图的矩形框处于同一坐标系中,该坐标系可根据第一子图像和第二子图像拼接成的图像来确定,例如,以该图像的左下角为坐标原点,下边界为横轴,左边界为竖轴。左图的矩形框可以用坐标(Ltop,Lbottom,Lleft,Lrigth)表示,右图的矩形框可以用坐标(Rtop,Rbottom,Rleft,Rrigth)表示,图中的W、w、H和h以如下公式表示。Among them, the rectangular frame in the left picture and the rectangular frame in the right picture are in the same coordinate system, and the coordinate system can be determined according to the spliced image of the first sub-image and the second sub-image, for example, the lower left corner of the image is the coordinate The origin, the lower boundary is the horizontal axis, and the left boundary is the vertical axis. The rectangular box on the left can be represented by coordinates (Ltop, Lbottom, Lleft, Lrigth), and the rectangular box on the right can be represented by coordinates (Rtop, Rbottom, Rleft, Rrigth). W, w, H, and h in the figure are as follows Formula representation.
W=Rrigth–Lleft w=Rleft–LrigthW=Rrigth–Lleft w=Rleft–Lrigth
H=Rbottom–Ltop h=Lbottom-RtopH=Rbottom-Ltop h=Lbottom-Rtop
当w/W<0.1并且h/H>0.6的时候,并且类别信息相同,可以认为左右两个BBox为同一目标,这时融合后的BBox为(Ltop,Rbottom,Lleft,Rrigth)。其 中的0.1为第一预设阈值,0.6为第二预设阈值。When w/W<0.1 and h/H>0.6, and the category information is the same, it can be considered that the left and right BBoxes are the same target. At this time, the merged BBox is (Ltop, Rbottom, Lleft, Rrigth). Among them, 0.1 is the first preset threshold, and 0.6 is the second preset threshold.
上面只是一种情况,由于矩形框的尺寸以及相对位置关系可能不同,因此可以用通用公式可以表示为:The above is just one case. Since the size and relative position of the rectangular frame may be different, it can be expressed as a general formula:
W=Rrigth–Lleft w=Rleft–LrigthW=Rrigth–Lleft w=Rleft–Lrigth
H=max(Rbottom,Lbottom)–min(Ltop,Rtop)H=max(Rbottom,Lbottom)–min(Ltop,Rtop)
h=min(Lbottom,Rbottom)–max(Rtop,Ltop)h=min(Lbottom,Rbottom)–max(Rtop,Ltop)
当w/W<0.1并且h/H>0.6的时候,并且类别信息相同,可以认为左右两个BBox为同一目标,这时融合后的BBox为(min(Ltop,Rtop),max(Lbottom,Rbottom),Lleft,Rrigth)。When w/W<0.1 and h/H>0.6, and the category information is the same, it can be considered that the left and right BBoxes are the same target. At this time, the merged BBox is (min(Ltop, Rtop), max(Lbottom, Rbottom) ), Lleft, Rrigth).
步骤307、将经过融合处理后的结果确定为目标检测结果。Step 307: Determine the result after the fusion processing as the target detection result.
本发明实施例提供的目标检测方法,对云台相机采集的原始图像进行左右结构的平均分割,并进行尺寸变更操作,交由两个推理器进行并行处理,在得到两个推理器的初步分析结果后,充分考虑同一目标被分割到两个子图像中的情况,对判断出来的被分割的目标的分析结果进行融合,最终得到准确的目标检测结果。通过上述举例可以看出,检测分辨率从512*512扩大至1024*512,能够提升小目标的检测成功率,双推理器并行运算,耗时和与单推理器的512*512时相同,8:9的图像resize成1:1相比较于16:9的图像resize成1:1,resize过程保留了图像更多的信息,进一步提升目标检测的准确度和成功率。In the target detection method provided by the embodiment of the present invention, the original image collected by the pan/tilt camera is divided equally between the left and right structure, and the size is changed, and then the two reasoners are processed in parallel, and the preliminary analysis of the two reasoners is obtained. After the result, the situation that the same target is segmented into two sub-images is fully considered, and the analysis results of the determined segmented targets are merged, and finally an accurate target detection result is obtained. It can be seen from the above example that the detection resolution is expanded from 512*512 to 1024*512, which can improve the detection success rate of small targets. The parallel operation of dual reasoners is the same as that of 512*512 with single reasoners. The image resizing of :9 is 1:1 compared to the image resizing of 16:9 to 1:1. The resizing process retains more information of the image and further improves the accuracy and success rate of target detection.
实施例四Example four
图13为本发明实施例四提供的一种目标检测装置的结构框图,该装置可由软件和/或硬件实现,一般可集成在无人机中,可通过执行目标检测方法来进行目标检测,其中,无人机中集成有至少两个图像分析单元。如图13所示,该装置包括:Fig. 13 is a structural block diagram of a target detection device provided by the fourth embodiment of the present invention. The device can be implemented by software and/or hardware, and can generally be integrated in an unmanned aerial vehicle. Target detection can be performed by executing a target detection method. At least two image analysis units are integrated in the drone. As shown in Figure 13, the device includes:
图像获取模块401,用于获取云台相机拍摄的第一图像;The image acquisition module 401 is used to acquire the first image taken by the pan-tilt camera;
图像分割模块402,用于对所述第一图像进行分割处理,得到至少两个分割图像;The image segmentation module 402 is configured to perform segmentation processing on the first image to obtain at least two segmented images;
尺寸变更模块403,用于对所述至少两个分割图像进行尺寸变更操作,得到至少两个子图像,所述至少两个子图像的分辨率与所述至少两个图像分析单元对应的分辨率相匹配;The size changing module 403 is configured to perform a size changing operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units ;
目标检测模块404,用于将所述至少两个子图像输入至所述至少两个图像分析单元中,并根据所述至少两个图像分析单元的分析结果确定目标检测结果。The target detection module 404 is configured to input the at least two sub-images into the at least two image analysis units, and determine the target detection result according to the analysis results of the at least two image analysis units.
本发明实施例中提供的目标检测装置,应用于无人机,无人机中集成有至少两个图像分析单元,获取云台相机拍摄的第一图像,对第一图像进行分割处理,对至少两个分割图像进行尺寸变更操作,得到的至少两个子图像的分辨率与至少两个图像分析单元对应的分辨率相匹配,将至少两个子图像输入至至少两个图像分析单元中,并根据至少两个图像分析单元的分析结果确定目标检测结果。通过采用上述技术方案,将云台相机拍摄的原始图像进行分割后,在进行尺寸变更操作时,可减少图像信息的丢失量,随后交由至少两个图像分析单元进行分析,可提升目标检测的准确率和成功率。The target detection device provided in the embodiment of the present invention is applied to an unmanned aerial vehicle. The unmanned aerial vehicle is integrated with at least two image analysis units to acquire the first image taken by the pan/tilt camera, and perform segmentation processing on the first image to determine at least Perform a size change operation on two divided images, and the resolutions of the obtained at least two sub-images match the resolutions corresponding to the at least two image analysis units. The at least two sub-images are input into the at least two image analysis units, and the The analysis results of the two image analysis units determine the target detection result. By adopting the above technical solution, after the original image taken by the pan/tilt camera is divided, the loss of image information can be reduced when the size is changed, and then it can be analyzed by at least two image analysis units, which can improve the target detection Accuracy and success rate.
可选的,所述根据所述至少两个图像分析单元的分析结果确定目标检测结果,包括:Optionally, the determining the target detection result according to the analysis results of the at least two image analysis units includes:
获取所述至少两个图像分析单元的分析结果;Acquiring the analysis results of the at least two image analysis units;
对至少两个分析结果进行融合处理,得到目标检测结果。Perform fusion processing on at least two analysis results to obtain target detection results.
可选的,所述分析结果中包括分析出来的目标的类型信息和位置信息,所述对至少两个分析结果进行融合处理,包括:Optionally, the analysis result includes type information and location information of the analyzed target, and the fusion processing of at least two analysis results includes:
依次将每两个相邻的子图像记为当前子图像对,所述当前子图像对包括第 一子图像和第二子图像,针对所述当前子图像对进行如下操作:Each two adjacent sub-images are recorded as a current sub-image pair in turn, the current sub-image pair includes a first sub-image and a second sub-image, and the following operations are performed on the current sub-image pair:
确定所述第一子图像中的第一目标,以及所述第二子图像中的第二目标;Determining a first target in the first sub-image and a second target in the second sub-image;
根据所述第一目标对应的第一位置信息和第一类型信息,以及所述第二目标对应的第二位置信息和第二类型信息,确定所述第一目标和所述第二目标是否对应同一目标,若是,则将所述第一目标和所述第二目标融合为同一目标。Determine whether the first target and the second target correspond according to the first location information and the first type information corresponding to the first target, and the second location information and the second type information corresponding to the second target The same target, if it is, the first target and the second target are merged into the same target.
可选的,所述位置信息包括矩形框的坐标,所述矩形框内包含分析出来的目标对应的图像;所述第一目标对应的矩形框记为第一矩形框,所述第二目标对应的矩形框记为第二矩形框;Optionally, the position information includes the coordinates of a rectangular frame, which contains an image corresponding to the analyzed target; the rectangular frame corresponding to the first target is marked as the first rectangular frame, and the second target corresponds to The rectangular frame of is marked as the second rectangular frame;
所述根据所述第一目标对应的第一位置信息和第一类型信息,以及所述第二目标对应的第二位置信息和第二类型信息,确定所述第一目标和所述第二目标是否为对应同一目标,包括:The first target and the second target are determined according to the first location information and the first type information corresponding to the first target, and the second location information and the second type information corresponding to the second target Whether it corresponds to the same target, including:
根据所述第一矩形框的坐标和所述第二矩形框的坐标,计算所述第一矩形框的第一边界与所述第二矩形框的第三边界的第一距离、所述第一矩形框的第三边界与所述第二矩形框的第一边界的第二距离、所述第一矩形框的第二边界与所述第二矩形框的第四边界的第三距离、以及所述第一矩形框的第四边界与所述第二矩形框的第二边界的第四距离,其中,每个矩形框中的第一边界和第三边界平行,第二边界和第四边界平行,当所述第一子图像与所述第二子图像为左右相邻时,每个矩形框中的第一边界为左边界,当所述第一子图像与所述第二子图像为上下相邻时,每个矩形框中的第一边界为上边界;According to the coordinates of the first rectangular frame and the coordinates of the second rectangular frame, the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame, and the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame are calculated. The second distance between the third boundary of the rectangular frame and the first boundary of the second rectangular frame, the third distance between the second boundary of the first rectangular frame and the fourth boundary of the second rectangular frame, and the The fourth distance between the fourth boundary of the first rectangular frame and the second boundary of the second rectangular frame, wherein the first boundary and the third boundary in each rectangular frame are parallel, and the second boundary and the fourth boundary are parallel , When the first sub-image and the second sub-image are left and right adjacent, the first boundary in each rectangular frame is the left boundary, and when the first sub-image and the second sub-image are up and down When adjacent, the first boundary in each rectangular box is the upper boundary;
计算所述第一距离和所述第二距离中,数值较小的距离与数值较大的距离的第一比值;以及,计算所述第三距离和所述第四距离中,数值较小的距离与数值较大的距离的第二比值;Calculate the first ratio of the distance with the smaller value to the distance with the larger value in the first distance and the second distance; and calculate the third distance and the fourth distance, with the smaller value The second ratio of the distance to the greater distance;
当所述第一比值小于第一预设阈值、所述第二比值大于第二预设阈值、且 所述第一类型信息和所述第二类型信息相同时,确定所述第一目标和所述第二目标是否为对应同一目标,其中,所述第一预设阈值小于所述第二预设阈值。When the first ratio is less than a first preset threshold, the second ratio is greater than a second preset threshold, and the first type information and the second type information are the same, the first target and the second type information are determined Whether the second target corresponds to the same target, wherein the first preset threshold is smaller than the second preset threshold.
可选的,所述将所述第一目标和所述第二目标融合为同一目标,包括:Optionally, the fusing the first target and the second target into the same target includes:
根据所述第一矩形框的坐标和所述第二矩形的坐标确定目标矩形框,所述目标矩形框同时包含所述第一矩形框和所述第二矩形框;Determining a target rectangular frame according to the coordinates of the first rectangular frame and the coordinates of the second rectangle, the target rectangular frame including both the first rectangular frame and the second rectangular frame;
将所述目标矩形框和第一类型信息确定为融合后的目标对应的分析结果。The target rectangular frame and the first type information are determined as the analysis result corresponding to the fused target.
可选的,记所述第一子图像中与所述第二子图像重合的边界为分割边界,所述确定所述第一子图像中的第一目标,包括:Optionally, remember that a boundary in the first sub-image that coincides with the second sub-image is a segmentation boundary, and the determining the first target in the first sub-image includes:
获取所述第一子图像中分析出来的备选目标;Acquiring the candidate target analyzed in the first sub-image;
针对每个备选目标,判断当前备选目标与所述分割边界的第五距离,若所述第五距离小于第三预设阈值,则将所述当前备选目标确定为第一目标。For each candidate target, determine the fifth distance between the current candidate target and the segmentation boundary, and if the fifth distance is less than the third preset threshold, determine the current candidate target as the first target.
可选的,所述至少两个图像分析单元包括至少两个基于神经网络进行加速的正向推理器NNIE。Optionally, the at least two image analysis units include at least two forward reasoners NNIE that are accelerated based on a neural network.
实施例五Example five
本发明实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行目标检测方法,该方法包括:An embodiment of the present invention also provides a storage medium containing computer-executable instructions, which are used to execute a target detection method when executed by a computer processor, and the method includes:
获取云台相机拍摄的第一图像;Obtain the first image taken by the pan/tilt camera;
对所述第一图像进行分割处理,得到至少两个分割图像;Performing segmentation processing on the first image to obtain at least two segmented images;
对所述至少两个分割图像进行尺寸变更操作,得到至少两个子图像,所述至少两个子图像的分辨率与所述至少两个图像分析单元对应的分辨率相匹配;Performing a size change operation on the at least two divided images to obtain at least two sub-images, the resolutions of the at least two sub-images matching the resolutions corresponding to the at least two image analysis units;
将所述至少两个子图像输入至所述至少两个图像分析单元中,并根据所述至少两个图像分析单元的分析结果确定目标检测结果。The at least two sub-images are input into the at least two image analysis units, and the target detection result is determined according to the analysis results of the at least two image analysis units.
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质” 旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDRRAM、SRAM、EDORAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。Storage medium-any of various types of storage devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Rambus RAM, etc.; Volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may further include other types of memory or a combination thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the Internet). The second computer system can provide the program instructions to the first computer for execution. The term "storage media" may include two or more storage media that may reside in different locations (for example, in different computer systems connected through a network). The storage medium may store program instructions (for example, embodied as a computer program) executable by one or more processors.
当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的目标检测操作,还可以执行本发明任意实施例所提供的目标检测方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided by an embodiment of the present invention is not limited to the above-mentioned target detection operation, and can also execute the target detection method provided in any embodiment of the present invention. Related operations.
实施例六Example Six
本发明实施例提供了一种无人机,该无人机中可集成本发明实施例提供的目标检测装置。图14为本发明实施例六提供的一种无人机的结构框图。无人机500可以包括:存储器501,处理器502及至少两个图像分析单元503(图中仅示出一个)存储在存储器501上并可在处理器运行的计算机程序,所述处理器502执行所述计算机程序时实现如本发明实施例所述的目标检测方法。该方法可包括:The embodiment of the present invention provides an unmanned aerial vehicle in which the target detection device provided in the embodiment of the present invention can be integrated. FIG. 14 is a structural block diagram of an unmanned aerial vehicle according to Embodiment 6 of the present invention. The drone 500 may include: a memory 501, a processor 502, and at least two image analysis units 503 (only one is shown in the figure). A computer program stored on the memory 501 and running on a processor, the processor 502 executing The computer program implements the target detection method described in the embodiment of the present invention. The method may include:
获取云台相机拍摄的第一图像;Obtain the first image taken by the pan/tilt camera;
对所述第一图像进行分割处理,得到至少两个分割图像;Performing segmentation processing on the first image to obtain at least two segmented images;
对所述至少两个分割图像进行尺寸变更操作,得到至少两个子图像,所述 至少两个子图像的分辨率与所述至少两个图像分析单元对应的分辨率相匹配;Performing a size change operation on the at least two divided images to obtain at least two sub-images, the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units;
将所述至少两个子图像输入至所述至少两个图像分析单元中,并根据所述至少两个图像分析单元的分析结果确定目标检测结果。The at least two sub-images are input into the at least two image analysis units, and the target detection result is determined according to the analysis results of the at least two image analysis units.
本发明实施例提供的计算机设备,将云台相机拍摄的原始图像进行分割后,在进行尺寸变更操作时,可减少图像信息的丢失量,随后交由至少两个图像分析单元进行分析,可提升目标检测的准确率和成功率。The computer device provided by the embodiment of the present invention can reduce the loss of image information during the size change operation after the original image taken by the pan/tilt camera is divided, and then it can be analyzed by at least two image analysis units, which can improve The accuracy and success rate of target detection.
上述实施例中提供的目标检测装置、存储介质以及计算机设备可执行本发明任意实施例所提供的目标检测方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本发明任意实施例所提供的目标检测方法。The target detection device, storage medium, and computer equipment provided in the foregoing embodiments can execute the target detection method provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the foregoing embodiments, reference may be made to the target detection method provided in any embodiment of the present invention.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only the preferred embodiments of the present invention and the applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made to those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope of is determined by the scope of the appended claims.

Claims (10)

  1. 一种目标检测方法,其特征在于,应用于无人机,所述无人机中集成有至少两个图像分析单元,所述方法包括:A target detection method, characterized in that it is applied to an unmanned aerial vehicle in which at least two image analysis units are integrated, and the method includes:
    获取云台相机拍摄的第一图像;Obtain the first image taken by the pan/tilt camera;
    对所述第一图像进行分割处理,得到至少两个分割图像;Performing segmentation processing on the first image to obtain at least two segmented images;
    对所述至少两个分割图像进行尺寸变更操作,得到至少两个子图像,所述至少两个子图像的分辨率与所述至少两个图像分析单元对应的分辨率相匹配;Performing a size change operation on the at least two divided images to obtain at least two sub-images, the resolutions of the at least two sub-images matching the resolutions corresponding to the at least two image analysis units;
    将所述至少两个子图像输入至所述至少两个图像分析单元中,并根据所述至少两个图像分析单元的分析结果确定目标检测结果。The at least two sub-images are input into the at least two image analysis units, and the target detection result is determined according to the analysis results of the at least two image analysis units.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述至少两个图像分析单元的分析结果确定目标检测结果,包括:The method according to claim 1, wherein the determining the target detection result according to the analysis results of the at least two image analysis units comprises:
    获取所述至少两个图像分析单元的分析结果;Acquiring the analysis results of the at least two image analysis units;
    对至少两个分析结果进行融合处理,得到目标检测结果。Perform fusion processing on at least two analysis results to obtain target detection results.
  3. 根据权利要求2所述的方法,其特征在于,所述分析结果中包括分析出来的目标的类型信息和位置信息,所述对至少两个分析结果进行融合处理,包括:The method according to claim 2, wherein the analysis result includes type information and location information of the analyzed target, and the fusion processing of at least two analysis results includes:
    依次将每两个相邻的子图像记为当前子图像对,所述当前子图像对包括第一子图像和第二子图像,针对所述当前子图像对进行如下操作:Each two adjacent sub-images are recorded as a current sub-image pair in turn, the current sub-image pair includes a first sub-image and a second sub-image, and the following operations are performed on the current sub-image pair:
    确定所述第一子图像中的第一目标,以及所述第二子图像中的第二目标;Determining a first target in the first sub-image and a second target in the second sub-image;
    根据所述第一目标对应的第一位置信息和第一类型信息,以及所述第二目标对应的第二位置信息和第二类型信息,确定所述第一目标和所述第二目标是否对应同一目标,若是,则将所述第一目标和所述第二目标融合为同一目标。Determine whether the first target and the second target correspond according to the first location information and the first type information corresponding to the first target, and the second location information and the second type information corresponding to the second target The same target, if it is, the first target and the second target are merged into the same target.
  4. 根据权利要求3所述的方法,其特征在于,所述位置信息包括矩形框的坐标,所述矩形框内包含分析出来的目标对应的图像;所述第一目标对应的矩 形框记为第一矩形框,所述第二目标对应的矩形框记为第二矩形框;The method according to claim 3, wherein the position information includes the coordinates of a rectangular frame, and the rectangular frame contains the image corresponding to the analyzed target; the rectangular frame corresponding to the first target is marked as the first A rectangular frame, the rectangular frame corresponding to the second target is marked as the second rectangular frame;
    所述根据所述第一目标对应的第一位置信息和第一类型信息,以及所述第二目标对应的第二位置信息和第二类型信息,确定所述第一目标和所述第二目标是否为对应同一目标,包括:The first target and the second target are determined according to the first location information and the first type information corresponding to the first target, and the second location information and the second type information corresponding to the second target Whether it corresponds to the same target, including:
    根据所述第一矩形框的坐标和所述第二矩形框的坐标,计算所述第一矩形框的第一边界与所述第二矩形框的第三边界的第一距离、所述第一矩形框的第三边界与所述第二矩形框的第一边界的第二距离、所述第一矩形框的第二边界与所述第二矩形框的第四边界的第三距离、以及所述第一矩形框的第四边界与所述第二矩形框的第二边界的第四距离,其中,每个矩形框中的第一边界和第三边界平行,第二边界和第四边界平行,当所述第一子图像与所述第二子图像为左右相邻时,每个矩形框中的第一边界为左边界,当所述第一子图像与所述第二子图像为上下相邻时,每个矩形框中的第一边界为上边界;According to the coordinates of the first rectangular frame and the coordinates of the second rectangular frame, the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame, and the first distance between the first boundary of the first rectangular frame and the third boundary of the second rectangular frame are calculated. The second distance between the third boundary of the rectangular frame and the first boundary of the second rectangular frame, the third distance between the second boundary of the first rectangular frame and the fourth boundary of the second rectangular frame, and the The fourth distance between the fourth boundary of the first rectangular frame and the second boundary of the second rectangular frame, wherein the first boundary and the third boundary in each rectangular frame are parallel, and the second boundary and the fourth boundary are parallel , When the first sub-image and the second sub-image are left and right adjacent, the first boundary in each rectangular frame is the left boundary, and when the first sub-image and the second sub-image are up and down When adjacent, the first boundary in each rectangular box is the upper boundary;
    计算所述第一距离和所述第二距离中,数值较小的距离与数值较大的距离的第一比值;以及,计算所述第三距离和所述第四距离中,数值较小的距离与数值较大的距离的第二比值;Calculate the first ratio of the distance with the smaller value to the distance with the larger value in the first distance and the second distance; and calculate the third distance and the fourth distance, with the smaller value The second ratio of the distance to the greater distance;
    当所述第一比值小于第一预设阈值、所述第二比值大于第二预设阈值、且所述第一类型信息和所述第二类型信息相同时,确定所述第一目标和所述第二目标是否为对应同一目标,其中,所述第一预设阈值小于所述第二预设阈值。When the first ratio is less than a first preset threshold, the second ratio is greater than a second preset threshold, and the first type information and the second type information are the same, the first target and the second type information are determined Whether the second target corresponds to the same target, wherein the first preset threshold is smaller than the second preset threshold.
  5. 根据权利要求4所述的方法,其特征在于,所述将所述第一目标和所述第二目标融合为同一目标,包括:The method according to claim 4, wherein the fusing the first target and the second target into the same target comprises:
    根据所述第一矩形框的坐标和所述第二矩形的坐标确定目标矩形框,所述目标矩形框同时包含所述第一矩形框和所述第二矩形框;Determining a target rectangular frame according to the coordinates of the first rectangular frame and the coordinates of the second rectangle, the target rectangular frame including both the first rectangular frame and the second rectangular frame;
    将所述目标矩形框和第一类型信息确定为融合后的目标对应的分析结果。The target rectangular frame and the first type information are determined as the analysis result corresponding to the fused target.
  6. 根据权利要求3所述的方法,其特征在于,记所述第一子图像中与所述第二子图像重合的边界为分割边界,所述确定所述第一子图像中的第一目标,包括:The method according to claim 3, wherein the boundary in the first sub-image that coincides with the second sub-image is a segmentation boundary, and the first target in the first sub-image is determined, include:
    获取所述第一子图像中分析出来的备选目标;Acquiring the candidate target analyzed in the first sub-image;
    针对每个备选目标,判断当前备选目标与所述分割边界的第五距离,若所述第五距离小于第三预设阈值,则将所述当前备选目标确定为第一目标。For each candidate target, determine the fifth distance between the current candidate target and the segmentation boundary, and if the fifth distance is less than the third preset threshold, determine the current candidate target as the first target.
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述至少两个图像分析单元包括至少两个基于神经网络进行加速的正向推理器NNIE。The method according to any one of claims 1 to 6, wherein the at least two image analysis units include at least two forward reasoners NNIE that are accelerated based on neural networks.
  8. 一种目标检测装置,其特征在于,应用于无人机,所述无人机中集成有至少两个图像分析单元,所述装置包括:A target detection device, characterized in that it is applied to an unmanned aerial vehicle, at least two image analysis units are integrated in the unmanned aerial vehicle, and the device includes:
    图像获取模块,用于获取云台相机拍摄的第一图像;The image acquisition module is used to acquire the first image taken by the pan-tilt camera;
    图像分割模块,用于对所述第一图像进行分割处理,得到至少两个分割图像;An image segmentation module, configured to perform segmentation processing on the first image to obtain at least two segmented images;
    尺寸变更模块,用于对所述至少两个分割图像进行尺寸变更操作,得到至少两个子图像,所述至少两个子图像的分辨率与所述至少两个图像分析单元对应的分辨率相匹配;A size changing module, configured to perform a size changing operation on the at least two divided images to obtain at least two sub-images, and the resolutions of the at least two sub-images match the resolutions corresponding to the at least two image analysis units;
    目标检测模块,用于将所述至少两个子图像输入至所述至少两个图像分析单元中,并根据所述至少两个图像分析单元的分析结果确定目标检测结果。The target detection module is configured to input the at least two sub-images into the at least two image analysis units, and determine the target detection result according to the analysis results of the at least two image analysis units.
  9. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7任一项所述的方法。A computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the method according to any one of claims 1-7.
  10. 一种无人机,包括存储器、至少两个图像分析单元、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1-7任一项所述的方法。An unmanned aerial vehicle, comprising a memory, at least two image analysis units, a processor, and a computer program stored on the memory and running on the processor, characterized in that the processor executes the computer program as follows: The method of any one of claims 1-7.
PCT/CN2020/124055 2019-11-01 2020-10-27 Target detection method and apparatus, storage medium and unmanned aerial vehicle WO2021083151A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911060737.1A CN110796104A (en) 2019-11-01 2019-11-01 Target detection method and device, storage medium and unmanned aerial vehicle
CN201911060737.1 2019-11-01

Publications (1)

Publication Number Publication Date
WO2021083151A1 true WO2021083151A1 (en) 2021-05-06

Family

ID=69442491

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124055 WO2021083151A1 (en) 2019-11-01 2020-10-27 Target detection method and apparatus, storage medium and unmanned aerial vehicle

Country Status (2)

Country Link
CN (1) CN110796104A (en)
WO (1) WO2021083151A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110796104A (en) * 2019-11-01 2020-02-14 深圳市道通智能航空技术有限公司 Target detection method and device, storage medium and unmanned aerial vehicle
CN111951328A (en) * 2020-08-05 2020-11-17 清华大学苏州汽车研究院(吴江) Object position detection method, device, equipment and storage medium
CN112101134B (en) * 2020-08-24 2024-01-02 深圳市商汤科技有限公司 Object detection method and device, electronic equipment and storage medium
CN112348835B (en) * 2020-11-30 2024-04-16 广联达科技股份有限公司 Material quantity detection method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103149939A (en) * 2013-02-26 2013-06-12 北京航空航天大学 Dynamic target tracking and positioning method of unmanned plane based on vision
US20140336848A1 (en) * 2013-05-10 2014-11-13 Palo Alto Research Center Incorporated System and method for detecting, tracking and estimating the speed of vehicles from a mobile platform
CN104966092A (en) * 2015-06-16 2015-10-07 中国联合网络通信集团有限公司 Image processing method and device
CN107909600A (en) * 2017-11-04 2018-04-13 南京奇蛙智能科技有限公司 The unmanned plane real time kinematics target classification and detection method of a kind of view-based access control model
CN109765939A (en) * 2018-12-21 2019-05-17 中国科学院自动化研究所南京人工智能芯片创新研究院 Cloud platform control method, device and the storage medium of unmanned plane
CN110796104A (en) * 2019-11-01 2020-02-14 深圳市道通智能航空技术有限公司 Target detection method and device, storage medium and unmanned aerial vehicle

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103149939A (en) * 2013-02-26 2013-06-12 北京航空航天大学 Dynamic target tracking and positioning method of unmanned plane based on vision
US20140336848A1 (en) * 2013-05-10 2014-11-13 Palo Alto Research Center Incorporated System and method for detecting, tracking and estimating the speed of vehicles from a mobile platform
CN104966092A (en) * 2015-06-16 2015-10-07 中国联合网络通信集团有限公司 Image processing method and device
CN107909600A (en) * 2017-11-04 2018-04-13 南京奇蛙智能科技有限公司 The unmanned plane real time kinematics target classification and detection method of a kind of view-based access control model
CN109765939A (en) * 2018-12-21 2019-05-17 中国科学院自动化研究所南京人工智能芯片创新研究院 Cloud platform control method, device and the storage medium of unmanned plane
CN110796104A (en) * 2019-11-01 2020-02-14 深圳市道通智能航空技术有限公司 Target detection method and device, storage medium and unmanned aerial vehicle

Also Published As

Publication number Publication date
CN110796104A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
WO2021083151A1 (en) Target detection method and apparatus, storage medium and unmanned aerial vehicle
CN110163904B (en) Object labeling method, movement control method, device, equipment and storage medium
Zhou et al. Robust real-time UAV based power line detection and tracking
CN110825101B (en) Unmanned aerial vehicle autonomous landing method based on deep convolutional neural network
CN111080693A (en) Robot autonomous classification grabbing method based on YOLOv3
US11120280B2 (en) Geometry-aware instance segmentation in stereo image capture processes
WO2021253245A1 (en) Method and device for identifying vehicle lane changing tendency
CN112740268A (en) Target detection method and device
CN112598922B (en) Parking space detection method, device, equipment and storage medium
CN115376109B (en) Obstacle detection method, obstacle detection device, and storage medium
CN111738033B (en) Vehicle driving information determination method and device based on plane segmentation and vehicle-mounted terminal
CN110568861A (en) Man-machine movement obstacle monitoring method, readable storage medium and unmanned machine
CN112697134A (en) Environment sensing method, system and equipment of indoor inspection robot and computer readable storage medium thereof
WO2022198175A1 (en) Systems and methods for generating object detection labels using foveated image magnification for autonomous driving
CN114841910A (en) Vehicle-mounted lens shielding identification method and device
CN114967731A (en) Unmanned aerial vehicle-based automatic field personnel searching method
CN114627395B (en) Multi-rotor unmanned aerial vehicle angle analysis method, system and terminal based on nested targets
CN114596239A (en) Loading and unloading event detection method and device, computer equipment and storage medium
CN112286230A (en) Unmanned aerial vehicle visual image algorithm, obstacle avoidance step and information fusion processing system thereof
CN112706159A (en) Robot control method and device and robot
CN114396911B (en) Obstacle ranging method, device, equipment and storage medium
CN113139984B (en) Long-time unmanned aerial vehicle target tracking method and system integrating detection and tracking
CN114549976A (en) Multi-camera-based track measurement method and system for mobile robot
Perevoshchikova et al. Algorithms for Recognizing Railway Infrastructure Objects in Images
WO2020202636A1 (en) Information processing method and information processing system

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: 20882331

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: 20882331

Country of ref document: EP

Kind code of ref document: A1