Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid objects warning occured when loading waymo training data #42

Open
zerlinwang opened this issue Dec 3, 2024 · 5 comments
Open

Comments

@zerlinwang
Copy link

zerlinwang commented Dec 3, 2024

Hi Alan, Thank you for your excellent work!
I encountered a problem when I wanna train wayformer on the waymo dataset. It would be grateful if you can offer any help.

What is the problem

When I run python train.py
The outputs are

Seed set to 42
Loading training data...
Using 64 processes to load data...
Warning: obj_idx=177 is not valid at time step 9, scene_id=a796796f4a048d62
0/7610 data processed
Warning: obj_idx=40 is not valid at time step 9, scene_id=8702fb2a32bb71b1
Warning: obj_idx=26 is not valid at time step 9, scene_id=ec8bfc734c194445
Warning: obj_idx=4 is not valid at time step 9, scene_id=386f1987ce0ac975
Warning: obj_idx=12 is not valid at time step 9, scene_id=2ffcf84b9ccbc646
Warning: obj_idx=159 is not valid at time step 9, scene_id=a90b538976da7b95
Warning: obj_idx=13 is not valid at time step 9, scene_id=69eb1d8e88941a82
Warning: obj_idx=33 is not valid at time step 9, scene_id=4e833e33f9ea0e48
Warning: obj_idx=32 is not valid at time step 9, scene_id=c0903535ea655ea6
Warning: obj_idx=9 is not valid at time step 9, scene_id=ee28e59c2b44efd1
Warning: obj_idx=18 is not valid at time step 9, scene_id=4a266beef119d131
Warning: obj_idx=159 is not valid at time step 9, scene_id=1bb2559a10e6ec0c
Warning: obj_idx=15 is not valid at time step 9, scene_id=c409b46c149703b7
Warning: obj_idx=3 is not valid at time step 9, scene_id=c409b46c149703b7
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_e75022217efdf6bf.pkl
Warning: obj_idx=43 is not valid at time step 9, scene_id=c12a9f85df574fa5
Warning: obj_idx=2 is not valid at time step 9, scene_id=a59b2c32e340b2a3
Warning: no center objects at time step 9, scene_id=a59b2c32e340b2a3
Warning: 'NoneType' object is not iterable in sd_waymo_v1.2_a59b2c32e340b2a3.pkl
Warning: obj_idx=106 is not valid at time step 9, scene_id=715ad5c57bdcc6e
Warning: obj_idx=4 is not valid at time step 9, scene_id=859d80bbf53923a8
Warning: obj_idx=55 is not valid at time step 9, scene_id=9e22b91b294d3a12
Warning: obj_idx=11 is not valid at time step 9, scene_id=97800e3c6548cd85
Warning: obj_idx=19 is not valid at time step 9, scene_id=258587cdee55e595
Warning: obj_idx=2 is not valid at time step 9, scene_id=fc268c0790864a3f
Warning: obj_idx=112 is not valid at time step 9, scene_id=bfba0ae3b01a9d37
...

How to reproduce the problem

  1. Download waymo open motion dataset v1.2.0;
gsutil -m cp -r \
  "gs://waymo_open_dataset_motion_v_1_2_0/uncompressed/scenario/training" \
  "gs://waymo_open_dataset_motion_v_1_2_0/uncompressed/scenario/validation" \
  .
  1. Process the dataset with ScenarioNet
python -m scenarionet.convert_waymo -d /path/to/unitraj/data_samples/waymo --raw_data_path /path/to/Waymo_v1.2/training --num_workers 64
python -m scenarionet.convert_waymo -d /path/to/unitraj/data_samples/waymo_val --raw_data_path /path/to/Waymo_v1.2/validation --num_workers 64
  1. Train

My config.yaml is

# exp setting
exp_name: 'waymo_debug' # name that will be used in wandb
ckpt_path: null # checkpoint path, used for evaluation
seed: 42 # random seed
debug: False # debug mode, will use cpu only
devices: [ 0, 1, 2, 3 ] # gpu ids

# data related
load_num_workers: 8 # number of workers for loading data
train_data_path: [ "data_samples/waymo" ] # list of paths to the training data
val_data_path: [ "data_samples/waymo_val" ] # list of paths to the validation data
cache_path: "./cache"
max_data_num: [ null ] # maximum number of data for each training dataset, null means all data
starting_frame: [ 0 ] # history trajectory starts at this frame for each training dataset
past_len: 10 # history trajectory length, 2.1s
future_len: 80 # future trajectory length, 6s
object_type: [ 'VEHICLE' , 'PEDESTRIAN', 'CYCLIST'] # object types included in the training set
line_type: [ 'lane','stop_sign','road_edge','road_line','crosswalk','speed_bump' ] # line type to be considered in the input
masked_attributes: [ 'z_axis', 'size' ] # attributes to be masked in the input
trajectory_sample_interval: 1 # sample interval for the trajectory
only_train_on_ego: False # only train on AV
center_offset_of_map: [ 30.0, 0.0 ] # center offset of the map
use_cache: False # use cache for data loading
overwrite_cache: True # overwrite existing cache
store_data_in_memory: False # store data in memory

# official evaluation
# nuscenes_dataroot: '/mnt/nas3_rcp_enac_u0900_vita_scratch/datasets/Prediction-Dataset/nuscenes/nuscenes_root'
eval_nuscenes: False # whether to evaluate with nuscenes evaluation tool
eval_waymo: False # whether to evaluate with waymo evaluation tool
eval_argoverse2: False # whether to evaluate with argoverse evaluation tool

defaults:
  - method: wayformer

Then run python train.py

Possible reasons

  1. The version of waymo dataset:
    I find that some people use v1.2.0 while other use v1.2.1 or v1.1.0. In addition, could I ask uncompressed/scenario/training and uncompressed/scenario/training_20s, which one is what we need?
  2. Problems in my config.yaml
  3. This is actually not a problem.
@Alan-LanFeng
Copy link
Collaborator

Hi,

the past_len should be set as 11 for Waymo official split. Can you try again?

@zerlinwang
Copy link
Author

Hi Alan, thank you for your reply. After setting the past_len=11, the output was:

Seed set to 42                                                                                                                                                               
Loading training data...                                                                                                                                                     
Using 64 processes to load data...                                                                                                                                           
0/7610 data processed                                                                                                                                                        
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_e75022217efdf6bf.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_dd601c11d0c5c533.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_89f5f3bfcc69c563.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_4124d5ed7578138e.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_97060d12ad9366fb.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_2eb685c7caf8d082.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_fd800f4ac842b394.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_1384d925f2468856.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_87ac32ed8c4bdfa1.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_74b169a0e1eb617a.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_3a74a2b074b26a0c.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_b5f926e4a40bc446.pkl                                                                               
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_87dd0163cbd198b3.pkl                                                                            
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_76895172f40c4f67.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_b8e6e2e8736d50c5.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_b839720835af7116.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_2cd38954abaddbb0.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_67811ca4b2ea12d1.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_371ba4878ddc05a3.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_277927e328bdf914.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_ce3c4dd7fa4188e2.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_9b7879c050b7fbd2.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_e3976888355f406f.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_268b533682c60ed5.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_51693c81509fb649.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_45cb4670438f104e.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_a0a03dd38638bb84.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_324be8c95d2a6b66.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_5562f4f607f6ec32.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_8733974e00c59297.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_162def94bc5f6c62.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_5a9e9f1f125dba0f.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_82b4e554c130c874.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_5fa21a5565450c15.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_bc3b1deb708fe3d9.pkl
Warning: index 0 is out of bounds for axis 0 with size 0 in sd_waymo_v1.2_f1fdd1083cc502e9.pkl
...
  • Could you tell me which version of Waymo Dataset do you use? 1.2 or 1.1?
  • In addition, the data loading process seems consume more than 250GB memory, is it normal?

Thank you for your time on this matter.

@Alan-LanFeng
Copy link
Collaborator

  1. We are using 1.1
  2. The memory usage is normal because of multiprocessing.

The result is not normal. I will check the code. Thanks for pointing out.

@marlon31415
Copy link

marlon31415 commented Jan 10, 2025

Hi, I am experiencing a similar problem when preprocessing nuScenes data.
The past and future length are defined as following:

past_len: 11
future_len: 80

While I extracted the data with ScenarioNet for past=1 and future=8.

Seed set to 42                                                                                                                                                                                                                                                                                                                                                                                                
Loading training data...                                                                                                                                                                
Using 128 processes to load data...                                                                                                                                                     
0/252 data processed                                                                                                                                                                    
Warning: obj_idx=18 is not valid at time step 10, scene_id=scene-0786_be797506f6c344028b6f0722cf550303_99857dc2401d474a831af7f55ec087ef                                                 
Warning: no center objects at time step 10, scene_id=scene-0786_be797506f6c344028b6f0722cf550303_99857dc2401d474a831af7f55ec087ef                                                       
Warning: 'NoneType' object is not iterable in sd_nuscenes_train_scene-0786_be797506f6c344028b6f0722cf550303_99857dc2401d474a831af7f55ec087ef.pkl                                        
Warning: obj_idx=24 is not valid at time step 10, scene_id=scene-0739_845592c930ab4e78b1947afeaef2d6d6_6c5b92351ef04895a08443b419c02741                                                 
Warning: no center objects at time step 10, scene_id=scene-0739_845592c930ab4e78b1947afeaef2d6d6_6c5b92351ef04895a08443b419c02741                                                       
Warning: 'NoneType' object is not iterable in sd_nuscenes_train_scene-0739_845592c930ab4e78b1947afeaef2d6d6_6c5b92351ef04895a08443b419c02741.pkl                                        
Warning: obj_idx=0 is not valid at time step 10, scene_id=scene-0437_d5d5fdcb11854f6f967b95b5be4825de_582cc6fe189b48dbba28d40b05a2bc1d                                                  
Warning: no center objects at time step 10, scene_id=scene-0437_d5d5fdcb11854f6f967b95b5be4825de_582cc6fe189b48dbba28d40b05a2bc1d                                                       
Warning: 'NoneType' object is not iterable in sd_nuscenes_train_scene-0437_d5d5fdcb11854f6f967b95b5be4825de_582cc6fe189b48dbba28d40b05a2bc1d.pkl                                        
Warning: obj_idx=64 is not valid at time step 10, scene_id=scene-1084_b8938df6b41a475ca8e9b46e8d932119_caf5a46be02248e2addc181e0dae7fa2                                                 
Warning: no center objects at time step 10, scene_id=scene-1084_b8938df6b41a475ca8e9b46e8d932119_caf5a46be02248e2addc181e0dae7fa2                                                       
Warning: 'NoneType' object is not iterable in sd_nuscenes_train_scene-1084_b8938df6b41a475ca8e9b46e8d932119_caf5a46be02248e2addc181e0dae7fa2.pkl                                        
Warning: obj_idx=48 is not valid at time step 10, scene_id=scene-1019_cb62a7eddf2a42bbb4d20a135fbeecda_e3ec0aeb7e4a46b59179c67dcfc66382                                                 
Warning: no center objects at time step 10, scene_id=scene-1019_cb62a7eddf2a42bbb4d20a135fbeecda_e3ec0aeb7e4a46b59179c67dcfc66382                                                       
Warning: 'NoneType' object is not iterable in sd_nuscenes_train_scene-1019_cb62a7eddf2a42bbb4d20a135fbeecda_e3ec0aeb7e4a46b59179c67dcfc66382.pkl                                        
Warning: obj_idx=70 is not valid at time step 10, scene_id=scene-0677_699f322472b445919b5aab68c506109a_93c8b7256a794d378db4c30c3129b8de                                                 
Warning: no center objects at time step 10, scene_id=scene-0677_699f322472b445919b5aab68c506109a_93c8b7256a794d378db4c30c3129b8de                                                       
Warning: 'NoneType' object is not iterable in sd_nuscenes_train_scene-0677_699f322472b445919b5aab68c506109a_93c8b7256a794d378db4c30c3129b8de.pkl                                        
Warning: obj_idx=13 is not valid at time step 10, scene_id=scene-0880_481b51ffeda2414a8b17d1cacb8c1f1c_d4de3a60cbb9492d97965ffef31ec108                                                 
Warning: no center objects at time step 10, scene_id=scene-0880_481b51ffeda2414a8b17d1cacb8c1f1c_d4de3a60cbb9492d97965ffef31ec108                                                       
Warning: 'NoneType' object is not iterable in sd_nuscenes_train_scene-0880_481b51ffeda2414a8b17d1cacb8c1f1c_d4de3a60cbb9492d97965ffef31ec108.pkl                                        
Warning: obj_idx=7 is not valid at time step 10, scene_id=scene-0862_ba1015b8fb8647e5ae5f358151feaeaa_9b1a2d20280c46a7bec779b33854c593                                                  
Warning: no center objects at time step 10, scene_id=scene-0862_ba1015b8fb8647e5ae5f358151feaeaa_9b1a2d20280c46a7bec779b33854c593                                                       
Warning: 'NoneType' object is not iterable in sd_nuscenes_train_scene-0862_ba1015b8fb8647e5ae5f358151feaeaa_9b1a2d20280c46a7bec779b33854c593.pkl                                        
Warning: obj_idx=0 is not valid at time step 10, scene_id=scene-0870_8985b724af9a457aac4cf1a62f99d242_6b62cb5ce5df499ab8c1a3f435f1575a                                                  
Warning: no center objects at time step 10, scene_id=scene-0870_8985b724af9a457aac4cf1a62f99d242_6b62cb5ce5df499ab8c1a3f435f1575a

I first thought, that the extracted data has only 10 steps past and therefore, the 11th step cannot be converted in UniTraj.
However, when setting past_len=10 the same error warning occurs but instead of is not valid at time step 10 it shows is not valid at time step 9.

@marlon31415
Copy link

I have done some more digging: The warning always occurs, when the track_length of the tracks in the .pkl generated from ScenarioNet is smaller than past_len + future_len. But i wonder why ScenarioNet is generating scenarios of different length for a few samples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants