Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: [email protected]
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Publication

Lyft Motion Prediction for Autonomous Vehicles: 2020
Newsletter   Self-driving Cars

Lyft Motion Prediction for Autonomous Vehicles: 2020

Last Updated on July 24, 2023 by Editorial Team

Author(s): Rashmi Margani

Source: PexelsΒ 

Lyft Motion Prediction for Autonomous Vehicles: 2020

Lyft motion prediction challenge for self-driving cars

Problem Description

The challenge is to predict the movement of traffic agents around the AV, such as cars, cyclists, and pedestrians for 2020. At the same time, the 2019 competition focused on detecting the 3D objects, an important step prior to detecting their movement. Overall this requires quite a unique domain skill comparative to the 2019 problem statement.

The dataset consists of 170,000 scenes capturing the environment around the autonomous vehicle. Each scene encodes the state of the vehicle’s surroundings at a given point in time.

Source: Kaggle EDA Lyft
Source: Kaggle EDA Lyft5

The goal of this competition is to predict other cars/cyclist/pedestrian (called β€œagent”)’s motion.

The data preprocessing technique called rasterization is a process of creating images from other objects. For example, below is a typical image that we get, with 25 channels, channel by channel view. First, 11 images are rasterizations of other agent’s history, the next 11 images are the agent under consideration itself, and the last 3 are semantic map rasterization.

Generated during frame visualization

And converting to RGB image using rasterizer includes:

  • image: (channel, height, width) image of a frame. This is Birds-eye-view (BEV) representation.
  • target_positions: (n_frames, 2) displacements in meters in world coordinates
  • target_yaws: (n_frames, 1)
  • centroid: (2) center position x&y.
  • world_to_image: (3, 3) 3×3 matrix, used for transform matrix.

Example of L5Kit(Lyft 5 kit) structure for data processing:

Having said that, in this competition, understanding the Rasterizer class and implementing the customized rasterizer class has been a big challenge. Hence here is how to select the two important configuration options. We should carefully consider the

  • raster_size The rasterized image final size in pixels (e.g.: [300, 300]
  • pixel_size Raster’s spatial resolution [meters per pixel]: the size in real-world one pixel corresponds to.

Raster sizes

pixel_size = [0.5, 0.5]

As you can see in the image, if you increase the raster size (pixel size is constant), the model (ego/agent) will β€œsee” more areas surrounding.

  • More area behind/ahead
  • Slower rendering, because of the more information (agents, roads, etc.)

What is a good raster size?
I think it depends on the vehicle’s velocity.

km/h ms/Distance in 5 sec pixels10.281.392.7851.396.9413.89102.7813.8927.78154.1720.8341.67205.5627.7855.56256.9434.7269.44308.3341.6783.33359.7248.6197.224011.1155.56111.115013.8969.44138.896016.6783.33166.67

Let’s say If I used it constantly pixel_size = [0.5, 0.5] for these calculations.

The question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.

  • Pick your maximum speed. For example, 20 m/s
  • Calculate the maximum distance in 5 seconds. (100 meters)
  • Divide it by the size of the pixels (100 / 0.5 = 200)
  • Because the ego is at raster_size * 0.25 pixels from the left side of the image, we have to add some space. The final size is 200/0.75 = 267

Pixel sizes

The other parameter is the size of the pixels. What is one pixel in terms of world-meters? In the default settings, it is 1px = 0.5m
In the image below, you can see the differences between different pixel sizes. (The size of the images is 300x300px). Because, for example, the pedestrians are less the half meter (from the above view), they are not visible in the first 2–3 images. So we have to select a higher resolution (lower pixel_size). Somewhere between 0.1 and 0.25.

If we use a different pixel size, we have to recalculate the image size as well. Recalculate the example above with pixel_size=0.2:

  • 20 m/s
  • 100 meters in 5 seconds
  • 100/0.2 = 500
  • final image size: 500/0.75 = 667px

Problems

As we increase the image_size and the resolution (decreasing the pixel size), the rasterizer has to work more. It is already a bottleneck, so we have to balance between the model performance and training time.

Calculating the error in the rasterizer

Each history position, each lane, each other agent has encoded into pixels, and our net is only able to predict the next positions on the map with pixel-level accuracy.
In many notebooks, the raster has a size of 0.50 m per pixel (hyperparameter). Thus, the expected mean error will be 0.50 / 4 for each direction for each predicted position.

Source: Github code From error calculating of rasterization file
Source: Github code From error calculating of rasterization file

Winning architecture for this competition includes Resnet(18,34,50),EDA,calculating error and Efficientnet(b1,b3 & b6) for the code please check this Github repo:

rashmimarganiatgithub/LYFT2020


Lyft Motion Prediction for Autonomous Vehicles :2020 was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

Feedback ↓