Three-dimensional detection frame labeling method, labeling device, electronic equipment and medium

By constructing a three-dimensional spatial structure image and determining three-dimensional bounding box information, the problem of inaccurate labeling caused by inconsistent labeling results and pose drift in the existing technology is solved, and the accuracy and efficiency of three-dimensional detection frame labeling are improved.

CN118799557APending Publication Date: 2024-10-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410931138.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing technology, the results of manually annotated three-dimensional detection frames are not highly consistent, and when tracking the pose of the image through motion and restoration structure technology, the image pose will drift, resulting in inaccurate annotation results.

Method used

By obtaining the camera parameter information of the video image, perform image segmentation processing to obtain the contour information of the target object, construct a three-dimensional spatial structure image of the target object, determine the three-dimensional bounding box information, and perform three-dimensional detection box annotation based on this information to reduce pose drift. influence.

Benefits of technology

It improves the accuracy and efficiency of three-dimensional detection frame annotation, realizes multi-angle detection frame annotation, and reduces the impact of pose drift on the annotation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799557A_ABST
    Figure CN118799557A_ABST
Patent Text Reader

Abstract

The invention provides a three-dimensional detection frame labeling method and device in a two-dimensional image, electronic equipment and a medium, and is applied to the technical field of computer vision. The method comprises the following steps: acquiring camera parameter information corresponding to each frame of image in N frames of video images, wherein the parameter information comprises internal parameter information and external parameter information; performing image segmentation processing on each frame of image in the N frames of video images to obtain contour information of the target object corresponding to each frame of image; constructing a three-dimensional space structure image of the target object according to the internal reference information and the external reference information corresponding to each frame of image and the contour information of the target object; determining three-dimensional bounding box information of the three-dimensional space structure image according to the three-dimensional space structure image of the target object; and determining three-dimensional detection frame labeling information corresponding to each frame of image according to the three-dimensional bounding box information and the internal reference information and the external reference information corresponding to each frame of image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer vision technology, and more specifically, to a method, a device, an electronic device, and a medium for annotating a three-dimensional detection frame in a two-dimensional image. Background Art

[0002] 3D (three-dimensional) detection is to predict the 3D bounding box of the target object from the 2D (two-dimensional) image. The 3D bounding box contains both the boundary information of the target object in space and the 6DoF (6 degrees of freedom) pose information. Video 3D detection annotation is to annotate each frame of the video with a 3D detection box. A large amount of data with 3D detection box annotation information can be used to train algorithms such as 3D detection and 6DoF estimation. Well-trained algorithms can predict the above information of the target object on new data. Such algorithms have a large number of application scenarios in ARVR (augmented reality and virtual reality), autonomous driving, e-commerce and other fields.

[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technology: during the manual labeling process, the labeling results are not highly consistent; tracking the posture of the image through motion and structure recovery technology to complete the labeling of the 3D detection frame will cause inaccurate labeling results due to the image posture drift during the tracking process. Summary of the invention

[0004] In view of this, the present disclosure provides a method, a device, an electronic device and a medium for annotating a three-dimensional detection frame in a two-dimensional image.

[0005] One aspect of the present disclosure provides a method for annotating a three-dimensional detection frame in a two-dimensional image, comprising: obtaining camera parameter information corresponding to each frame of N frames of video images, the parameter information comprising internal reference information and external reference information, the internal reference information representing internal attribute parameters of a camera for shooting the video image, and the external reference information representing position parameters and posture parameters of a camera for shooting the video image; performing image segmentation processing on each frame of the N frames of video images to obtain contour information of a target object corresponding to each frame of the image; constructing a three-dimensional spatial structure image of the target object according to the internal reference information, external reference information and contour information of the target object corresponding to each frame of the image; determining three-dimensional bounding box information of the three-dimensional spatial structure image according to the three-dimensional spatial structure image of the target object; and determining three-dimensional detection frame annotation information corresponding to each frame of the image according to the three-dimensional bounding box information, the internal reference information and the external reference information corresponding to each frame of the image.

[0006] According to an embodiment of the present disclosure, obtaining camera parameter information corresponding to each frame of N frames of video images includes:

[0007] Each frame of N video images is obtained; feature points are extracted for each frame to obtain feature point information corresponding to each frame; N video images are matched pairwise according to the feature point information corresponding to each frame to obtain an image connection graph, wherein the image connection graph represents the matching relationship between the two images; structures and motions of N video images are reconstructed using the image connection graph to obtain camera parameter information corresponding to each frame of N video images.

[0008] According to an embodiment of the present disclosure, N frames of video images are matched in pairs according to feature point information corresponding to each frame of image to obtain an image connection graph, including: describing the feature point information corresponding to each frame of image to obtain a feature descriptor of the feature point corresponding to each frame of image, the feature descriptor being used to describe the pixel information of the neighborhood of the feature point; determining the distance between the feature descriptors of any two frames of image according to the feature descriptors of the feature points corresponding to each frame of image to obtain a feature point matching pair of the two frames of image; and obtaining an image connection graph according to the feature point matching pairs of the two frames of image.

[0009] According to an embodiment of the present disclosure, image segmentation processing is performed on each frame of N frames of video images to obtain contour information of a target object corresponding to each frame of image, including: performing image encoding processing on each frame of N frames of video images to obtain an image feature vector corresponding to each frame of image; generating a selection prompt corresponding to each frame of image, the selection prompt representing a range of a target object determined on each frame of image; performing prompt encoding processing on the selection prompt to obtain a prompt feature vector corresponding to each frame of image; performing mask processing on the image feature vector and the prompt feature vector to obtain contour information of the target object corresponding to each frame of image.

[0010] According to an embodiment of the present disclosure, image coding processing is performed on each frame of N frames of video images to obtain an image feature vector corresponding to each frame of images, including: segmenting each frame of N frames of images to obtain image blocks of each frame of images; position coding is performed on the image blocks of each frame of images to obtain a position feature vector of each frame of images; and according to the image blocks of each frame of images and the position feature vector of each frame of images, an image feature vector corresponding to each frame of images is obtained.

[0011] According to an embodiment of the present disclosure, a three-dimensional spatial structure image of the target object is constructed based on the internal reference information, external reference information and contour information of the target object corresponding to each frame image, including: determining the geometric structure information of the target object based on the internal reference information, external reference information and contour information of the target object corresponding to each frame image; and constructing a three-dimensional spatial structure image of the target object based on the geometric structure information of the target object.

[0012] According to an embodiment of the present disclosure, according to the three-dimensional spatial structure image of the target object, the three-dimensional bounding box information of the three-dimensional spatial structure image is determined, including: in response to a request for determining the initial three-dimensional bounding box, the initial three-dimensional bounding box information is determined; according to the three-dimensional spatial structure image of the target object, the initial three-dimensional bounding box information is adjusted to obtain the three-dimensional bounding box information of the three-dimensional spatial structure image. According to an embodiment of the present disclosure, according to the three-dimensional bounding box information, the internal reference information and the external reference information corresponding to each frame of the image, the three-dimensional detection frame annotation information corresponding to each frame of the image is determined, including: transposing the three-dimensional bounding box information to obtain the transposed three-dimensional bounding box information; according to the transposed three-dimensional bounding box information, the internal reference information and the external reference information corresponding to each frame of the image, the three-dimensional detection frame annotation information corresponding to each frame of the image is determined.

[0013] Another aspect of the present disclosure provides a device for annotating a three-dimensional detection frame in a two-dimensional image, including: an acquisition module, used to acquire camera parameter information corresponding to each frame of N frames of video images, the parameter information including internal reference information and external reference information, the internal reference information representing the internal attribute parameters of the camera for shooting the video image, and the external reference information representing the position parameters and posture parameters of the camera for shooting the video image; a segmentation processing module, used to perform image segmentation processing on each frame of the N frames of video images to obtain contour information of a target object corresponding to each frame of the image; a construction module, used to construct a three-dimensional spatial structure image of the target object according to the internal reference information, external reference information and contour information of the target object corresponding to each frame of the image; a first determination module, used to determine the three-dimensional bounding box information of the three-dimensional spatial structure image according to the three-dimensional spatial structure image of the target object; and a second determination module, used to determine the three-dimensional detection frame annotation information corresponding to each frame of the image according to the three-dimensional bounding box information, the internal reference information and the external reference information corresponding to each frame of the image.

[0014] Another aspect of the present disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above method.

[0015] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0016] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions, and the instructions are used to implement the above method when executed.

