Structure annotation
11636686 · 2023-04-25
Assignee
Inventors
- Thomas Westmacott (Cambridge, GB)
- Joel Jakubovic (Cambridge, GB)
- John Redford (Cambridge, MA)
- Robert Chandler (Cambridge, GB)
Cpc classification
G06F18/2148
PHYSICS
G06V10/62
PHYSICS
G06V20/56
PHYSICS
International classification
G06V20/56
PHYSICS
G06T7/246
PHYSICS
G06V10/22
PHYSICS
Abstract
A method of annotating frames of a time sequence of frames captured by at least one travelling vehicle comprises, in a frame processing system: determining a three-dimensional (3D) road model for an area captured in the time sequence of frames; receiving first annotation data denoting a known 3D location of a moving object for a first frame of the time sequence of frames; and automatically generating second annotation data for marking an expected moving object location in at least a second frame of the time sequence of frames, by assuming the moving object moves along an expected path determined from the known 3D location and the 3D road model.
Claims
1. A method of annotating frames of a time sequence of frames captured by at least one travelling vehicle, the method comprising, in a frame processing system: determining a three-dimensional (3D) road model for an area captured in the time sequence of frames; receiving first annotation data denoting a known 3D location of a moving object for a first frame of the time sequence of frames; and automatically generating second annotation data for marking an expected moving object location in at least a second frame of the time sequence of frames, by assuming the moving object moves along an expected path determined from the known 3D location and the 3D road model.
2. The method of claim 1, wherein the frames are 2D images.
3. The method of claim 1, wherein the 3D location of the moving object is determined for the first frame based on an imposed geometric restriction on an elevation of the known 3D location relative to a road surface of the 3D road model.
4. The method of claim 3, wherein the geometric restriction restricts the known 3D location to a predetermined zero or non-zero elevation relative to the road surface of the 3D road model.
5. The method of claim 3, wherein a 3D annotation element is located at an initial 3D location, the 3D annotation element is geometrically projected into the image plane of the first frame, and the 3D location is adjusted whilst said geometric restriction is maintained to match the projection of the 3D annotation element to the moving object in the first frame, thereby determining the known 3D location of the moving object.
6. The method of claim 5, wherein the 3D location is manually adjusted to manually match the projection to the moving object in the image plane whilst maintaining said geometric restriction.
7. The method of claim 5, wherein the second annotation data is determined by transforming the 3D annotation element to move it along the expected path to the expected moving object location in 3D space.
8. The method of claim 7, wherein the second annotation data comprises 2D annotation data for marking the expected moving object location in the image plane of the second frame, the 2D annotation data determined by projecting the 3D annotation element at the expected moving object location into the image plane of the second frame.
9. The method of claim 5, wherein first 2D annotation data is determined for the first frame by projecting the 3D annotation element at the known 3D location into the image plane of the first frame.
10. The method of claim 1, wherein the expected path is determined based on a speed of the moving object and a time interval between the first and second frames.
11. The method of claim 10, wherein the speed is assumed to match a speed of the travelling vehicle.
12. The method of claim 10, wherein an additional known 3D location of the moving object is determined for a third of the frames, and the known 3D location and the additional known 3D location are used to estimate the speed based on a time interval between the first and third frames.
13. The method of claim 1, wherein the expected road model is determined by reconstructing a path travelled by the vehicle whilst capturing the time sequences of images, the 3D road model exhibiting a road shape that corresponds to the shape of the reconstructed vehicle path.
14. The method of claim 13, wherein the expected path of the moving object is defined as having zero vertical offset from the reconstructed vehicle path in the direction of a road surface normal and a fixed lateral offset from the reconstructed vehicle path.
15. The method of claim 1, wherein a direction of movement is inferred for the moving object based on its location relative to a road structure of the 3D road model.
16. The method of claim 1, wherein the annotated frames are used to train a machine learning model in a supervised training process.
17. The method of claim 1, wherein location data captured in association with the time sequence of frames is used to match the time sequence of frames to an area of a map in order to determine a road shape for the 3D road model.
18. The method of claim 1, wherein the second annotation data takes the form of a 3D annotation element located at the expected moving object location in 3D space.
19. A processing computer system comprising: one or more processors configured to: receive a time sequence of frames captured by at least one travelling vehicle; determine a three-dimensional (3D) road model for an area captured in the time sequence of frames; receive first annotation data denoting a known 3D location of a moving object for a first frame of the time sequence of frames; and automatically generate second annotation data for marking an expected moving object location in at least a second frame of the time sequence of frames, by assuming the moving object moves along an expected path determined from the known 3D location and the 3D road model.
20. At least one computer-readable storage medium having encoded thereon executable instructions which, when executed on one or more processors of a computer system, cause the computer system to: receive a time sequence of frames captured by at least one travelling vehicle; determine a three-dimensional (3D) road model for an area captured in the time sequence of frames; receive first annotation data denoting a known 3D location of a moving object for a first frame of the time sequence of frames; and automatically generate second annotation data for marking an expected moving object location in at least a second frame of the time sequence of frames, by assuming the moving object moves along an expected path determined from the known 3D location and the 3D road model.
Description
BRIEF DESCRIPTION OF FIGURES
(1) For a better understanding of the present invention, and to show how embodiments of the same may be carried into effect, reference is made to the following Figures by way of non-limiting example in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
(25)
(26)
(27)
(28)
(29)
(30)
DETAILED DESCRIPTION
(31) By way of example, reference is made to International Patent Application No. PCT/EP2019/056356 entitled “Image Annotation” which is incorporated herein by reference in its entirety. This discloses an image processing system in which a 3D path (VP) of a travelling vehicle (ego vehicle) is reconstructed for the purpose of image annotation using simultaneous localization and mapping (SLAM) processing. SLAM processing is applied to images captured by an image capture device (camera) of the vehicle. In processing the images, a respective location of the ego vehicle on the ego vehicle path VP when each of the images was captured is determined (referred to as the capture location of that image).
(32) Further details of the image processing system will now be described to provide relevant context to the embodiments of the invention described below under the heading “ANNOTATING OBJECTS”. The present invention uses a 3D road model as a basis for annotating static objects or objects moving between frames. In the embodiments of the invention described below, the 3D road model is inferred from the path of the ego vehicle in 3D space, using the techniques summarized in the preceding paragraph and described. However, the invention is not limited in this respect, and the 3D road model can be determined using other methods (some examples of which are given later).
(33) Image Processing System
(34) Autonomous vehicles require knowledge of the surrounding road layout, which can be predicted by state-of-the-art CNNs. This work addresses the current lack of data for determining lane instances, which are needed for various driving manoeuvres. The main issue is the time-consuming manual labelling process, typically applied per image.
(35) This disclosure recognizes that driving the car is itself a form of annotation. This is leveraged in a semi-automated method that allows for efficient labelling of image sequences by utilising an estimated road plane in 3D and projecting labels from this plane into all images of the sequence. The average labelling time per image is reduced to 5 seconds and only an inexpensive dash-cam is required for data capture.
(36) Autonomous vehicles have the potential to revolutionise urban transport. Mobility will be safer, always available, more reliable and provided at a lower cost.
(37) One important problem is giving the autonomous system knowledge about surrounding space: a self-driving car needs to know the road layout around it in order to make informed driving decisions. This disclosure addresses the problem of detecting driving lane instances from a camera mounted on a vehicle. Separate, space-confined lane instance regions are needed to perform various challenging driving manoeuvres, including lane changing, overtaking and junction crossing.
(38) Typical state-of-the-art CNN models need large amounts of labelled data to detect lane instances reliably. However, few labelled datasets are publicly available, mainly due to the time-consuming annotation process; it takes from several minutes up to more than one hour per image to annotate images completely for semantic segmentation tasks. By contrast, the semi-automated annotation process herein reduces the average time per image to the order of seconds. This speed-up is achieved by (1) noticing that driving the car is itself a form of annotation and that cars mostly travel along lanes, (2) propagating manual label adjustments from a single view to all images of the sequence and (3) accepting non-labelled parts in ambiguous situations.
(39) Some previous work has aimed on creating semi-automated object detections in autonomous driving scenarios. [27] propose to detect and project the future driven path in images, but does not address the problem of lane annotations. This means the path is not adapted to lane widths and crosses over lanes and junctions. Moreover, it requires an expensive sensor suite, which includes calibrated cameras and Lidar. In contrast, the present method is applicable to data from a GPS enabled dash-cam. Contributions of this disclosure include: A semi-automated annotation method for lane instances in 3D, requiring only inexpensive dash-cam equipment Road surface annotations in dense traffic scenarios despite occlusion Experimental results for road, ego-lane and lane instance segmentation using a CNN
(40) A method is described below that provides a fully automatic method of generating training data with only marginally lower quality than the conventional manual process.
(41) An extension to this is also described, which introduces a manual correction (“human fixer”) stage. With this extension, the method becomes a semi-automatic method that generates as good quality as the conventional manual method but with order 100 times less human effort, as measured in terms of annotation time per image. This is on the basis of the observation that a typical annotation time—using full manual annotation of the kind currently used at present—can be anything from 7 minutes to 90 minutes per image; whereas, using the method described below, it is possible to achieve an annotation time of around 12 seconds per image.
(42) In the methods described below, the training images are frames of a video image. As will become apparent, the described methods are particularly well suited to batch-annotation of video frames as captured by a moving training vehicle. For a typical training video (formed of a sequence of static 2D images, i.e. frames), it has been possible to achieve an annotation time of 7 minutes per typical training video sequence, which amounts to about 12 seconds per image, whilst still achieving results of good quality.
(43)
(44) A perception input may be a 2D image, and 2D images annotated with 2D annotation data (e.g. 2D bounding boxed, 2D segmentation maps etc.) may be used to train a 2D perception component such as a 2D object detector, 2D instance segmentation component etc. However, a perception input may also be 3D, i.e. comprise 3D structure data, and 3D structure detector (e.g. 3D bounding box detector, 3D pose estimator, 3D object detector etc.) may be trained using 3D annotation data (such as 3D bounding boxes).
(45) In
(46) The annotated perception inputs 108 may be divided into training, test and validation sets, labelled 108a, 108b and 108c respectively. An annotated training example may thus be used for training the perception component 102 without forming part of the training set 108a because it is used for testing or validation instead.
(47) The perception component 102 receives a perception input, denoted x, from one of the training, test and validation sets 108a, 108b, 108c, and processes the perception input x in order to provide a corresponding perception output denoted by
y=f(x;w).
(48) In the above, w denotes a set of model parameters (weights) of the perception component 102, and f denotes a function defined by the weights w and the architecture of the perception component 102. For example, in the case of 2D or 3D bounding box detection, the perception output y may comprise one or more detected 2D or 3D bounding boxes derived from the perception input x; in the case of instance segmentation, y may comprise one or more segmentation maps derived from the perception inputs. In general, the format and content of the perception output y depends on the choice of perception component 102 and its chosen architecture, and those choices are, in turn, made in accordance with the desired perception modality or modalities for which it is to be trained.
(49) The detection component 102 is trained based on the perception inputs of the training set 108a so as to match its output y=f(x) to the ground truth provided by the associated annotation data. The ground truth provided for perception input x is denoted y.sub.x herein. So, for the training example 104, the ground truth is proved by the associated annotation data 106.
(50) This is a recursive process, in which an input component 112 of a training system 110 systematically provides perception inputs of the training set 108b to the perception component 102, and a training component 114 of the training system 110 adapts the model parameters w in an attempt to optimize an error (cost) function that penalizes deviation of each perception output y=f(x;w) from the corresponding ground truth y.sub.x. That deviation is characterized by a defined metric (such as mean square error, cross-entropy loss etc.). Hence, by optimizing the cost function to a defined extent, an overall error across the training set 108a as measured with respect to the ground truths can be reduced to an acceptable level. The perception component 102 can for example be a convolutional neural network, where the model parameters w are weightings between neurons, but the present disclosure is not limited in this respect. As will be appreciated, there are numerous forms of perception model which may be usefully trained on suitably annotated perception inputs.
(51) The test data 108b is used to minimize over-fitting, which refers to the fact that, beyond a certain point, increasing the accuracy of the detection component 102 on the training dataset 108a is detrimental to its ability to generalize to perception inputs it has not encountered during training. Overfitting can be identified as the point at which increasing the accuracy of the perception component 102 on the training data 108 reduces (or does not increase) its accuracy on the test data, with accuracy being measured in terms of the error function. The aim of training is to minimize the overall error for the training set 108a to the extent it can be minimized without overfitting.
(52) The validation dataset 108c can be used to provide a final assessment of the detection component's performance, if desired.
(53) This description focusses initially on 2D perception inputs, in the form annotated street scene images (also referred to as road images herein). That is, street scene images having associated image 2D annotation data. 3D perception input and 3D annotation data are described later.
(54) The method described below can be used to automatically or semi-automatically generate such annotation data 106, for use in training, testing and/or validation of the detection component 102.
(55)
(56) Although only one image capture device 202 is shown in
(57) As will be appreciated, this is a highly simplified description of certain autonomous vehicle functions. The general principles of autonomous vehicles are known, therefore are not described in further detail.
(58) 2 Video Collection
(59) For the purpose of experiments detailed later, videos and associated GPS data were captured with a standard Nextbase 402G Professional dashcam recording at a resolution of 1920×1080 at 30 frames per second and compressed with the H.264 standard (however, any suitable low-cost image capture device could also be used to achieve the same benefits). The camera was mounted on the inside of the car windscreen, roughly along the centre line of the vehicle and approximately aligned with the axis of motion.
(60)
(61)
(62)
(63) The vehicle 300 is a car in this example, but it can be any form of vehicle.
(64) Underpinning the invention is an assumption that the path travelled by the human-driven training vehicle 300 extends along a road, and that the location of the road can therefore be inferred from whatever path the training vehicle 300 took. When it comes to annotating a particular image in the captured sequence of training images, it is the hindsight of the path that the training vehicle 300 subsequently took after that image was captured that allows the automatic annotation to be made. In other words, hindsight of the vehicle's behavior after that image was captured is exploited in order to infer the location of the road within the image. The annotated road location is thus a road location that is expected given the path subsequently travelled by the training vehicle 300 and the underlying assumptions about how this relates to the location of the road.
(65) As described in further detail below, the path is determined by processing the captured images themselves. Accordingly, when annotating a particular image with an expected road location, for a forward-facing (resp. rear-facing) image capture device 302, the expected road location in that image is determined from the path travelled by the vehicle after (resp. before) that image was captured, as reconstructed using at least one of the subsequently (resp. previously) captured images in the sequence of captured images. That is, each image that is annotated is annotated using path information derived from one or more of the images captured after (resp. before) the image being annotated.
(66) 3 Video Annotation
(67)
(68) The initial annotation step is automated and provides an estimate of the road surface in 3D space, along with an estimate for the ego-lane (see Sec. 3.1). Then the estimates are corrected manually and further annotations are added in road surface space. The labels are then projected into the 2D camera views, allowing the annotation of all images in the sequence at once (see Sec. 3.2).
(69) 3.1 Automated 3D Ego-Lane Estimation
(70) Given a video sequence of N frames from a camera with unknown intrinsic and extrinsic parameters, the goal is to determine the road surface in 3D and project an estimate of the ego-lane onto this surface. To this end, first OpenSfM [28]—a “structure-from-motion” algorithm—is applied to obtain the 3D camera locations c.sub.i and poses R.sub.i for each frame i∈{1, . . . , N} in a global coordinate system, as well as the camera focal length and distortion parameters.
(71) The road is assumed to be a 2D manifold embedded in the 3D world. Furthermore, the local curvature of the road is low, and thus the orientation of the vehicle wheels provide a good estimate of the local surface gradient. The camera is fixed within the vehicle with a static translation and rotation from the current road plane (i.e. it is assumed the vehicle body follows the road plane and neglect suspension movement). Thus the ground point g.sub.i on the road below the camera at frame i can be calculated as
g.sub.i=c.sub.i+hR.sub.in.
where h is the height of the camera above the road and n is the surface normal of the road relative to the camera (see
b.sub.i.sup.left=g.sub.i+w.sub.i.sup.leftR.sub.ir
b.sub.i.sup.right=g.sub.i+w.sub.i.sup.rightR.sub.ir (1)
where r is the vector within the road plane, that is perpendicular to the driving direction and w.sub.i.sup.left, w.sub.i.sup.right are the offsets to the left and right ego-lane borders. See
(72) Given a frame i, all future lane borders
b.sub.j(b.sub.j∈{b.sub.j.sup.left,b.sub.j.sup.right} and j>i)
can be projected into the local coordinate system via
{circumflex over (b)}.sub.j=R.sub.i.sup.−1(b.sub.j−c.sub.i) (2)
(73) Then the lane annotations can be drawn as polygons of neighbouring future frames, i.e. with the corner points {circumflex over (b)}.sub.j.sup.left, {circumflex over (b)}.sub.j.sup.right, {circumflex over (b)}.sub.j+1.sup.right, {circumflex over (b)}.sub.j+1.sup.left.
(74) This makes implicitly the assumption that the lane is piece-wise straight and flat between captured images. The following parts describe how to measure or otherwise obtain the following quantities:
h,n,r,w.sub.i.sup.left and w.sub.i.sup.right
(75) Note that h, n and r only need to be estimated once for all sequences with the same camera position.
(76) The camera height above the road ft is easy to measure manually. However, in case this cannot be done (e.g. for dash-cam videos downloaded from the web) it is also possible to obtain the height of the camera using the estimated mesh of the road surface obtained from OpenSfM. A rough estimate for h is sufficient, since it is corrected via manual annotation, see the following section.
(77)
(78) The road normal n is estimated based on the fact that, when the car moves around a turn, the vectors representing its motion m will all lie in the road plane, and thus taking the cross product of them will result in the road normal, see
m.sub.i,j
be the normalised motion vector between frames i and j, i.e.
(79)
(80) The estimated road normal at frame i (in camera coordinates) is
n.sub.i=R.sub.i.sup.−1(m.sub.i−1,i.Math.m.sub.i,i+1),
where .Math. denotes the cross-product (see
(81)
(82) The normal may only be estimated during turns, and thus this weighting scheme emphasises tight turns and ignores straight parts of the journey.
(83) r is perpendicular to the forward direction f and within the road plane, thus
r=f.Math.n (4)
(84) The only quantity left is f, which can be derived by using the fact that
m.sub.i−1,i+1
is approximately parallel to the tangent at c.sub.i, if the rate of turn is low. Thus it is possible to estimate the forward point at frame i
f.sub.i=R.sub.i.sup.−1m.sub.i−1,i+1
(see
(85)
(86) In this case, the movements are weighted according the inner product in order to up-weight parts with a low rate of turn, while the max assures forward movement.
(87) The quantities
w.sub.i.sup.left and w.sub.i.sup.right
are important to get the correct alignment of the annotated lane borders with the visible boundary.
(88) To estimate these, it may be assumed that the ego-lane has a fixed width w
(89) and the car has travelled exactly in the centre, i.e.
w.sub.i.sup.left=½w and w.sub.i.sup.right=−½w
are both constant for all frames. In an extension (see the following section), this assumption is relaxed to get an improved estimate through manual annotation.
(90) In practice, a sequence is selected with a many turns within the road plane to estimate n and a straight sequence to estimate f. Then the same values are re-used for all sequences with the same static camera position. Only the first part of the sequence is annotated, up until 100 m from the end, since otherwise not sufficient future lane border points can be projected. A summary of the automated ego-lane annotation procedure is provided in Annex A (Algorithm 1) and a visualisation of the automated border point estimation is shown in
(91) Further details are described below.
(92)
(93)
(94) The image system of
(95) The image processing system of
(96) The path reconstruction component 402 receives a sequence of captured two-dimensional (2D) images 400 and processes them to create a three-dimensional (3D) reconstruction of the path travelled by the vehicle from the captured sequence of images (Step 502,
(97) To the right of Step 502,
(98) The first path, labelled CP (camera path), is a 3D reconstruction of the path travelled by the image capture device (camera) 302 of the training vehicle 300. Techniques for reconstructing the path travelled by a moving camera from a sequence of images captured by the camera as it moves are known in the art, and are therefore not described in detail herein.
(99) It is possible to recreate the path from other data (accelerometer, highly accurate GPS etc.) however making the reconstruction be only from the video beneficially makes the cost of capturing the data very cheap, due to the fact that even a basic dashcam can be used for data collection, not an expensive car containing expensive accelerometers, expensive accurate GPS etc.
(100) The second path, labelled VP (vehicle path), is a reconstruction of the path travelled by the training vehicle 300, which is defined as the path travelled by a point that lies approximately half way across the width of the training vehicle 300, i.e. equidistant from the right-hand and left-hand sides of the training vehicle, and below the image capture device 300 at approximately road level (labelled P in
(101) Note that it is not essential for these points to be exactly equidistant—the method has been found to give accurate results even when the points are not equidistant.
(102) It is straightforward to determine the vehicle path VP at ground level from the camera path CP if the height of the camera 302 above the surface of the road, labelled H in
(103) Note that the examples shown to the right of
(104) From the 3D path reconstruction, the road modelling component 404 creates a 3D model (602,
(105) In the example shown to the right of Step 504, the road model is formed of two geometric curves R1, R2, corresponding to assumed lane boundary locations, which are defined as lying parallel to, and at the same height as, the vehicle path VP, on either side of the vehicle path VP and each at a distance W/2 from it, where W is an assumed road or lane width.
(106) This is based on the assumptions that the training vehicle 300 is travelling along a road lane, the direction of travel of the training vehicle 300 is approximately parallel to the actual lane boundaries of that lane, and that it is driven in approximately the center of the lane.
(107) The expected road locations can for example correspond to an edge of the road itself (so as to mark the road, or the non-drivable area beside the road), or to lane locations of lanes within the road.
(108) In general, the automated annotation techniques can be used to mark the locations of what is referred to herein as “parallel structure”, i.e. structure that is expected to run at least approximately parallel to the path driven by the vehicle, or more generally to expected structure that is expected to have a specific orientation relative to the vehicle path. This can be road structure such as roads, lanes, non-drivable areas assumed to lie parallel to the vehicle path, junctions assumed to extend perpendicular to the vehicle path, or real-world parallel structures that might be encountered by vehicles other than cars, such as runways (in the case of autonomous drones, planes etc.) etc. Accordingly, all description of the 3D road model applies equally to any other form 3D structure model of an environment in which the vehicle travelled, for which expected parallel structure can be automatically determined using the methods described herein.
(109) Different assumptions can be used to accommodate different types of parallel structure, on top of the underlying assumption that they lie parallel to the path that was actually travelled by the training vehicle 300.
(110) Herein, the description may make specific reference to roads or lanes, and to related parameters such as road or lane width. However, it will be appreciated that the description applies to any parallel road structure, and that any references to road or lane width (and the like) apply generally to a width parameter determined for the expected parallel structure.
(111) The 3D road model is used by the image annotation component 406 to generate 2D annotation data for marking the individual 2D training images individually with expected road locations (Step 506,
(112) As illustrated to the right of Step 506 in
(113) The image plane I(n) is a plane corresponding to the field of view of the camera 302 when image n was captured, and is thus located at a point corresponding to the location of the vehicle when image n was captured.
(114) A parameter computation component 408 computes various “reference parameters” that are used to construct the 3D model from the reconstructed vehicle path and to perform the geometric projection. These reference parameters comprise the following image capture parameters, relating to the position and orientation of the image capture device 302 of the training vehicle 300: 1) The height H of the camera 302 above the road; 2) The horizontal offset S of the camera from the center line C; 3) The orientation of the camera 302 relative to the vehicle, which can be captured as: a. A “forward point” of the camera 302 (as defined below), and b. A “horizon line” (as defined below) of the camera;
and additionally: 4) The width W of the road/lane.
(115) These are used in the manner described briefly above, and further details of how they computed are used are described below. For now suffice it to say that these parameters are computed from the captured training images 400 themselves, which has various benefits that are described later.
(116) The annotation data is stored in electronic storage 414, from which it can be accessed or retrieved for use in the training process described above with reference to
(117) 3.2 Manual Corrections and Additional Annotations
(118) An annotation interface provides a human annotator with the ability to view the frames in a batch individually with the currently rendered lanes projected into the images. These lanes can be widened, narrowed and moved by the annotator in the most convenient frame and these changes to the lane structure will be projected into all other frames in the batch, providing a clear advantage over annotation of all of the image individually.
(119)
w.sub.i.sup.left(automated)
w.sub.i.sup.left(manual)
Initially, all w.sub.i.sup.left and w.sub.i.sup.right are set to a constant value, and thus the estimate follows the driven path, but the lane borders are not correctly annotated as can be seen. Then the annotators correct the w.sub.i.sup.left and w.sub.i.sup.right, after which the estimate improves.
(120)
(121) In addition to the lanes on the road, a strip along the side of road, denoted by reference sign NR1, is annotated as ‘non-road’. Further the whole upper part of each image (top strip NR2) is annotated as non-road, where the size is adjusted manually by the annotators.
(122) The above is implemented in the extension of
(123) An output of the UI 412 is shown connected to an input of the image annotation component, via connector 418, to denote the fact that the user can modify the annotation data A(n) for an individual image via the UI 412, in order to better align the assumed lane boundaries R1, R2 with the actual lane boundaries in that image (only). This can be useful for accommodating “one-off” discrepancies, caused for example by unusual localized road structure.
(124) A model adaptation component 410 is also provided to allow efficient manual adaptation of the annotation data via the UI 412 across multiple images simultaneously. This works by allowing the user to adapt the 3D road model with reference to a single image and its rendered annotation data, in order to better align the road boundaries in that image. However, because the 3D road model is being adapted (rather than just the individual image's annotation data A(n)), these adaptations can also be applied to the annotation data for other images, without the user having to manually adapt the annotation data for those other images. For example, a user can adjust the assumed lane width W to better fit one image, and because the road model is being adapted to the new lane width, the annotation data for other images can be automatically adapted based on the adapted model with the new lane width W. This is described in further detail below with reference to
(125) The above-described components of the image processing system of
(126) Details of Example Implementation:
(127) An example of an annotated image is shown in
(128) As indicated above, the methodology exploits the following observations and assumptions: 1) When humans drive cars they mostly follow a path that remains close to the centre of a lane on the road. Thus, if a video camera is placed facing forward (or alternatively backwards) in a human driven car then the path that the camera traces out when projected down onto the ground and expanded to the width of a lane will (mostly) outline where the lane lies. 2) Having found the outline of where the lane lies, then for each image in the video this outline of the lane under the car can be projected back into the image and provides (nearly) exactly the annotation required to mark the lane position.
(129) Preferred embodiments of the invention achieve this with low cost equipment, as explained later.
(130) Determining Path and Reference Parameters:
(131) In order generate the lane position and project it back into each image, as indicated above the following need to be known or deduced: The path in 3D space that the camera 302 follows (CP,
(132) The image processing techniques described below allow all the above to be determined with inexpensive and un-calibrated equipment, such as a mobile phone or a dash-cam costing a few hundred pounds, or other low cost consumer equipment. This is because they can be computed from the images captured by the training vehicle 300, using the image processing techniques described below. 3) The 3D path of the camera CP can be deduced by post processing captured videos from un-calibrated cameras using existing visual SLAM (simultaneous localization and mapping) techniques. Software packages such as OpenSFM and ORB-SLAM can be used to generate accurate camera path information.
(133) Such techniques can be used to construct a 3D map of the environment travelled by the training vehicle 300, whilst simultaneously tracking the vehicles' location within that environment.
(134) Some of the underlying principles of image-based SLAM are briefly illustrated by way of example with reference to
(135) Note that this 3D model constructed as part of the SLAM process is distinct from the 3D model constructed by the modelling component 404. The former is in the form of a surface map constructed based on image triangulation, whereas the later represents expected structure that is inferred based on the vehicle path, which in turn is determined from the image capture device locations derived in performing the SLAM process.
(136) With reference to
(137) Such SLAM techniques do in fact generate surface reconstructions of the environment. Whilst such surface reconstructions could be used be used to determine road/lane positions directly in theory, generally the quality of the surface reconstructions is not sufficient to do so in practice. However, the quality of the motion of the camera through the 3D scene is good, and thus provides a sufficiently accurate reconstruction of the camera path CP (this is because the camera positions are based on order hundreds of feature points where as surface positions are only based on a handful of feature points), which in turn allows the road/lane positions to be inferred using the present techniques, with sufficient accuracy.
(138) Note that some of these techniques can also automatically deduce the camera characteristics such as focal length and even lens distortion parameters. It may be possible to use such parameters to optimize the present techniques but they are not essential.
(139) An example image of an SLAM reconstruction of camera positions moving through a point cloud world is shown in
(140) The remaining reference parameters are computed by the parameter computation component 408 via image processing, as described below. First some of the underlying considerations are briefly introduced.
(141) With reference to
(142) Note, unless otherwise indicated, the term “absolute” herein is used herein to refer to orientation and locations within the environment in which the vehicle is travelling. That is, as defined relative to an (arbitrary) global coordinate system of a global frame of reference of the environment in which the vehicle moves. This can be defined as an inherent part of the SLAM process. This is the coordinate system in which the reconstructed vehicle path, the orientation of the image capture device within the environment (absolute orientation) and the surface reconstruction are defined.
(143) The term “relative” is used to refer to locations and orientations relative to the vehicle, that is, defined relative to a coordinate system of the vehicle, such as the coordinate system defined by the vehicle axes a.sub.T, a.sub.L, a.sub.V.
(144) With reference to
(145) It is not possible to rely on there being sections of the video where the car travels in a perfectly straight line. To overcome the fact that the car may never travel in a perfectly straight line the following approach is taken.
(146) Three equidistant points on the path are taken, the outer two are joined and this vector is used as an approximation of the forward direction at the central point. This approach is continuously averaged weighted by the dot product of the vectors between the central point and the two outer points. Thus, times when the car is travelling nearly straight are weighted much more strongly than times when the car is turning. Using this method can produce sub-pixel accuracy.
(147) This is illustrated in
(148) In other words, this exploits the observation that the vector difference x.sub.t+1−x.sub.t−1 lies (approximately) parallel to the vehicle's longitudinal axis a.sub.L when the vehicle 300 is travelling in an (approximately) straight line, in order to estimate the angular offset of the camera 302 relative to the vehicle 300. This is captured in the weighted average by assigning greater weight to intervals of more linear (straight line) motion.
(149) Note that, strictly speaking, the vector difference x.sub.t+1−x.sub.t−1 lies approximately parallel to the vehicles longitudinal axis so long as the rate of turn is approximately constant (it doesn't actually require the vehicle to be travelling in a straight line). However the assumption of approximate constant rate of turn will be more likely to be true when the vehicle is more closely travelling in a straight line.
(150) The calculation is performed as a vector average, in which the vector that represents the average forward motion of the car as expressed in the camera coordinate system. This vector when projected forwards will cut the image plane at a specific pixel (the forward point pixel). This pixel is the point which the car would seem to be moving towards if it were driving on a perfectly straight and flat road (the “forward point” as that term is used herein).
(151) By way of example, the forward direction of the vehicle can be computed as a weighted average of the vector difference between the longitudinal axes of the camera and vehicle respectively according to the equation 1:
(152)
where w.sub.L,t=v.sub.0.Math.v.sub.1 as evaluated at time t.
(153) The longitudinal vehicle axis a.sub.L at time t is assumed to lie parallel to the vector difference x.sub.t+1−x.sub.t−1.
(154) Note that x.sub.t+1−x.sub.t−1 needs to be evaluated in the reference frame of the image capture device 302 in this context, in order to give meaningful results, i.e. in order for the weighted average of equation (1) to provide an accurate estimate of the direction of the vehicle's longitudinal axis a.sub.L relative to the camera's longitudinal axis a.sub.L′.
(155) The SLAM process will derive absolute values for x.sub.t+1 and x.sub.t−1, i.e. in the global coordinate system. However, the direction of the camera axes in the global coordinate system, i.e. the absolute orientation of the image capture device, at time t is also derived via the SLAM process itself, which can in turn be used to transform vectors in the global frame of reference into the frame of reference of the image capture device 302.
(156) The dot product v.sub.0.Math.v.sub.1 depends on the magnitude of the change in direction between t−1 and t+1, such that the smaller the change in the magnitude of direction, the greater weighting that is given to the measurement at time t.
(157) As noted above, strictly speaking, the vector difference x.sub.t+1−x.sub.t−1 lies approximately parallel to the vehicles longitudinal axis so long as the rate of turn is approximately constant (it doesn't actually require the vehicle to be travelling in a straight line). Therefore an alternative weighting scheme could be used in which the vector difference at each time is weighted according to the change in curvature exhibited in the vehicle path between t−1 and t+1.
(158) Of course, typically the orientation of the vehicle's axes remains fixed in the image capture device's frame of reference as the vehicle moves, because the camera 302 is expected to remain in an essentially fixed orientation relative to the vehicle 300—the time dependency in the above stems from the fact that the estimates of the vehicle and camera axes are not exact.
(159) Time t corresponds to a certain point on the camera path CP, and can be a time at which one of the images was captured or a time in between captured images, to which a camera pose can be assigned by interpolation of the camera poses for different images.
(160) In an alternative implementation, the offset between a.sub.L and a.sub.L′ could be represented as a pair of angles.
(161) With reference to
(162) This is illustrated in
(163) In other words, this exploits the observation that, when the vehicle is exhibiting angular acceleration such that the vehicle path exhibits local curvature in 3D space, the plane in which the curved portion of the vehicle path lies is at least approximately parallel to the plane of the road surface under normal driving conditions; or, equivalently, the normal to the locally curved portion of the path is at least approximately parallel to the vertical axis a.sub.V of the vehicle 300.
(164) The average normal vector of the path expressed in camera coordinates. The plane that is perpendicular to this road surface normal vector can be intercepted with the image plane and this will provide a line across the image that would match the horizon if the car were driving along a perfectly straight and level road (the “horizon line” as that term is used herein).
(165) By way of example, the rotational orientation of the camera within the vehicle can be computed as a weighted average of the offset angle between the vertical axes of the camera and vehicle respectively according to the equation (2):
(166)
where: w.sub.V,t=|v.sub.0×v.sub.1| as evaluated at time t, v.sub.0=x.sub.t−x.sub.t−1, v.sub.1=x.sub.t+1−x.sub.t.
(167) The vertical vehicle axis a.sub.V at time t is assumed to lie parallel to the vector cross product v.sub.0×v.sub.1.
(168) As above, v.sub.0×v.sub.1 needs to be evaluated in the reference frame of the image capture device 302 in this context, in order to give meaningful results, i.e. in order for the weighted average of equation (s) to provide an accurate estimate of the direction of the vehicle's vertical axis a.sub.V relative to the camera's longitudinal axis a.sub.L′. As noted above, the absolute orientation of the image capture device as determined via the SLAM process can be used to transform vectors from the global frame of reference into the frame of reference of the image capture device.
(169) The magnitude of the cross-product |v.sub.0×v.sub.1| increases as the constituent vectors move towards being perpendicular, as that is expected to yield the most accurate results. More generally they are weighted by a factor that increases as an offset angle α between those vectors tends towards ninety degrees, where |v.sub.0×v.sub.1|=|v.sub.0∥v.sub.1| sin α.
(170) As will be appreciated, many of the observations made above in relation to the angular orientation measurement also apply to the rotational orientation measurement. 6) The height of the camera above the road (H) can be calculated by generating a surface mesh of the road from the SLAM process (even though this is low accuracy) and then averaging the height of all points on the camera path above this mesh. The averaging across the whole path counteracts the poor accuracy of the mesh generated by the SLAM process.
(171) The height H at a given point on the camera path CP is defined the distance between a point on the camera path CP and the mesh along the vehicle's vertical axis a.sub.V at that point. A reason the rotational orientation of the camera 302 within the vehicle 300 is needed is to determine where the vehicle's vertical axis lies at each point on the path so that the height estimation can be computed. This is illustrated in
(172) Detecting the lane edges is obviously a hard problem (and the whole purpose of generating this lane training data is to train a neural network to solve this problem). However, detecting lane edges in this specific case can be made into a significantly easier problem by virtue of having two additional pieces of information. Firstly, the known path of the camera (and thus shape of the lane) can be used to create a transform to effectively straighten out the road prior to doing any lane boundary detection. Secondly the positions at which to search for lane boundaries are significantly reduced because the centre line of the lane is (nearly) known from the camera path and lanes have widths that are relatively fixed.
(173) For example, the images can be projected into a top down view, transformed to straighten out the road (using the camera path information) and then a Hough transform can be used to detect dominant lines with the correct approximate position and orientation.
(174) The width of the road at each point on the camera path CP is defined as the distance between the detected lane boundaries along the transverse vehicle axis a.sub.T at that point. A reason the angular orientation of the camera 302 within the training vehicle 300 is needed in addition to the rotational orientation is to determine where the vehicle's transverse axis a.sub.T lies in order to estimate W and C at each point along the path. This is also illustrated in
(175) By exploiting all of the above, it is possible to fully automatically generate annotation of the lane driven by the car in all images of the video, using only images captured from a low-cost and un-calibrated image capture device.
(176) It is also desirable to extend these techniques to label multiple lanes. One way to do this is as follows: 8) Multiple lanes (and thus the entire road surface) can be automatically annotated by driving along each lane and creating a single 3D SLAM reconstruction that includes the paths for each lane. It is necessary to merge the separate videos of driving along each line into a single reconstruction in order to obtain relative positioning of the lanes and the entire road surface.
(177)
(178) Extension—Human Fixer Stage:
(179) The fully automated annotation system described produces usable annotation, however it is still subject to a number of errors than can be fixed up with very little effort by a human annotator. For example: the calculated camera height may not be exactly correct the left/right position within the lane may not be exactly right the width of the lane may not be exactly right
(180) In addition to these fix ups for imperfect automatic calculations, there are some additional annotations that a human can add that are very low effort to add but provide significant benefit if they exist in the training data. For example: Adjacent lanes can be added (without having to drive these lanes). They are easy to add because adjacent lanes generally have parallel boundaries to the lane that the car has driven. Non-drivable parallel road features can be added. Regions of the road reserved for cycles or buses/taxies can be added simply (again they are generally just parallel regions of the ground that follow the driven lane). Regions of pavement adjacent to the road can be added. 10) A tool with a simple user interface has been developed that allows a human annotator to make these ‘fix ups’ and also add these additional annotations. The major benefit of this tool is that the fix ups and additional annotations can be made in one frame of the video and the system can automatically propagate these changes through all the frames in the video.
(181) This efficient saving stems from the fact that the user can adapt the 3D road model (via the model adaptation component 410) using one frame and its annotation data as a reference, and the fact that the adapted 3D road model can in turn can be applied to multiple images.
(182) Note also, that the technology is not limited to manual adjustment of automatically generated road/lane models. Any object in the world that is stationary can be marked and that object's position in each image of the video can be calculated (since the motion of the camera is known).
(183) In this way one frame of video with already pre-populated nearly correct annotations can be provided to a human and with minimal fix up they can generate circa 50-100 well annotated images. It would be possible to generate even more images if longer fragments of video were used, but in our experience, the length of video that it is convenient to 3D reconstruct and is also reasonably similar in its construction is sufficient to contain 50-100 images. 11) Note that the images that are used as training data are sampled from the whole video such that they are spaced a reasonable distance apart in space (not time) to provide some diversity of training data for the networks. There is little benefit in taking every image from the video as most of them are very similar to each other.
(184)
(185) The fact that much of the road structure of interest lies parallel to the vehicle path is exploited to provide a range of extremely quick manual annotation options: The width or location of the automatically-determined road structure can easily be changed (“nudging”); Additional road structure that lies parallel to the vehicle path/automatically determined road can easily be created, and its width and location can be easily nudged in the same way. The additional road structure is oriented parallel to the vehicle path/existing road structure automatically. For example, the automatically determined road structure may be an “ego lane”, i.e. the lane along with the vehicle drives. Additional structure can very easily be added across multiple images such as: other lanes, e.g. non-ego lanes, bus lanes, cycle lanes, central or left/right road markings, or any other parallel road markings, non-drivable areas such as pavements, grass, barriers, roadside growth (trees, hedges etc.) Perpendicular road structure, i.e. extending perpendicular to the automatically determined road structure/vehicle path, can also be added very easily, and its width and location can be nudged in the same way. Examples include junctions, give-way lines or other perpendicular road marking's etc., or other structure at an assumed angle from the path (e.g. branching points in the road). Changes in the width of the road, e.g. due to the number of lanes changing, can be accommodated by allowing the user to “split” the video sequence at a point of his/her choosing. After a split point the video, the user's adaptations will only be applied to the 3D road model at points after the split points—the parts of the model preceding the split point will remain unchanged, which in turn means the annotation data for the images before the split point remains unchanged.
(186) By way of example, the following workflow is considered. The user starts at the beginning of a training sequence. The 3D ego-lane has been automatically determined using the techniques above. Moreover, the locations of the centre and left/right lane markers have been determined, by assuming these are of a certain width and lie at the centre and far right/far left of the ego lane. At this point the user can adapt the ego lane width and position, and also the width and position of the road markings if necessary, to align them with the actual ego lane/road markings visible in the image. The user can also add additional parallel structure at this point, such as non-ego lanes, non-driveable areas etc.
(187) An example of an automatically annotated image, pre-fix up is shown in
(188) These changes are applied to the underlying 3D model, hence will also be applied to the subsequent images in the sequence. The user can then cycle through the following images, quickly verifying that everything still matches up.
(189) When the user gets to a point in the video at which a junction is clearly visible in one of the images s/he can add a junction structure at that point, and nudge its location/width as needed. Again, this is applied to the 3D model, therefore will apply to all of the images in which the junction is visible. Non-drivable road structure at the edges of the road will be automatically adapted to accommodate the parallel junction (i.e. any part of the non-drivable road structure that overlaps with the new junction will be removed automatically).
(190) An example of the UI when a junction has just been added is shown in
(191) With reference to
(192)
(193) As an extension, the user can also mark an area of sky in the images. This can be a simple case of the user defining a sky line, above which all of the images are definitely sky. Even though this will not label all of the sky in the images, this can still be useful in preventing the trained neural network from identifying sky as road structure. More sophisticated techniques could use the 3D road structure to infer a sky line in each image, e.g. based on the highest point of the road in 3D space.
(194) Extensions Beyond Lane Training Data:
(195) Any feature in the video that is parallel to the path followed can benefit from the same speed up in annotation and single click addition by the human annotator. 12) For example, the road markings can be annotated in this way. Both in position and type. Including centre dashed or solid lines, road edge lines, double yellow lines etc. For example, cycle lanes can be added in this way, as can pavements.
(196)
(197) Annotating Objects
(198) Returning briefly to
(199) The object annotation component 420 is shown having inputs connected to the 3D road modelling component 404 and the UI 412 respectively, and an output for providing object annotation data both for rendering by the rendering component 416 and for storage in the electronic storage 414.
(200) The functionality of the object annotation component 420 will now be described.
(201) Static Objects
(202) Any feature in the video stationary in the world can benefit from some level of speed up. Even if they cannot directly be created as a result of their shape being parallel to the path driven, they can still benefit from the fact that they can be marked up by a human in one frame of the video and automatically propagated through to all frames of the video. 13) For example, road signs can be annotated in this way. The sign can be specifically marked out by a human in one frame (with or without any initial hint provided by a poor-quality detection) and then automatically propagated though the entire set of images in the video.
(203) Annotation for stationary vehicles can be generated in this same way. Although the technique does not automatically allow annotation of moving objects to be sped up in the same way, the technique can be used for parked vehicles. Thus, allowing a subset of vehicles in the scene to be annotated with minimal effort. Moving vehicles could be annotated by marking the same object in multiple (at least two) images and assuming constant speed in-between the annotations. Then the label can be propagated to all images in-between the annotated ones. 14) Note that vehicles that are stationary look just the same as vehicles that are moving, so a neural network trained on annotated images of stationary vehicles, can be used at run time to detect moving vehicles.
(204)
(205) Another benefit of this technique is that the human can choose to annotate an object in an image in the video when the camera is close to it (i.e. when the object is large). This accurate annotation is then propagated to all images even when the object is small within the image. 15) Since there is a 3D model underlying the whole sequence of images in the video, then annotations automatically generated when the object is more distant from the camera will have the accuracy of annotation when the object was large and annotated by a human. This can often be more accurate than could be achieved by a human trying to annotate the small image of the object.
(206)
(207) Annotating Moving Objects
(208) An extension of the above techniques to moving objects will now be described (i.e. moving relative to the road such that, unlike static objects, they do not maintain a fixed position relative to the road).
(209) Using the 3D vehicle path, together with certain reference parameters that may be derived from the images themselves, a 3D model road model is determined. The road is modelled as a 2D manifold embedded in 3D space. By geometrically projecting the road model into the image planes of the captured images, those images can be efficiently annotated with 2D road structure annotations.
(210) Fast data annotation software allows a 3D model of the path of the ego vehicle to be reconstructed, from which the path of the road can be inferred. The basic insight is that the camera vehicle nearly always follows a lane, so the vehicle trajectory implies a likely lane path in 3D space. This allows a set of parallel lanes of a road to be annotated very efficiently, since lane structures can be automatically generated that already follow the road's shape.
(211) In some implementations, a degree of manual annotation inputs are provided via a user interface (UI) in respect of a small number of 2D images. These are used, together with the 3D road model, to extrapolate those inputs to other images automatically.
(212) Structure of the road, such as individual lanes, is also modelled. Lanes can be added to the model efficiently via the UI, on the assumption that lanes run parallel to the ego vehicle path VP.
(213) The reconstructed vehicle path VP is used to determine a 3D road model, on the assumption that the shape of the reconstructed vehicle path corresponds to the shape of a road and/or lane (referred to generally as road shape) along which the vehicle is travelling.
(214) Annotating Moving Objects
(215) The functionality of the above image processing system can be extended in the present context to provide efficient annotation of other vehicles moving on the same road. Those images can then be used to train an object detector for example. The process is not limited to vehicles and can be applied to any object which can be assumed to move in a way that follows the shape of the road, such as pedestrians walking along a pavement beside the ego road.
(216) In addition to understanding the lanes of the road, an autonomous vehicle also needs to recognise other road users, to avoid collisions. Training data for this task can be generated by annotating other vehicles, cyclists and pedestrians in video taken from the car.
(217) Annotating a static object such as a parked car, as in the
(218) Building on the insight that the path of the ego vehicle implies the path of the road, this is now reversed, to build in the assumption that that the inferred path of the road is a good prediction of the likely path of other vehicles. Once an annotator has annotated a moving vehicle at a single point in time, they can mark it as ‘oncoming’ or ‘ahead’, and the system then animates it along the road trajectory at a constant speed. To correct the speed, the animator moves to an earlier or later frame, and then repositions the annotation box to coincide with the position of the target vehicle at that point in time. This then yields an average speed between the two points; where the target vehicle accelerates or decelerates significantly while in view, further positions can be marked. Small lateral deviations, e.g. where the target vehicle driver took a slightly different line through a section of road, can similarly be annotated by slightly repositioning the annotation, and the system will interpolate between the different given offsets along the line of the road.
(219) For many common cases of leading and oncoming traffic, this system makes it quick and easy to annotate other vehicles accurately.
(220)
(221) At step 1, a 3D road structure model is determined for a time sequence S of captured images using the above image processing methods. As indicated, the road is modelled as a 2D manifold (surface) in 3D space. This is based on a 3D reconstruction of the ego vehicle path VP. The processing also estimates a forward direction f (the direction in which the ego vehicle is travelling at that point) and a road surface normal n (perpendicular to the road surface—vertical direction herein) at different points along the reconstructed vehicle path VP. These define a direction r=f×n perpendicular to the forward direction f and road surface normal n (the lateral direction).
(222)
(223) At step 2, at least one of the images is manually annotated to mark a location of a moving object in the image.
(224) In the example of
(225) Under the assumption that the moving object travels along a path OP that lies parallel to the reconstructed ego vehicle path VP, it becomes possible to estimate the moving object path OP from only the manually-annotated hounding box B1 and the reconstructed ego vehicle path VP (step 3).
(226) This can be formulated as an assumption that the path OP of moving object maintains a fixed lateral offset (i.e. in the direction of r) and a fixed vertical offset (i.e. in the direction of the road surface normal n) from the ego vehicle path VP (elevation from road surface).
(227) In the example of
(228) As will be appreciated, the lower bounding box corners are just one example of suitable reference points at road height, and other suitable reference points may be used instead. For example, the locations of the upper corners of the bounding box B1 of IMG1 may be assumed to lie vertically above C1 and C2. In general, the manually annotated bounding box B1 can be mapped from the 2D image plane of IMG1 to any suitable representation in 3D space by exploiting the geometry of the 3D road model.
(229) As another example, another way of establishing the initial location in 3D space is as follows. The animator starts with a 2D annotation, which is projected into 3D space to create a 3D annotation element representing the moving object, which is a cuboid in 3D space in this example (3D bounding box) but which can take different geometric forms. This is illustrated in
(230) Alternatively, the 3D annotation element can be placed at multiple locations in 3D space, and projected back into the image plane of a first frame.
(231) The cuboid 800 is located in 3D space at an initial location under the assumption that 3D element is at a predetermined elevation from the road surface. For example, it may be assumed that the four lowest corners of the cuboid have zero separation from a defined road surface in the direction of the road surface normal n. The road surface is defined as lying flat in the lateral direction (r) at every point along the reconstructed vehicle path VP (although it is not assumed to lie flat generally—in the forward direction f it is defined as following the shape of the vehicle path VP). The annotator then provides manual annotation inputs, via the UI 412, in response to which the cuboid may be re-located, but maintaining this fixed elevation to the road surface (fixed vertical elevation from the vehicle path VP). The cuboid is projected back into the plane of the current image IMG1, so the annotator can see when it is correctly placed. By imposing the geometric restriction of a fixed elevation from the road surface, the annotation element can be accurately placed in 3D space using only a 2D view. The annotator is also able to edit the size, shape etc. of the annotation element in 3D space to match it to the 2D image manually.
(232) For a moving vehicle, for example, the assumption may be that the moving vehicle sits on the road surface at all times as it moves along the path, e.g. that one or more predetermined reference points of the object annotation element (e.g. the four bottom corners of a cuboid) have a zero or substantially zero vertical separation from the road surface.
(233) Having determined a representation of the bounding box in 3D space for IMG1, this can then be “animated” for further images (e.g. IMG2 in
(234) At step 4, the path information determined at step 3 is used to automatically annotate further images in the sequence. In order to annotate a further image (e.g. IMG2 or IMG3), it is assumed the reference points C1 and C2 have moved a certain distance along paths OP1 and OP2 respectively, relative to their initial locations that are known from the manual annotation of IMG1. This provides the locations of those reference points C2, C3 relative to the capture location of the further image, which in turn allows hounding boxes (e.g. B2 or B3 for IMG2 and IMG3 in
(235) Following the example of
(236) In the alternative example described above, where the cuboid is placed in 3D space on the assumption of a fixed elevation from the road surface, a single expected path for the cuboid can be defined in 3D space in exactly the same way, relative to a path reference point (e.g. centre point, corner etc.) of the cuboid. This path reference point is moved along the expected 3D path in the same manner, to determine the new location of the cuboid. The expected path is determined on the assumption that (i) it follows the expected shape of the road (as derived from the vehicle path VP), and (ii) the predetermined elevation from the road surface is maintained (e.g. the four lowest corners stay at road height at all times, or that the applicable reference point(s) maintains a predetermined elevation from the road surface). As will be appreciated, this operates on the same underlying principles, and all description herein pertaining to C1 or C2 on OP1 and OP2 applies equally to a reference point, as defined with respect to a 3D annotation element such as a cuboid established, and 3D path thereof. In that event, the further annotation data is automatically generated by geometrically projecting the cuboid into the image plane of e.g. IMG2 or IMG3, once it has been moved to the relevant expected location using the above assumptions.
(237) In the event that only a single image is manually annotated, it is assumed that the other vehicle is moving at the same speed of the ego vehicle. Hence, in this case, when annotating a further image (e.g. IMG2 or IMG3), if the ego vehicle has moved a distance D.sub.V along the ego vehicle path VP relative to the capture location of IMG1, it is assumed that the other vehicle has also moved a distance D.sub.V along its path, and that the reference points C1 and C2 have therefore moved a distance D.sub.V along paths OP1 and OP2 respectively.
(238) When at least two images in the sequence S are manually annotated, this allows the speed of the other vehicle to be estimated, a speed estimation component 422 of the object annotation component 420. This can be a straightforward linear extrapolation, wherein if the other vehicle is determined to have moved a distance D.sub.0 between the two manually annotated images two images captured at time T apart, then the reference points C1, C2 can be assumed to have travelled a distance
(239)
along OP1 and OP2 respectively between two images captured time T′ apart.
(240) This can be refined via the UI 412. For example, when a user first annotates an image with an object bounding box, the system will initially estimate the other vehicle's speed as matching the ego vehicle's speed.
(241) When the user moves to the next (or a later) image in the sequence, that image will be automatically annotated on the assumption that the other vehicle is travelling at the same speed as the vehicle. If this looks correct, the user can simply keep moving though the sequence. However, if the annotation is incorrect, the user can manually adjust it. In so doing, the user has now accurately annotated two images, which in turn allows the system to refine the other vehicle speed estimate. When the user moved on again, the next image is annotated automatically using the refined speed estimate, and will therefore likely be of acceptable accuracy (unless the other vehicle's speed has changed significantly).
(242) In any event, knowledge of the road layout that is known from the 3D road model can be used to infer the direction of travel. For example, where the other vehicle is determined to be in a lane that is marked as oncoming traffic, it can be assumed to be travelling in the opposite direction to the ego vehicle.
(243) As another example, the 3D annotation element could be 3D model of the moving object (non-cuboidal and more accurate than a 3D bounding box). A benefit of a 3D model is that, when projected back into the image place, it can provide more accurate 2D annotation data, such as a more tightly fitted 3D bounding box. A 3D model can also be used to generate 2D annotation data in the form of a segmentation mask, where the aim is to essentially trace the outline of the object in the image plane. This can be used for instance segmentation training, for example.
(244) Validation Images
(245) Another extension to the above stems from the realization that where objects are located in relation to the surrounding road structure provides a useful layer of information for the purpose of validating a trained object detector. Validation is a process of testing that a trained model can perform with acceptable accuracy on images it as not encountered during training, and is hence a structured test of the model's ability to generalize.
(246) In the context of autonomous driving, there are particular circumstances in which accurate object detection is critical, and circumstances in which object detection, whilst potentially useful, is not critical. A simple example is that it is critical for an AV to be able to accurately detect and localize other vehicles on the road, but less critical for it to detect parked vehicles individually at the side of the road.
(247) As indicated, as part of the above image processing system, a road model is created with detailed road structure, which may include for example individual lanes, parking areas to the side of a road, non-drivable areas (pavements, bus lanes etc.). When object annotation is performed using that model as a basis, as described above, a consequence is that it is straightforward to infer, for any given image, where an annotated object is in relation to the road structure—for example, whether it is in the ego lane (the lane in which the ego vehicle is travelling), or a different lane, or in a parking area etc.
(248) This in turn allows the images to be tagged or otherwise categorized with such information, i.e. tags or other categorization data can be associated with the image to provide information about what objects in contains and, importantly, how those objects relate to surrounding road structure. This in turn allows specific types of images to be located for the purpose of validation. In particular, images which capture a context in which accurate object detection is critical, because of the way in which other vehicles are located relative to the surrounding road structure, can be identified and used for the purposes of validation to ensure the object detection model is able to achieve acceptable results on such critical images.
(249) User Interface Extensions
(250) A number of user interface features are also provided to facilitate fast annotation of both static and moving objects. These will now be described.
(251) Whilst the above image processing considers 2D images only, albeit annotated using a 3D road model, the present techniques can be extended to 3D structure data. For example, 3D structure data may be derived from stereo image pairs, LiDAR, RADAR etc. or a combination of multiple such sensor modalities.
(252) In the context of the image processing examples described above, frames took the form of 2D images. With the extensions to 3D structure data, the term frame also encompasses 3D frames, and the steps of
(253) In this 3D context, a 3D frame can be any captured 3D structure representation, i.e. comprising captured points which define structure in 3D space (3D structure points), and which provide a static “snapshot” of 3D structure captured in that frame (i.e. a static 3D scene). The frame may be said to correspond to a single time instant, but does not necessarily imply that the frame or the underlying sensor data from which it is derived need to have been captured instantaneously—for example, LiDAR measurements may be captured by a mobile object over a short interval (e.g. around 100 ms), in a LiDAR sweep, and “untwisted”, to account for any motion of the mobile object, to form a single point cloud. In that event, the single point cloud may still be said to correspond to a single time instant, in the sense of providing a meaningful static snapshot, as a consequence of that untwisting, notwithstanding the manner in which the underlying sensor data was captured. In the context of a time sequence of frames, the time instant to which each frame corresponds is a time index (timestamp) of that frame within the time sequence (and each frame in the time sequence corresponds to a different time instant).
(254) In the following examples, each frame is in the form of an RGBD (Red Green Blue Depth) image captured at a particular time instant. An RGBD image has four channels, three of which (RGB) are colour channels (colour component) encoding a “regular” image, and the fourth of which is a depth channel (depth component) encoding depth values for at least some pixels of the image. RGB is referred to by way of example however the description applies more generally to any image having colour and depth components (or, indeed, to images having only depth components). In general, the colour component of an image can be encoded in any appropriate colour space using one or more colour channels (including grayscale/monochrome). The point cloud computation component 302 converts each frame to point cloud form to allow that frame to be annotated in 3D space. More generally, a frame corresponds to a particular time instant and may refer to any set of data in which a static “snapshot” structure, i.e. a static 3D scene, has been captured for that time instant (such as multiple RGBD images, one or more point clouds etc.). Hence, all description pertaining to RGBD images in the following applies equally to other forms of frame. Where the frames are received at the annotation system 300 in point cloud form, the point cloud conversion is unnecessary. Although the following examples are described with reference to point clouds derived from RGBD images, the annotation system can be applied to any modality of point cloud, such as monocular depth, stereo depth, LiDAR, radar etc. A point cloud can also be derived two or more such sense modalities and/or from multiple sensor components of the same or different modalities, by merging the outputs of different sensors. Hence, the term “point cloud of a frame” can refer to any form of point cloud corresponding to a particular time instant, including a frame received at the annotation computer system 300 in point cloud form, a point cloud derived from a frame (e.g. in the form of one or more RGBD images) by the point cloud computation component 302, or a merged point cloud.
(255) As noted, although a frame corresponds to a particular time instant, the underlying data from which the fame is derived may be captured over a (typically short) time interval, and transformed as necessary to account for the passage of time. So the fact that a frame corresponds to a particular time instant (e.g. denoted by a timestamp) does not necessarily imply the underlying data has all been captured simultaneously. Hence, the term frame encompasses point clouds received at time stamps different to the frame e.g. a lidar sweep that is captured over 100 ms is ‘untwisted’ into a single point cloud for a particular time instant (such as the time that the image was captured). The time series of frames 301 may also be referred to as a video segment (noting that the frames of the video segment need not be images and may for example be point clouds).
(256)
(257)
(258) Within the annotation interface 700, the colour component of an RGBD image 702 (current frame) is displayed on the left-hand side. On the right-hand side, a top-down view 704 of the point cloud 400 of that frame is displayed.
(259) In addition, a projection 706a of the 3D road model into the image plane of the RGBD image is overlaid on the displayed image 702. Likewise, a projection 706b of the 3D road model into the top-down view is displayed overlaid on the top-down view of the point cloud 400.
(260) A selectable option 708 is provided for creating a new 3D bounding box for the current frame. Once created, selectable options 710 and 712 are provided for moving and re-sizing the bounding box respectively.
(261) The options 710 for moving the bounding box include options for moving the bounding box longitudinally along the road in either direction (±R, as shown in the top-down view on the right-hand side), and laterally across the road the road (±L).
(262) The options 712 for re-sizing the bounding box include options for changing the width (w), height (h) and length (l) of the bounding box.
(263) Although depicted as displayed UI elements, the associated inputs could alternatively be provided using keyboard shortcuts, gestures etc.
(264) An example workflow for placing a 3D annotation object will now be described. As will be appreciated, this is just one example of the way in which the annotator can utilize the annotation functions of the annotation interface 700.
(265)
(266) As illustrated in
(267) As illustrated in
(268) As illustrated in
(269) The above example assumes that the bounding box 800 remains bound to the 3D road model as it is adjusted. Although not depicted, the annotation interface may also allow “free” adjustments, which are not constrained by the 3D road model, i.e. the annotator may also be able to freely move or rotate the bounding box 800 as needed. This may be useful for example when annotating vehicles whose behaviour deviates at times from the assumed behaviour (e.g. during a turn or lane change).
(270) Having placed 3D bounding boxes in this manner for at least one moving object, steps 3 to 4 of the method of
(271) Note that, in this context, the desired 3D annotation data could be 3D annotation data. That is, 3D annotation data in this context is not only used to determine 2D annotation data for the moving object for training a 2D machine learning perception component, but as an alternative, or in addition, 3D annotation data may be used to train a machine learning component to interpret 3D structure data.
(272) As noted, the 3D annotation element 800 could alternatively take the form of a 3D model. With 3D frames, the 3D model can be derived from one or more of the 3D frames themselves, for example by selectively extracting points from the 3D frame(s) belonging to the 3D model.
(273) By way of example reference is made to United Kingdom Patent Application Nos. 1910382.9, 1910395.1, 1910390.2 and 1910392.8, each of which is incorporated herein by reference in its entirety. These disclose techniques of object modelling based on 3D frames, which can be applied in this context. A 3D bounding box can be placed around an object in one or more 3D frames (e.g. manually), and a subset of points can then be extracted from with the 3D bounding box in the/each frame, to build a 3D model of the object, which can then be applied in other frame(s). That 3D model can be placed in that other frame(s) based on the assumed motion of the object along the road.
(274) Alternative Road Modelling Methods
(275) In the above, the road modelling component 404 applies “structure from motion” (SfM) processing which is applied to the series of 2D images in order to reconstruct the 3D path of the vehicle VP which captured the images (ego path). This, in turn, is used as a basis for extrapolating the 3D surface of the road along which the vehicle travelled. Moving objects can the be assumed to at least approximately follow the same road surface. This is based on 2D feature matching between the images of a video sequence (segment).
(276) The road model may also be determined in alternative ways e.g. point cloud fitting e.g. the ego path could be based on 3D structure matching applied to the depth maps or point clouds, and/or using high accuracy satellite positioning (e.g. GPS). Alternatively, an existing road model may be loaded and frames may be localized, as needed, inside the existing road model.
(277) More generally, examples of technologies which may be used to reconstruct the ego vehicle path VP include accelerometers/IMUs (internal measurement units—where the path may be reconstructed from internal sensor data), visual-odometry, LIDAR-odometry, RADAR-odometry, wheel encoders etc.
(278) The aforementioned reference uses the 3D road model extrapolated from the vehicle's own path to efficiently generate 2D annotation data for annotating the structure of the road in the original images. In the present context, this is extended to allow a 3D bounding box to be placed efficiently around other objects on the road across multiple frames in a video segment, such as other vehicles, cyclists etc., by assuming that other road users generally follow the shape of the road over time.
REFERENCES
(279) 5. Brostow, G. J., Fauqueur, J., Cipolla, R.: Semantic object classes in video: A high-definition ground truth database. Pattern Recognition Letters 30(2) (2009) 88-97 6. Cordts, M., Omran, M., Ramos, S., Rehfeld, T., Enzweiler, M., Benenson, R., Pranke, U., Roth, S., Schiele, B.: The cityscapes dataset for semantic urban scene understanding. CVPR (2016) 7. Neuhold, G., Ollmann, T., Bulo, S. R., Kontschieder, P.: The mapillary vistas dataset for semantic understanding of street scenes. In: Proceedings of the International Conference on Computer Vision (ICCV), Venice, Italy. (2017) 22-29 14. Brostow, G. J., Shotton, J., Fauqueur, J., Cipolla, R.: Segmentation and recognition using structure from motion point clouds. In: European conference on computer vision, Springer (2008) 44-57 15. Sengupta, S., Sturgess, P., Torr, P. H. S., Others: Automatic dense visual semantic mapping from street-level imagery. In: Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, IEEE (2012) 857-862 16. Scharwachter, T., Enzweiler, M., Franke, U., Roth, S.: Efficient multi-cue scene segmentation. In: German Conference on Pattern Recognition, Springer (2013) 17. Fritsch, J., Kuehnl, T., Geiger, A.: A new performance measure and evaluation benchmark for road detection algorithms. In: 16th International IEEE Conference on Intelligent Transportation Systems (ITSC 2013), IEEE (2013) 1693-1700 18. Aly, M.: Real time detection of lane markers in urban streets. In: IEEE Intelligent 675 676 Vehicles Symposium, Proceedings, IEEE (2008) 7-12 19. TuSimple: Lane Detection Challenge (Dataset). http://benchmark.tusimple.ai (2017) 27. Barnes, D., Maddern, W., Posner, I.: Find Your Own Way: Weakly-Supervised Segmentation of Path Proposals for Urban Autonomy. ICRA (2017) 28. Mapillary: OpenSfM (Software). https://github.com/mapillary/OpenSfM (2014) 29. Badrinarayanan, V., Kendall, A., Cipolla, R.: Segnet: A deep convolu-f)” tional encoder-decoder architecture for image segmentation. arXiv preprint arXiv:1511.00561 (2015) 32. He, K., Gkioxari, G., Dollar, P., Girshick, R. B.: Mask R-CNN. CoRR abs/1703.06870 (2017) 33. Brabandere, B. D., Neven, D., Gool, L. V.: Semantic instance segmentation with a aki discriminative loss function. CoRR abs/1708.02551 (2017) 34. Li, S., Seybold, B., Vorobyov, A., Fathi, A., Huang, Q., Kuo, C. C. J.: Instance embedding transfer to unsupervised video object segmentation (2018) 35. Fathi, A., Wojna, Z., Rathod, V., Wang, P., Song, H. O., Guadarrama, S., Murphy, K. P.: Semantic instance segmentation via deep metric learning. CoRR 713 abs/1703.10277 (2017) 36. Kong, S., Fowlkes, O: Recurrent pixel embedding for instance grouping (2017) 37. Comaniciu, D., Meer, P.: Mean shift: A robust approach toward feature space analysis. IEEE Trans. Pattern Anal. Mach. Intell. 24(5) (May 2002) 603-61
(280) TABLE-US-00001 ANNEX A Algorithm 1 Automated ego-lane estimation 1: Measure height of the camera above road h 2: Apply OpenSFM to get c.sub.i, R.sub.i 3: Estimate road normal n according Eq. (3) 4: Estimate forward direction f according Eq. (5) 5: Derive vector across road r according Eq. (4) 6: