A computer-implemented method for determining a set of dynamic objects based on sensor data acquired by a sensor mounted on a vehicle , the method being executable by an electronic device , the electronic device being communicatively coupled to the sensor for collection of the sensor data therefrom, the electronic device executing a first machine learning algorithm, MLA, having been trained for object detection based on the sensor data , the method comprising: receiving the sensor data representative of a surrounding area of the vehicle ; generating, by the first MLA, based on the sensor data , a set of feature vectors of the surrounding area ; receiving vehicle data indicative of a localization of the vehicle on a map; generating, by the first MLA, based on the set of feature vectors and the vehicle data , a tensor, the tensor including a grid representation of the surrounding area , wherein the tensor is a 3D tensor representation , and the generating the 3D tensor representation comprises generating a 4D tensor representation based on the set of feature vectors , and stacking features of the set of feature vectors in the 4D tensor representation to obtain the 3D tensor representation ; generating, by the first MLA, based on the tensor: a segmentation mask indicative of grid cells occupied by at least one potential object in the grid, and a velocity mask indicative of a velocity associated with the at least one potential object in the grid; and determining, by the first MLA, based on the segmentation mask and the velocity mask , the set of dynamic objects in the surrounding area of the vehicle , wherein the electronic device is configured to execute a second MLA, the second MLA being a recurrent neural network, RNN, the vehicle data includes a set of odometer parameters, and the method further comprises correcting, by the second MLA, the 3D tensor representation based on the set of odometer parameters to compensate for an ego-motion of the sensor to obtain a corrected 3D tensor representation . receiving the sensor data representative of a surrounding area of the vehicle ; generating, by the first MLA, based on the sensor data , a set of feature vectors of the surrounding area ; receiving vehicle data indicative of a localization of the vehicle on a map; generating, by the first MLA, based on the set of feature vectors and the vehicle data , a tensor, the tensor including a grid representation of the surrounding area , wherein the tensor is a 3D tensor representation , and the generating the 3D tensor representation comprises generating a 4D tensor representation based on the set of feature vectors , and stacking features of the set of feature vectors in the 4D tensor representation to obtain the 3D tensor representation ; generating, by the first MLA, based on the tensor: a segmentation mask indicative of grid cells occupied by at least one potential object in the grid, and a velocity mask indicative of a velocity associated with the at least one potential object in the grid; and a segmentation mask indicative of grid cells occupied by at least one potential object in the grid, and a velocity mask indicative of a velocity associated with the at least one potential object in the grid; and determining, by the first MLA, based on the segmentation mask and the velocity mask , the set of dynamic objects in the surrounding area of the vehicle , wherein the electronic device is configured to execute a second MLA, the second MLA being a recurrent neural network, RNN, the vehicle data includes a set of odometer parameters, and the method further comprises correcting, by the second MLA, the 3D tensor representation based on the set of odometer parameters to compensate for an ego-motion of the sensor to obtain a corrected 3D tensor representation . <EOS>