Method, electronic device and medium for target state estimation
The present disclosure relates to a method for target state estimation comprising: acquiring a data frame sequence corresponding to a plurality of moments; determining a first time window based on the data frame sequence, the first time window comprising a first set of state variables to be optimized; determining a plurality of second time windows within the first time window, wherein the number of data frames in each second time window is less than the number of data frames in the first time window, there is a repeated data frame in two adjacent second time windows, and there is a second set of state variables to be optimized; and optimizing the second set of state variables in the plurality of second time windows to obtain an optimized first set of state variables. The method of the present disclosure may obtain sufficiently accurate state estimation.
1 . A method for state estimation of a target, comprising:
acquiring a data frame sequence corresponding to a plurality of moments;
determining a first time window based on the data frame sequence, the first time window comprising a first set of state variables to be optimized;
determining a plurality of second time windows within the first time window, wherein the number of data frames corresponding to each second time window is less than the number of data frames corresponding to the first time window, there is at least one same data frame in two adjacent second time windows, and there is a second set of state variables to be optimized in each second time window;
optimizing the second set of state variables in the plurality of second time windows to optimize the first set of state variables; and
causing an autonomous vehicle to travel according to a path planned based on the optimized first set of state variables,
wherein:
the optimizing the second set of state variables comprises minimizing a loss function;
the loss function comprises a smoothing loss of the second set of state variables, a velocity loss associated with a velocity of the target, or an orientation loss associated with an orientation of the target;
the smoothing loss is calculated from the second set of state variable of the target at each moment in each second time window and an average value of the second set of state variables of the target in each second time window;
the velocity loss comprises a velocity smoothing loss calculated from a velocity state variable of the target at each moment in a respective second time window, and an average velocity state variable of the target in the respective second time window; and
the orientation loss comprises an orientation smoothing loss calculated from an orientation state variable of the target at each moment in a respective second time window, and
an average orientation state variable of the target in the respective second time window;
the loss function further comprises a position loss associated with a position of the target or a size loss associated with a size of the target;
the position loss comprises at least one reference point residual;
the reference point residual comprises at least one of: a center point residual or a contour corner point residual;
the size loss comprises at least one of: the size prior loss or an optimized size accumulating loss at each moment;
the size prior loss comprises a residual between a size variable of the target at each present moment and a size variable of the target that has been optimized in a state variable optimization process performed for the previous first time window; and
the size accumulating loss comprises a sum of the size losses of the target from an initial moment to a last optimized moment.
2 . The method according to claim 1 , wherein
the first set of state variables comprises at least one of:
at least one of a velocity, a position, an orientation, or a size of the target at each moment in the first time window; and
at least one of an average velocity, an average position, or an average orientation of the target in the first time window; or
the second set of state variables comprises at least one of:
at least one of a velocity, a position, an orientation, or a size of the target at each moment in the second time window; and
at least one of an average velocity, an average position, or an average orientation of the target in the second time window.
3 . The method according to claim 1 , wherein
the velocity smoothing loss is further calculated from a velocity state variable of the target at each moment in the first time window, and an average velocity state variable of the target in the first time window.
4 . The method according to claim 1 , wherein
the orientation smoothing loss is further calculated from an orientation state variable of the target at each moment in the first time window and an average orientation state variable of the target in the first time window.
5 . The method according to claim 2 , wherein the target is a vehicle comprising a first component and at least one second component rotatable about the first component;
the location of the target comprises at least one of: a position of the first component, a position of each of the at least one second component, or a position of the vehicle;
the size of the target comprises at least one of: a size of the first component, a size of each of the at least one second component, or a size of the vehicle; and
the orientation of the target comprises at least one of: an orientation of the velocity, an orientation of the first component, or an orientation of a lane in which the vehicle is located.
6 . The method according to claim 5 , wherein
the orientation loss further comprises an orientation residual comprising a first component orientation residual or a second component orientation residual, or an angular velocity constraint; wherein
the first component orientation residual is calculated from an orientation state variable of the first component at each moment in the first time window and an orientation observation variable of the first component at each moment in the first time window; and
the second component orientation residual is calculated from an orientation state variable of the second component at each moment in the first time window and an orientation observation variable of the second component at each moment in the first time window; and
the angular velocity constraint calculated from: a velocity state variable of the vehicle at each moment within the first time window, a length of the second component within the first time window, a length of a hinge between the first component and the second component within the first time window, an orientation state variable of the first component at each moment within the first time window, and an orientation state variable of the second component at each moment within the first time window.
7 . An electronic device, comprising:
at least one processor; and
a memory communicatively connected to the at least one processor; wherein
the memory stores an instruction executable by the at least one processor, and the instruction is executed by the at least one processor to enable the at least one processor to execute a method for state estimation of a target comprising:
acquiring a data frame sequence corresponding to a plurality of moments;
determining a first time window based on the data frame sequence, the first time window comprising a first set of state variables to be optimized;
determining a plurality of second time windows within the first time window, wherein the number of data frames in each second time window is less than the number of data frames in the first time window, there is a repeated data frame in two adjacent second time windows, and there is a second set of state variables to be optimized in each second time window;
optimizing the second set of state variables in the plurality of second time windows to obtain an optimized first set of state variables; and
causing an autonomous vehicle to travel according to a path planned based on the optimized first set of state variables,
the target is a vehicle comprising a first component and at least one second component rotatable about the first component;
the optimizing the second set of state variables comprises minimizing a loss function;
the loss function comprises an orientation loss associated with the orientation of the target;
the orientation loss comprises an orientation residual comprising a first component orientation residual or a second component orientation residual, or an angular velocity constraint;
the first component orientation residual is calculated from an orientation state variable of the first component at each moment in the first time window and an orientation observation variable of the first component at each moment in the first time window;
the second component orientation residual is calculated from an orientation state variable of the second component at each moment in the first time window and an orientation observation variable of the second component at each moment in the first time window; and
the angular velocity constraint calculated from: a velocity state variable of the vehicle at each moment within the first time window, a length of the second component within the first time window, a length of a hinge between the first component and the second component within the first time window, an orientation state variable of the first component at each moment within the first time window, and an orientation state variable of the second component at each moment within the first time window.
8 . A non-transitory computer-readable storage medium storing a computer instruction, wherein the computer instruction is used for causing a computer to execute a method for state estimation of a target comprising:
acquiring a data frame sequence corresponding to a plurality of moments;
determining a first time window based on the data frame sequence, the first time window comprising a first set of state variables to be optimized;
determining a plurality of second time windows within the first time window, wherein the number of data frames in each second time window is less than the number of data frames in the first time window, there is a repeated data frame in two adjacent second time windows, and there is a second set of state variables to be optimized in each second time window;
optimizing the second set of state variables in the plurality of second time windows to obtain an optimized first set of state variables; and
causing an autonomous vehicle to travel according to a path planned based on the optimized first set of state variables,
wherein:
the optimizing the second set of state variables comprises minimizing a loss function;
the loss function comprises a smoothing loss of the second set of state variables, a velocity loss associated with a velocity of the target, or an orientation loss associated with an orientation of the target;
the smoothing loss is calculated from the second set of state variable of the target at each moment in each second time window and an average value of the second set of state variables of the target in each second time window;
the velocity loss comprises a velocity smoothing loss calculated from a velocity state variable of the target at each moment in a respective second time window, and an average velocity state variable of the target in the respective second time window; and
the orientation loss comprises an orientation smoothing loss calculated from an orientation state variable of the target at each moment in a respective second time window, and an average orientation state variable of the target in the respective second time window;
the loss function further comprises a position loss associated with a position of the target or a size loss associated with a size of the target;
the position loss comprises at least one reference point residual;
the reference point residual comprises at least one of: a center point residual or a contour corner point residual;
the size loss comprises at least one of: the size prior loss or an optimized size accumulating loss at each moment;
the size prior loss comprises a residual between a size variable of the target at each present moment and a size variable of the target that has been optimized in a state variable optimization process performed for the previous first time window; and
the size accumulating loss comprises a sum of the size losses of the target from an initial moment to a last optimized moment.
9 . The medium according to claim 8 , wherein
the first set of state variables comprises at least one of:
at least one of a velocity, a position, an orientation, or a size of the target at each moment in the first time window; or
at least one of an average velocity, an average position, or an average orientation of the target in the first time window; and
the second set of state variables comprises at least one of:
at least one of a velocity, a position, an orientation, or a size of the target at each moment in the second time window; or
at least one of an average velocity, an average position, or an average orientation of the target in the second time window.
10 . The medium according to claim 8 , wherein
the velocity smoothing loss is further calculated from a velocity state variable of the target at each moment in the first time window, and an average velocity state variable of the target in the first time window.
11 . The medium according to claim 8 , wherein
the orientation smoothing loss is further calculated from an orientation state variable of the target at each moment in the first time window and an average orientation state variable of the target in the first time window.
12 . The medium according to claim 9 , wherein the target is a vehicle comprising
a first component and at least one second component rotatable about the first component;
the location of the target comprises at least one of: a position of the first component, a position of each of the at least one second component, or a position of the vehicle;
the size of the target comprises at least one of: a size of the first component, a size of each of the at least one second component, or a size of the vehicle; and
the orientation of the target comprises at least one of: an orientation of the velocity, an orientation of the first component, or an orientation of a lane in which the vehicle is located.
13 . The medium according to claim 12 , wherein
the orientation loss further comprises an orientation residual comprising a first component orientation residual or a second component orientation residual, or an angular velocity constraint; wherein
the first component orientation residual is calculated from an orientation state variable of the first component at each moment in the first time window and an orientation observation variable of the first component at each moment in the first time window; and
the second component orientation residual is calculated from an orientation state variable of the second component at each moment in the first time window and an orientation observation variable of the second component at each moment in the first time window; and
the angular velocity constraint calculated from: a velocity state variable of the truck at each moment within the first time window, a length of the second component within the first time window, a length of a hinge between the first component and the second component within the first time window, an orientation state variable of the first component at each moment within the first time window, and an orientation state variable of the second component at each moment within the first time window.
14 . The electronic device according to claim 7 , wherein the orientation of the target comprises at least one of: an orientation of the velocity, an orientation of the first component, or an orientation of a lane in which the vehicle is located.
15 . The electronic device according to claim 7 , wherein:
the orientation loss further comprises an orientation smoothing loss calculated from an orientation state variable of the target at each moment in a respective second time window, and an average orientation state variable of the target in the respective second time window; and
the orientation loss further comprises an orientation prior loss calculated from: an orientation state variable at each moment in an overlapped interval between the first time window and a previous first time window, and an optimized orientation state variable at each moment in the overlapped interval in a state variable optimization process performed for the previous first time window.
16 . The method according to claim 1 , wherein:
the velocity loss further comprises a velocity prior loss calculated from: a velocity state variable at each moment in an overlapped interval between a current first time window and a previous first time window, and an optimized velocity state variable at each moment in the overlapped interval in a state variable optimization process performed for the previous first time window;
the velocity loss further comprises a velocity residual calculated from a velocity observation variable of the target at each moment in the first time window and a velocity state variable of the target at each moment in the first time window.
17 . The method according to claim 1 , wherein:
the orientation loss further comprises an orientation prior loss calculated from: an orientation state variable at each moment in an overlapped interval between the first time window and a previous first time window, and an optimized orientation state variable at each moment in the overlapped interval in a state variable optimization process performed for the previous first time window.