[0017] According to an embodiment of the present disclosure, a three-dimensional spatial structure image of a target object is constructed based on the camera parameter information corresponding to each frame of the acquired video image and the contour information corresponding to the target corresponding to each frame of the image, and based on the three-dimensional spatial structure image, the three-dimensional bounding box information of the three-dimensional spatial structure image is determined, and then based on the camera parameter information and the three-dimensional bounding box information corresponding to each frame of the image, the three-dimensional detection frame annotation information in the two-dimensional image is determined. Because a technical means of determining the three-dimensional bounding box information on the three-dimensional spatial structure image by constructing the three-dimensional spatial structure image of the target object is adopted, the technical problems of the prior art that the annotation results are not highly consistent and the drift in the posture tracking process leads to inaccurate annotation results are at least partially overcome, thereby achieving the technical effect of realizing multi-angle detection frame annotation, and reducing the influence of posture drift when implementing three-dimensional detection frame annotation on a two-dimensional image, and improving the accuracy and efficiency of three-dimensional detection frame annotation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0019] Figure 1 The exemplary system architecture of the method and device for annotating a three-dimensional detection frame in a two-dimensional image according to an embodiment of the present disclosure is schematically shown;

[0020] Figure 2 A flowchart of a method for labeling a three-dimensional detection frame in a two-dimensional image according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 3 A flowchart of a method for acquiring camera parameter information corresponding to each frame of image according to an embodiment of the present disclosure is schematically shown;

[0022] Figure 4 A flowchart schematically shows a method for obtaining contour information of a target object corresponding to each frame of image according to an embodiment of the present disclosure;

[0023] FIG5( a ) schematically shows a schematic diagram of a three-dimensional spatial structure image according to an embodiment of the present disclosure;

[0024] FIG5( b ) schematically shows a schematic diagram of a three-dimensional bounding box of a three-dimensional spatial structure image according to an embodiment of the present disclosure;

[0025] Figure 6 A schematic diagram schematically shows a method for labeling a three-dimensional detection frame in a two-dimensional image according to an embodiment of the present disclosure;

[0026] Figure 7A block diagram schematically shows a device for labeling a three-dimensional detection frame in a two-dimensional image according to an embodiment of the present disclosure; and

[0027] Figure 8 A block diagram of an electronic device suitable for implementing a method for labeling a three-dimensional detection box in a two-dimensional image according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0030] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0031] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0032] It should be noted that in the embodiments of the present disclosure, the collection, update, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.

[0033] In the related art, there are generally two ways to implement the annotation of 3D detection frames. One way is to implement it by manual annotation in each frame of the video. However, due to the large amount of video data, this will face the problem of low annotation efficiency. Moreover, the annotation of 3D information on a 2D image is itself highly subjective. It is difficult to obtain accurate reference information from a single 2D image to annotate the 3D information. There will be deviations in all directions on each frame of the video. Therefore, it is difficult to ensure high consistency of the annotated 3D detection frame results.

[0034] Another way is to use the SFM (Structure from Motion) technology to track the pose of each frame in the video, and then manually annotate the 3D detection frames of a small number of images, and then infer the annotated 3D detection frames from the annotated images to other images based on the pose association between each frame, so as to complete the 3D detection frame annotation. However, due to drift in the pose tracking process, when the annotated 3D detection frame is derived to other images, this drift will also be reflected in the 3D detection frame of other images. Moreover, when annotating, it can only be observed from one perspective, lacking information from more perspectives. When the 3D detection frame annotation is derived to other images based on the pose, the deviation in perspective will be greater, resulting in a greater deviation in the 3D detection frame annotation, making the annotation result inaccurate.

[0035] To this end, an embodiment of the present disclosure proposes a method for annotating a three-dimensional detection frame in a two-dimensional image, the method comprising: obtaining camera parameter information corresponding to each frame of N frames of video images, the parameter information comprising intrinsic reference information and extrinsic reference information, the intrinsic reference information representing internal attribute parameters of the camera for shooting the video image, and the extrinsic reference information representing position parameters and posture parameters of the camera for shooting the video image; performing image segmentation processing on each frame of the N frames of video images to obtain contour information of a target object corresponding to each frame of the image; constructing a three-dimensional spatial structure image of the target object according to the intrinsic reference information, extrinsic reference information and contour information of the target object corresponding to each frame of the image; determining three-dimensional bounding box information of the three-dimensional spatial structure image according to the three-dimensional spatial structure image of the target object; determining three-dimensional detection frame annotation information corresponding to each frame of the image according to the three-dimensional bounding box information, the intrinsic reference information and the extrinsic reference information corresponding to each frame of the image.

[0036] Figure 1 The following schematically illustrates an exemplary system architecture of a method and device for annotating a three-dimensional detection frame in a two-dimensional image according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0037] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0038] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only for example).

[0039] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0040] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0041] It should be noted that the three-dimensional detection frame annotation method in the two-dimensional image provided by the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the three-dimensional detection frame annotation device in the two-dimensional image provided by the embodiment of the present disclosure can generally be set in the server 105. The three-dimensional detection frame annotation method in the two-dimensional image provided by the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, 102, 103 and / or the server 105. Correspondingly, the three-dimensional detection frame annotation device in the two-dimensional image provided by the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, 102, 103 and / or the server 105. Alternatively, the three-dimensional detection frame annotation method in the two-dimensional image provided by the embodiment of the present disclosure can also be executed by the terminal device 101, 102, or 103, or can also be executed by other terminal devices different from the terminal device 101, 102, or 103. Correspondingly, the three-dimensional detection frame labeling device in the two-dimensional image provided by the embodiment of the present disclosure can also be set in the terminal device 101, 102, or 103, or in other terminal devices different from the terminal device 101, 102, or 103.

[0042] For example, each frame of the N frames of video images may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or stored in an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the three-dimensional detection frame labeling method in the two-dimensional image provided by the embodiment of the present disclosure, or send each frame of the N frames of video images to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive each frame of the N frames of video images may execute the three-dimensional detection frame labeling method in the two-dimensional image provided by the embodiment of the present disclosure.

[0043] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0044] Figure 2 A flowchart of a method for labeling a three-dimensional detection box in a two-dimensional image according to an embodiment of the present disclosure is schematically shown.

[0045] like Figure 2 As shown, the method 200 includes operations S210 to S250.

[0046] In operation S210, camera parameter information corresponding to each frame of N frames of video images is obtained, the parameter information includes internal reference information and external reference information, the internal reference information represents the internal attribute parameters of the camera used to shoot the video images, and the external reference information represents the position parameters and posture parameters of the camera used to shoot the video images.

[0047] In operation S220, image segmentation processing is performed on each frame of the N frames of video images to obtain contour information of the target object corresponding to each frame of the image.

[0048] In operation S230, a three-dimensional spatial structure image of the target object is constructed according to the internal reference information, the external reference information and the contour information of the target object corresponding to each frame of the image.

[0049] In operation S240 , three-dimensional bounding box information of the three-dimensional spatial structure image is determined according to the three-dimensional spatial structure image of the target object.

[0050] In operation S250, three-dimensional detection box annotation information corresponding to each frame of image is determined according to the three-dimensional bounding box information, the internal reference information corresponding to each frame of image, and the external reference information.

[0051] According to an embodiment of the present disclosure, N frames of video images may be continuous video images taken when the camera is in a moving state, each frame of the N frames of video images may be an image to be annotated with a three-dimensional detection frame, each frame of the image may be a two-dimensional image, and N may be a positive integer greater than or equal to 1.

[0052] According to an embodiment of the present disclosure, the camera parameter information may be the parameter information of the camera when the camera captures each frame of N frames of video images. The camera parameter information may represent the pose estimation information of each frame of the image.

[0053] According to an embodiment of the present disclosure, the camera parameter information may include internal parameter information and external parameter information. The internal parameter information may characterize the internal attribute parameters of the camera, such as focal length, principal point (optical center) coordinates, and distortion coefficient. The internal parameter information of the camera may be fixed.

[0054] According to an embodiment of the present disclosure, the external parameter information may represent the position parameters and attitude parameters of the camera in the world coordinate system, that is, the posture parameters. The posture parameters may generally include a rotation matrix and a translation vector.

[0055] According to an embodiment of the present disclosure, image segmentation can be for obtaining a two-dimensional segmented image of each frame in N frames of video images, and can be for segmenting the foreground and background of each frame to obtain contour information of the target object in each frame. For example, the foreground image can contain the contour information of the target object in each frame.

[0056] According to an embodiment of the present disclosure, after each frame of image is segmented, the size of each frame of image after segmentation is the same as the size of each frame of image before segmentation. For example, after each frame of image is segmented into foreground and background, the size of the foreground image and the background image is the same as the size of the image before segmentation.

[0057] According to an embodiment of the present disclosure, the three-dimensional space structure image can represent the geometric structure of the target object in the three-dimensional space, and the target object has only one geometric structure in the three-dimensional space.

[0058] According to the embodiments of the present disclosure, the geometric structure of the target object can be reconstructed in three-dimensional space by using the intrinsic parameter information and extrinsic parameter information of the camera corresponding to each frame of image and the contour information of the target object.

[0059] According to an embodiment of the present disclosure, the 3D bounding box may be a bounding box that annotates the 3D convex hull in the 3D space. The 3D bounding box information may represent information for annotating the 3D detection box in the 3D spatial structure image of the target object.

[0060] According to an embodiment of the present disclosure, based on the three-dimensional space structure image of the target object, the three-dimensional space structure image is three-dimensionally annotated to determine the bounding box of the three-dimensional space structure image. The bounding box can enclose the geometric structure of the target object and become the minimum circumscribed cuboid of the three-dimensional space structure image. Thus, the annotation of the target object in the three-dimensional space structure is completed.

[0061] According to an embodiment of the present disclosure, a three-dimensional detection box annotation is obtained for each frame of N frames of video. The three-dimensional detection box annotation can be expressed as a cuboid on a three-dimensional spatial structure image and as a projection of the corresponding cuboid at a relevant viewing angle on a two-dimensional image, expressed as 8 two-dimensional pixel coordinates.

[0062] According to an embodiment of the present disclosure, by projecting the detection frame of the three-dimensional bounding box onto a two-dimensional image, and then using the intrinsic parameter information and extrinsic parameter information corresponding to each frame of the image, the three-dimensional detection frame annotation information corresponding to each frame of the image in the two-dimensional image can be obtained.

[0063] According to an embodiment of the present disclosure, a three-dimensional spatial structure image of a target object is constructed based on the camera parameter information corresponding to each frame of the acquired video image and the contour information corresponding to the target corresponding to each frame of the image, and based on the three-dimensional spatial structure image, the three-dimensional bounding box information of the three-dimensional spatial structure image is determined, and then based on the camera parameter information and the three-dimensional bounding box information corresponding to each frame of the image, the three-dimensional detection frame annotation information in the two-dimensional image is determined. Because a technical means of determining the three-dimensional bounding box information on the three-dimensional spatial structure image by constructing the three-dimensional spatial structure image of the target object is adopted, the technical problems of the prior art that the annotation results are not highly consistent and the drift in the posture tracking process leads to inaccurate annotation results are at least partially overcome, thereby achieving the technical effect of realizing multi-angle detection frame annotation, and reducing the influence of posture drift when implementing three-dimensional detection frame annotation on a two-dimensional image, and improving the accuracy and efficiency of three-dimensional detection frame annotation.

[0064] Figure 3 The flowchart of the method for acquiring camera parameter information corresponding to each frame of image according to an embodiment of the present disclosure is schematically shown.

[0065] like Figure 3 As shown, the method 300 may include operations S310 to S340.

[0066] In operation S310, each frame of N frames of video images is acquired.

[0067] In operation S320, feature points are extracted for each frame of image to obtain feature point information corresponding to each frame of image.

[0068] In operation S330, N frames of video images are matched in pairs according to feature point information corresponding to each frame of image to obtain an image connection graph, where the image connection graph represents a matching relationship between two images.

[0069] In operation S340, the structure and motion of the N frames of video images are reconstructed using the image connection graph to obtain camera parameter information corresponding to each frame of the N frames of video images.

[0070] According to an embodiment of the present disclosure, the camera parameter information may be acquired for each frame of N frames of video images. Since the camera or the target object may be moving rather than stationary when shooting the target object, the position and posture of the camera corresponding to each frame of the image is different when the camera shoots the target object continuously.

[0071] According to the embodiments of the present disclosure, extracting feature points from each frame of an image can be considered as a process of finding feature points. For example, when a pixel in a flat area of ​​an image moves up, down, left, or right, the pixels around the pixel do not change, or when a pixel in an edge area moves up, down, left, or right, the pixels around the pixel do not change, then the pixel is considered not to be a feature point to be determined.

[0072] According to an embodiment of the present disclosure, for example, when a pixel in a corner area of ​​an image moves up, down, left, or right, and the gradient of change of the pixels around it is large, the pixel can be considered to be a certain feature point, and each frame of the image can have multiple feature point information.

[0073] According to an embodiment of the present disclosure, there is an overlapping area between each frame of N frames of video images, and the feature point information in each frame of the image can be matched with the feature point information in the adjacent image in pairs, and the matching results of the two frames of images can be determined, thereby obtaining an image connection diagram of any two frames of images.

[0074] According to an embodiment of the present disclosure, the pose of the image can be estimated by using a sparse representation of the scene and the pose of the image using a motion structure recovery method based on any two matching image frames, and based on the result, the parameter information of the camera, i.e., the intrinsic parameter information and the extrinsic parameter information, can be output.

[0075] According to an embodiment of the present disclosure, N frames of video images are matched in pairs according to feature point information corresponding to each frame of image to obtain an image connection graph, including: describing the feature point information corresponding to each frame of image to obtain a feature descriptor of the feature point corresponding to each frame of image, the feature descriptor being used to describe the pixel information of the neighborhood of the feature point; determining the distance between the feature descriptors of any two frames of image according to the feature descriptors of the feature points corresponding to each frame of image to obtain a feature point matching pair of the two frames of image; and obtaining an image connection graph according to the feature point matching pairs of the two frames of image.

[0076] According to the embodiments of the present disclosure, the feature point description can be performed by describing the feature point through a specific method to obtain a feature descriptor describing the feature point.

[0077] According to an embodiment of the present disclosure, for example, M ordered point pairs can be selected in an orderly manner according to a preset method within a certain area centered on the feature point, and pixel values ​​of each ordered point pair are compared to obtain 1 or 0. After comparing the M point pairs, an M-dimensional vector is obtained, which can become a feature descriptor of the feature point, and M is a positive integer greater than or equal to 1.

