Methods for creating training data for determining vehicle following distance
Systems, methods, models, and training data for models are discussed, for determining vehicle positioning, and in particular identifying tailgating. Simulated training images showing vehicles following other vehicles, under various conditions, are generated using a virtual environment. Models are trained to determine following distance between two vehicles. Trained models are used to in detection of tailgating, based on determined distance between two vehicles. Results of tailgating are output to warn a driver, or to provide a report on driver behavior.
1 . A method for creating training data for training an artificial intelligence to predict a distance between two vehicles, the method comprising:
for each instance in a first plurality of instances:
accessing respective parameter data, the respective parameter data indicating at least a first position of a first virtual vehicle and a second position of a virtual camera, the first position and the second position specific to the instance, the virtual camera representing a perspective from a second virtual vehicle positioned behind the first virtual vehicle, facing towards the first virtual vehicle;
simulating, by at least one processor in a spatial virtual environment, the first virtual vehicle at the first position and the virtual camera at the second position;
rendering, by the at least one processor based on the spatial virtual environment as simulated, at least one image for the instance from the perspective represented by the virtual camera; and
outputting the at least one image for the instance, associated with a label indicative of a distance between the first virtual vehicle and the second virtual vehicle; and
storing, by at least one non-transitory processor-readable storage medium, a first plurality of images including each at least one image output for each instance of the plurality of instances associated with the respective label indicating distance between the first virtual vehicle and the second virtual vehicle for the respective instance.
2 . The method of claim 1 , wherein for each instance in the first plurality of instances:
the respective parameter data further indicates the distance between the first virtual vehicle and the second virtual vehicle; and
the label indicative of the distance between the first virtual vehicle and the second virtual vehicle indicates the distance between the first virtual vehicle and the second virtual vehicle as included in the respective parameter data.
3 . The method of claim 1 , further comprising, for each instance in the first plurality of instances:
determining, by the at least one processor, the distance between the first virtual vehicle and the second virtual vehicle by determining a difference between the first position and the second position.
4 . The method of claim 1 , wherein for each instance in the first plurality of instances, accessing the respective parameter data comprises receiving the respective parameter data as user input via a user input device.
5 . The method of claim 1 , wherein for each instance in the first plurality of instances, accessing the respective parameter data comprises autonomously generating, by the at least one processor, the respective parameter data.
6 . The method of claim 1 wherein, for each instance in the first plurality of instances, outputting the at least one image for the instance comprises outputting the at least one image for the instance associated with a distance label indicative of a distance between the first virtual vehicle and the second virtual vehicle and associated with a vehicle presence label indicative of whether the first virtual vehicle is within a vehicle presence threshold of the second virtual vehicle.
7 . The method of claim 6 , further comprising, for each instance in the first plurality of instances:
generating, by the at least one processor, the vehicle presence label indicative of whether the first virtual vehicle is within a vehicle presence threshold of the second virtual vehicle, based on relative positions of the first virtual vehicle and the second virtual vehicle.
8 . The method of claim 1 , wherein for each instance in the first plurality of instances:
the respective parameter data further indicates a resolution for the virtual camera; and
rendering, by the at least one processor based on the spatial virtual environment as simulated, at least one image for the instance from the perspective represented by the virtual camera comprises rendering the at least one image for the instance at the resolution for the virtual camera.
9 . The method of claim 1 , wherein for each instance in the first plurality of instances, the respective parameter data further indicates at least one parameter selected from a group of parameters consisting of:
type of the first virtual vehicle;
type of the second virtual vehicle;
dimensions of the first virtual vehicle;
dimensions of the second virtual vehicle;
properties of the first virtual vehicle;
properties of the second virtual vehicle;
position and orientation of the virtual camera relative to the second virtual vehicle;
lens attributes of the virtual camera;
weather conditions;
lighting conditions;
time of day; and
date.
10 . The method of claim 1 , further comprising:
selecting a subset of instances from the first plurality of instances;
for each instance in the subset of instances:
autonomously applying a distortion effect to the at least one image output for the instance.
11 . The method of claim 10 , wherein the distortion effect includes at least one distortion effect selected from a group of distortion effects comprising:
image compression loss;
pixel value distribution;
adversarial effect;
image noise;
image saturation; and
image blur.
12 . The method of claim 1 , further comprising:
selecting a subset of instances from the first plurality of instances;
for each instance in the subset of instances:
autonomously applying an environmental effect to the at least one image output for the instance.
13 . The method of claim 12 , wherein the environmental effect includes at least one environmental effect selected from a group of environmental effects comprising:
rain;
snow; and
fog.
14 . The method of claim 1 , wherein for each instance in the first plurality of instances, rendering, by the at least one processor based on the spatial virtual environment as simulated, at least one image for the instance from the perspective represented by the virtual camera comprises:
rendering, by the at least one processor based on the spatial virtual environment, a single image for the instance from the perspective represented by the virtual camera.
15 . The method of claim 1 , wherein for each instance in the first plurality of instances, rendering, by the at least one processor based on the spatial virtual environment, at least one image for the instance from the perspective represented by the virtual camera comprises:
rendering, by the at least one processor based on the spatial virtual environment, a plurality of images for the instance from the perspective represented by the virtual camera, each image of the plurality of images for the instance representing a respective moment in time.
16 . The method of claim 15 , wherein for each instance in the first plurality of instances, simulating, by the at least one processor in the spatial virtual environment, the first virtual vehicle at the first position and the virtual camera at the second position comprises:
simulating, by the at least one processor in the spatial virtual environment, movement of the first virtual vehicle and movement of the virtual camera over each respective moment in time represented by the plurality of images for the instance.
17 . The method of claim 1 , wherein for each instance in the first plurality of instances, the first position of the first virtual vehicle indicates a longitudinal position and lateral position of the first virtual vehicle.
18 . The method of claim 1 , wherein for each instance in the first plurality of instances, the second position of the virtual camera indicates a longitudinal position and a lateral position of the virtual camera within a road lane and a height of the virtual camera.
19 . A method for creating training data for training an artificial intelligence to predict a distance between two vehicles, the method comprising:
for each instance in a first plurality of instances:
accessing respective parameter data, the respective parameter data indicating at least a first position of a first vehicle and a second position of a virtual camera, the first position and the second position specific to the instance, the virtual camera representing a perspective from a second vehicle positioned behind the first vehicle, facing towards the first vehicle;
simulating, by at least one processor in a virtual environment, the first vehicle at the first position and the virtual camera at the second position;
rendering, by the at least one processor in the virtual environment, at least one image for the instance from the perspective represented by the virtual camera; and
outputting the at least one image for the instance, associated with a label indicative of a distance between the first vehicle and the second vehicle;
storing, by at least one non-transitory processor-readable storage medium, a first plurality of images including each at least one image output for each instance of the plurality of instances associated with the respective label indicating distance between the first vehicle and the second vehicle for the respective instance;
for each instance in a second plurality of instances:
accessing respective parameter data, the respective parameter data indicating at least a third position of a virtual camera representing a perspective from a third vehicle;
simulating, by the at least one processor in the virtual environment, the virtual camera at the third position;
rendering, by the at least one processor in the virtual environment, at least one image for the instance from a perspective represented by the virtual camera at the third position; and
outputting the at least one image for the instance, associated with a label indicative of a distance between two vehicles which is a null value; and
storing, by the at least one non-transitory processor-readable storage medium, a second plurality of images including each at least one image output for each instance of the second plurality of instances associated with the respective label indicating a distance between two vehicles which is a null value.
20 . A method for creating training data for training an artificial intelligence to predict a distance between two vehicles, the method comprising:
for each instance in a first plurality of instances:
accessing respective parameter data, the respective parameter data indicating at least a first position of a first vehicle and a second position of a virtual camera, the first position and the second position specific to the instance, the virtual camera representing a perspective from a second vehicle positioned behind the first vehicle, facing towards the first vehicle;
simulating, by at least one processor in a virtual environment, the first vehicle at the first position and the virtual camera at the second position;
rendering, by the at least one processor in the virtual environment, at least one image for the instance from the perspective represented by the virtual camera; and
outputting the at least one image for the instance, associated with a label indicative of a distance between the first vehicle and the second vehicle; and
storing, by at least one non-transitory processor-readable storage medium, a first plurality of images including each at least one image output for each instance of the plurality of instances associated with the respective label indicating distance between the first vehicle and the second vehicle for the respective instance;
wherein for each instance in the first plurality of instances, accessing the respective parameter data comprises autonomously generating, by the at least one processor, the respective parameter data; and
wherein for each instance in the first plurality of instances, autonomously generating the respective parameter data comprises: autonomously determining random values for the first position and the second position, within a defined distance threshold.