[0078] According to an embodiment of the present disclosure, a feature descriptor may represent pixel information used to describe the neighborhood of the feature point.

[0079] According to an embodiment of the present disclosure, any two frames of images may be two adjacent frames of images, and the distance between feature descriptors corresponding to the two adjacent frames of images is calculated. The closer the distance between the descriptors, the higher the similarity of the feature points.

[0080] According to the embodiments of the present disclosure, the feature points of the two frames of images can be matched according to the feature descriptor distance of the two frames of images to obtain matching pairs of feature points, thereby matching the images according to the matching pairs corresponding to all feature points to obtain an image connection graph.

[0081] Figure 4 The flowchart of the method for obtaining the contour information of the target object corresponding to each frame of image according to an embodiment of the present disclosure is schematically shown.

[0082] like Figure 4 As shown, the method 400 may include operations S410 to S440.

[0083] In operation S410, image coding processing is performed on each frame of the N frames of video images to obtain an image feature vector corresponding to each frame of the image.

[0084] In operation S420 , a selection prompt corresponding to each frame image is generated, where the selection prompt represents a range of the target object in each frame image.

[0085] In operation S430, a prompt encoding process is performed on the selection prompt to obtain a prompt feature vector corresponding to each frame image.

[0086] In operation S440, mask processing is performed on the image feature vector and the prompt feature vector to obtain contour information of the target object corresponding to each frame of the image.

[0087] According to an embodiment of the present disclosure, the image encoding process may be to perform image encoding on each frame of N frames of video images through an image encoder, and an image feature vector for each frame of the image may be obtained.

[0088] According to an embodiment of the present disclosure, the selection hint may be a point, a box, a text, or a mask, and the selection hint may represent the area range of the target object in each frame of the image.

[0089] According to an embodiment of the present disclosure, the selection prompt can be encoded by a prompt encoder, that is, by encoding points, boxes, texts or masks into an image feature vector in real time, a prompt feature vector corresponding to each frame of the image can be obtained.

[0090] According to the embodiments of the present disclosure, the image feature vector and the prompt feature vector may be predicted and segmented using a mask decoder, and contour information of the target object corresponding to each frame of the image may be obtained.

[0091] According to an embodiment of the present disclosure, image coding processing is performed on each frame of N frames of video images to obtain an image feature vector corresponding to each frame of images, including: segmenting each frame of N frames of images to obtain image blocks of each frame of images; position coding is performed on the image blocks of each frame of images to obtain a position feature vector of each frame of images; and according to the image blocks of each frame of images and the position feature vector of each frame of images, an image feature vector corresponding to each frame of images is obtained.

[0092] According to an embodiment of the present disclosure, each frame of the N frames of video images may be segmented into image sequence blocks. Each image sequence block may be the same size as the convolution kernel.

[0093] According to the embodiments of the present disclosure, each image sequence block can be position-coded to obtain position information corresponding to each image sequence block. The position information corresponding to each image sequence block can be summed to obtain a position feature vector for each frame of image.

[0094] According to an embodiment of the present disclosure, the position feature vector and each image sequence block may be input into an image encoder for image encoding processing, and an image feature vector corresponding to each frame of the image may be obtained.

[0095] According to an embodiment of the present disclosure, a three-dimensional spatial structure image of the target object is constructed based on the internal reference information, external reference information and contour information of the target object corresponding to each frame image, including: determining the geometric structure information of the target object based on the internal reference information, external reference information and contour information of the target object corresponding to each frame image; and constructing a three-dimensional spatial structure image of the target object based on the geometric structure information of the target object.

[0096] According to an embodiment of the present disclosure, each frame of N frames of video images can be input into a three-dimensional space construction model, and the intrinsic parameter information and extrinsic parameter information of the camera corresponding to each frame of image, as well as the contour information of the target object in each frame of image can be extracted. By processing each frame of image, the geometric structure information of the captured target object in the video image can be obtained.

[0097] According to the embodiments of the present disclosure, a three-dimensional spatial structure image of the target object can be obtained based on the geometric structure information of the target object.

[0098] FIG5( a ) schematically shows a schematic diagram of a three-dimensional spatial structure image according to an embodiment of the present disclosure.

[0099] As shown in FIG5(a), in the schematic diagram 500, taking a vase as an example, the target object is a vase. The three-dimensional spatial structure image of the vase is obtained by constructing a three-dimensional space model based on the camera parameter information of each frame of N frames of video images taken of the vase and the contour information of the target object in each frame.

[0100] According to the embodiments of the present disclosure, the three-dimensional detection box annotation task can be converted from a two-dimensional image to a three-dimensional image by reconstructing the three-dimensional spatial structure image of the target object. The three-dimensional image is easier to observe from the annotation angle than the two-dimensional image, so the annotation result is more accurate. Moreover, a unified structural image is reconstructed in the three-dimensional space, and the posture drift can be averaged to each perspective. The posture drift can be well constrained through the segmentation result of each perspective, thereby reducing the influence of the posture drift on the annotation result.

[0101] According to an embodiment of the present disclosure, three-dimensional bounding box information of the three-dimensional spatial structure image is determined based on the three-dimensional spatial structure image of the target object, including: determining the initial three-dimensional bounding box information in response to a request for determining the initial three-dimensional bounding box; adjusting the initial three-dimensional bounding box information based on the three-dimensional spatial structure image of the target object to obtain the three-dimensional bounding box information of the three-dimensional spatial structure image.

[0102] According to an embodiment of the present disclosure, the initial 3D bounding box may be a stereoscopic convex hull set by the user before annotating the 3D structure image of the target object. The initial 3D bounding box information may include the length, width, height information of the initial 3D bounding box and the 3D space coordinate information of each vertex.

[0103] According to an embodiment of the present disclosure, the main view direction of the three-dimensional structure image of the target object can be set first to determine the orientation of the target object. Then, according to the three-dimensional structure image of the target object, the initial bounding box is aligned with the three-dimensional structure image of the target object, and the size of the initial bounding box is adjusted at the same time, that is, the length, width, and height of the initial bounding box are adjusted so that the initial bounding box is adjusted to enclose the three-dimensional structure image of the target object, so that the adjusted initial bounding box becomes the minimum circumscribed cuboid of the three-dimensional space structure of the target object. At this time, the adjusted initial bounding box information can be used as the three-dimensional bounding box information of the three-dimensional space structure image.

[0104] FIG5( b ) schematically shows a schematic diagram of a three-dimensional bounding box of a three-dimensional spatial structure image according to an embodiment of the present disclosure.

[0105] As shown in FIG. 5 (b), in the schematic diagram 500, it can be assumed that the initial bounding box is located in the world coordinate system, the XOY plane is a horizontal plane, the OZ direction is the vertical direction of the target object, and the OX direction is set as the main view direction of the target object, based on which the orientation of the target object can be determined. Then, the initial bounding box is aligned with the three-dimensional structure image of the target object, and the size of the initial bounding box is adjusted at the same time, that is, the length, width, and height of the initial bounding box are adjusted so that the initial bounding box is adjusted to the minimum circumscribed cuboid of the three-dimensional spatial structure of the target object. At this point, the three-dimensional detection box annotation of the three-dimensional spatial structure image of the target object is completed.

[0106] According to an embodiment of the present disclosure, three-dimensional detection box annotation information corresponding to each frame of image is determined based on three-dimensional bounding box information, internal parameter information and external parameter information corresponding to each frame of image, including: transposing the three-dimensional bounding box information to obtain transposed three-dimensional bounding box information; determining the three-dimensional detection box annotation information corresponding to each frame of image based on the transposed three-dimensional bounding box information, internal parameter information and external parameter information corresponding to each frame of image.

[0107] According to an embodiment of the present disclosure, after completing the three-dimensional detection box annotation (that is, the three-dimensional bounding box) on the three-dimensional structure image, the three-dimensional bounding box information can be projected into the two-dimensional image.

[0108] According to an embodiment of the present disclosure, the three-dimensional bounding box information may be homogeneously processed and then transposed to obtain the transposed three-dimensional bounding box information.

[0109] According to an embodiment of the present disclosure, a corresponding matrix may be obtained by multiplying the transposed three-dimensional bounding box information, the intrinsic parameter information corresponding to each frame image, and the extrinsic parameter information corresponding to each frame image.

[0110] According to an embodiment of the present disclosure, the first two rows of the matrix can be divided by the last row of the matrix and then transposed again, that is, the three-dimensional detection box annotation information corresponding to each frame image can be obtained, that is, the three-dimensional detection box annotation of each frame image in N frames of video images in two-dimensional space can be realized.

[0111] According to an embodiment of the present disclosure, the three-dimensional detection frame annotation information corresponding to the i-th frame image can be i Indicates that 1≤i≤N, determine b i It can be obtained through formula (1), that is:

[0112] (1)

[0113] Among them, K i is the intrinsic parameter information of the camera corresponding to the i-th frame image; iis the external parameter information of the camera corresponding to the i-th frame image; B is the three-dimensional bounding box information; [:2] is b i The first two rows of the matrix; [2] is b i The last row of the matrix.

[0114] Figure 6 A schematic diagram of a method for labeling a three-dimensional detection box in a two-dimensional image according to an embodiment of the present disclosure is schematically shown.

[0115] like Figure 6 As shown, in the schematic diagram 600, the camera parameter information 601 corresponding to each frame of the N frames of video images is obtained, and the camera parameter information 601 includes the internal reference information 601-1 and the external reference information 601-2; the image segmentation processing 602 is performed on each frame of the N frames of video images to obtain the contour information 603 of the target object corresponding to each frame of the image; the three-dimensional space structure image 604 of the target object is constructed according to the internal reference information 601-1, the external reference information 601-2 and the contour information 603 of the target object; according to the three-dimensional space structure image 604 of the target object, the three-dimensional space structure image 604 is annotated with a three-dimensional detection frame to obtain the three-dimensional bounding box information 605 of the three-dimensional space structure image; the three-dimensional bounding box information 605 of the three-dimensional space structure image, the internal reference information 601-1 and the external reference information 601-2 are multiplied and transposed to obtain the three-dimensional detection frame annotation information 606 corresponding to each frame of the image.

[0116] Figure 7 A block diagram of a device for labeling a three-dimensional detection frame in a two-dimensional image according to an embodiment of the present disclosure is schematically shown.

[0117] like Figure 7 As shown, the device 700 may include: an acquisition module 710 , a segmentation processing module 720 , a construction module 730 , a first determination module 740 and a second determination module 750 .

[0118] The acquisition module 710 is used to obtain the camera parameter information corresponding to each frame of N frames of video images, the parameter information includes internal parameter information and external parameter information, the internal parameter information represents the internal attribute parameters of the camera for shooting the video, and the external parameter information represents the position parameters and posture parameters of the camera for shooting the video.

[0119] The segmentation processing module 720 is used to perform image segmentation processing on each frame of the N frames of video images to obtain contour information of the target object corresponding to each frame of the image.

[0120] The construction module 730 is used to construct a three-dimensional spatial structure image of the target object according to the internal reference information, external reference information and contour information of the target object corresponding to each frame of the image.

[0121] The first determination module 740 is used to determine the 3D bounding box information of the 3D space structure image according to the 3D space structure image of the target object.

[0122] The second determination module 750 is used to determine the three-dimensional detection box annotation information corresponding to each frame of image according to the three-dimensional bounding box information, the internal reference information and the external reference information corresponding to each frame of image.

[0123] According to an embodiment of the present disclosure, the acquisition module 710 may include: an acquisition submodule, an extraction submodule, a matching submodule, and a reconstruction submodule.

[0124] The acquisition submodule is used to acquire each frame of the N frames of video images.

[0125] The extraction submodule is used to extract feature points from each frame of image to obtain feature point information corresponding to each frame of image.

[0126] The matching submodule is used to match N frames of video images in pairs according to the feature point information corresponding to each frame of the image to obtain an image connection graph, which represents the matching relationship between the two images.

[0127] The reconstruction submodule is used to reconstruct the structure and motion of N frames of video images by using the image connection graph, and obtain the camera parameter information corresponding to each frame of the N frames of video images.

[0128] According to an embodiment of the present disclosure, the matching submodule may include: a describing unit, a first determining unit, and a first obtaining unit.

[0129] The description unit is used to describe the feature point information corresponding to each frame of the image, and obtain the feature descriptor of the feature point corresponding to each frame of the image, and the feature descriptor is used to describe the pixel information of the neighborhood of the feature point.

[0130] The first determining unit is used to determine the distance between the feature descriptors of any two frames of images according to the feature descriptors of the feature points corresponding to each frame of images, so as to obtain a matching pair of feature points of the two frames of images.

[0131] The first obtaining unit is used to obtain an image connection graph according to the feature point matching pairs of the two frames of images.

[0132] According to an embodiment of the present disclosure, the segmentation processing module 720 may include: an image encoding processing submodule, a generation submodule, a hint encoding processing submodule and a mask processing submodule.

[0133] The image coding processing submodule is used to perform image coding processing on each frame of the N frames of video images to obtain an image feature vector corresponding to each frame of the image.

[0134] The generation submodule is used to generate a selection prompt corresponding to each frame of the image, and the selection prompt represents the range of the target object in each frame of the image.

[0135] The prompt coding processing submodule is used to perform prompt coding processing on the selection prompt to obtain a prompt feature vector corresponding to each frame of the image.

[0136] The mask processing submodule is used to perform mask processing on the image feature vector and the prompt feature vector to obtain the contour information of the target object corresponding to each frame of the image.

[0137] According to an embodiment of the present disclosure, the image encoding processing submodule may include: a segmentation processing unit, a position encoding unit and a second obtaining unit.

[0138] The segmentation processing unit is used to perform segmentation processing on each frame of the N frames of images to obtain image blocks of each frame of the image.

[0139] The position encoding unit is used to perform position encoding on the image blocks of each frame of the image to obtain a position feature vector of each frame of the image.

[0140] The second obtaining unit is used to obtain an image feature vector corresponding to each frame of image according to the image block of each frame of image and the position feature vector of each frame of image.

[0141] According to an embodiment of the present disclosure, the construction module 730 may include: a first determination submodule and a construction submodule.

[0142] The first determination submodule is used to determine the geometric structure information of the target object according to the internal reference information, external reference information and contour information of the target object corresponding to each frame of the image.

[0143] The construction submodule is used to construct a three-dimensional spatial structure image of the target object according to the geometric structure information of the target object.

[0144] According to an embodiment of the present disclosure, the first determination module 740 includes: a second determination submodule and an adjustment submodule.

[0145] The second determination submodule is configured to determine the initial three-dimensional bounding box information in response to a determination request for the initial three-dimensional bounding box.

[0146] The adjustment submodule is used to adjust the initial three-dimensional bounding box information according to the three-dimensional space structure image of the target object to obtain the three-dimensional bounding box information of the three-dimensional space structure image.

[0147] According to an embodiment of the present disclosure, the second determination module 750 may include: a transposition processing submodule and a third determination submodule.

[0148] The transposition processing submodule is used to perform transposition processing on the three-dimensional bounding box information to obtain transposed three-dimensional bounding box information.

[0149] The third determination submodule is used to determine the three-dimensional detection box annotation information corresponding to each frame of the image based on the transposed three-dimensional bounding box information, the internal reference information and the external reference information corresponding to each frame of the image.

[0150] According to the embodiments of the present invention, any one or more of the modules, sub-modules, and units, or at least part of the functions of any one of them, can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, sub-modules, and units can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, sub-modules, and units can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application-specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, sub-modules, and units can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0151] For example, any multiple of the acquisition module 710, the segmentation processing module 720, the construction module 730, the first determination module 740 and the second determination module 750 can be combined in one module / submodule / unit for implementation, or any one of the modules / submodules / units can be split into multiple modules / submodules / units. Alternatively, at least part of the functions of one or more of these modules / submodules / units can be combined with at least part of the functions of other modules / submodules / units and implemented in one module / submodule / unit. According to an embodiment of the present disclosure, at least one of the acquisition module 710, the segmentation processing module 720, the construction module 730, the first determination module 740 and the second determination module 750 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by a suitable combination of any of them. Alternatively, at least one of the acquisition module 710, the segmentation processing module 720, the construction module 730, the first determination module 740 and the second determination module 750 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.

[0152] It should be noted that the data processing system part in the embodiments of the present disclosure corresponds to the data processing method part in the embodiments of the present disclosure. The description of the data processing system part specifically refers to the data processing method part, which will not be repeated here.

[0153] Figure 8 A block diagram of an electronic device suitable for implementing a method for labeling a three-dimensional detection box in a two-dimensional image according to an embodiment of the present disclosure is schematically shown. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0154] like Figure 8As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0155] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.

[0156] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The system 800 may further include one or more of the following components connected to the input / output (I / O) interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that the computer program read therefrom is installed into the storage portion 808 as needed.

[0157] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0158] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0159] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0160] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or the RAM 803 described above and / or one or more memories other than the ROM 802 and the RAM 803 .

[0161] The embodiments of the present disclosure also include a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiments of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the method provided by the embodiments of the present disclosure.

[0162] When the computer program is executed by the processor 801, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0163] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0164] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0166] The embodiments of the present disclosure are described above. However, these embodiments are only for the purpose of illustration and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for labeling a three-dimensional detection box in a two-dimensional image, comprising: Obtaining camera parameter information corresponding to each frame of N frames of video images, wherein the parameter information includes internal reference information and external reference information, wherein the internal reference information represents internal attribute parameters of the camera used to shoot the video images, and the external reference information represents position parameters and posture parameters of the camera used to shoot the video images; Performing image segmentation processing on each frame of the N frames of video images to obtain contour information of the target object corresponding to each frame of the image; Constructing a three-dimensional spatial structure image of the target object according to the internal reference information, the external reference information and the contour information of the target object corresponding to each frame of the image; Determining three-dimensional bounding box information of the three-dimensional spatial structure image according to the three-dimensional spatial structure image of the target object; The three-dimensional detection box annotation information corresponding to each frame of image is determined according to the three-dimensional bounding box information, the internal reference information corresponding to each frame of image, and the external reference information.

2. The method according to claim 1, wherein: The step of obtaining the camera parameter information corresponding to each frame of the N frames of video images includes: Acquire each frame of the N frames of video images; Extracting feature points from each frame of the image to obtain feature point information corresponding to each frame of the image; According to the feature point information corresponding to each frame of the image, the N frames of video images are matched in pairs to obtain an image connection graph, wherein the image connection graph represents the matching relationship between the two images; The image connection graph is used to perform structure and motion reconstruction on the N frames of video images to obtain camera parameter information corresponding to each frame of the N frames of video images.

3. The method according to claim 2, wherein: The step of performing pairwise matching on the N frames of video images according to the feature point information corresponding to each frame of the image to obtain an image connection graph includes: Performing feature point description on the feature point information corresponding to each frame of the image to obtain a feature descriptor of the feature point corresponding to each frame of the image, wherein the feature descriptor is used to describe pixel information of a neighborhood of the feature point; Determine the distance between the feature descriptors of any two frames of images according to the feature descriptors of the feature points corresponding to each frame of image, and obtain a matching pair of feature points of the two frames of image; An image connection graph is obtained based on the feature point matching pairs of the two frames of images.

4. The method according to claim 1, wherein: The performing image segmentation processing on each frame of the N frames of video images to obtain contour information of the target object corresponding to each frame of the image includes: Performing image coding processing on each frame of the N frames of video images to obtain an image feature vector corresponding to each frame of the image; Generate a selection prompt corresponding to each frame of the image, wherein the selection prompt represents a range of the target object on each frame of the image; Performing prompt encoding processing on the selection prompt to obtain a prompt feature vector corresponding to each frame of the image; Mask processing is performed on the image feature vector and the prompt feature vector to obtain contour information of the target object corresponding to each frame of the image.

5. The method according to claim 4, wherein: The performing image coding processing on each frame of the N frames of video images to obtain an image feature vector corresponding to each frame of the image includes: Performing segmentation processing on each frame of the N frames of images to obtain an image block of each frame of the image; Performing position encoding on the image blocks of each frame of the image to obtain a position feature vector of each frame of the image; An image feature vector corresponding to each frame of image is obtained according to the image block of each frame of image and the position feature vector of each frame of image.

6. The method according to claim 1, wherein: The constructing a three-dimensional spatial structure image of the target object according to the internal reference information corresponding to each frame of the image, the external reference information and the contour information of the target object comprises: Determine the geometric structure information of the target object according to the intrinsic reference information, the extrinsic reference information and the contour information of the target object corresponding to each frame of the image; A three-dimensional spatial structure image of the target object is constructed according to the geometric structure information of the target object.

7. The method according to claim 1, wherein: The step of determining the three-dimensional bounding box information of the three-dimensional spatial structure image according to the three-dimensional spatial structure image of the target object includes: In response to a request for determining an initial three-dimensional bounding box, determining initial three-dimensional bounding box information; The initial three-dimensional bounding box information is adjusted according to the three-dimensional spatial structure image of the target object to obtain the three-dimensional bounding box information of the three-dimensional spatial structure image.

8. The method according to claim 1, wherein: Determining the three-dimensional detection box annotation information corresponding to each frame of image according to the three-dimensional bounding box information, the internal reference information corresponding to each frame of image, and the external reference information includes: Transposing the three-dimensional bounding box information to obtain transposed three-dimensional bounding box information; The three-dimensional detection box annotation information corresponding to each frame of image is determined according to the transposed three-dimensional bounding box information, the intrinsic reference information corresponding to each frame of image, and the extrinsic reference information.

9. A device for labeling a three-dimensional detection frame in a two-dimensional image, comprising: An acquisition module is used to acquire camera parameter information corresponding to each frame of N frames of video images, wherein the parameter information includes internal reference information and external reference information, wherein the internal reference information represents the internal attribute parameters of the camera used to shoot the video, and the external reference information represents the position parameters and posture parameters of the camera used to shoot the video; A segmentation processing module, used to perform image segmentation processing on each frame of the N frames of video images to obtain contour information of a target object corresponding to each frame of the image; A construction module, used to construct a three-dimensional spatial structure image of the target object according to the internal reference information corresponding to each frame of image, the external reference information and the contour information of the target object; A first determining module, configured to determine three-dimensional bounding box information of the three-dimensional spatial structure image according to the three-dimensional spatial structure image of the target object; The second determination module is used to determine the three-dimensional detection box annotation information corresponding to each frame of image according to the three-dimensional bounding box information, the internal reference information corresponding to each frame of image, and the external reference information.

10. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Three-dimensional target detection frame labeling method and device, electronic equipment and storage medium

    CN116844124A