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

HiVT map-free customization #46

Open
javierAraluce opened this issue Sep 22, 2023 · 1 comment
Open

HiVT map-free customization #46

javierAraluce opened this issue Sep 22, 2023 · 1 comment

Comments

@javierAraluce
Copy link

Hello, first of all, thank you for your excellent work and dedication in making it openly available for the community to use.

I was wondering how I could adapt your code so that it can be evaluated in a version without a map, as they claim in the following paper. They have compared HiVT with your model in a way that doesn't use a map.

Thanks in advance

@EtienneDS
Copy link

I believe the author(s) have moved on to their new algorithm QCNet and such won't really put too much work into this one anymore.

I believe to make it work without map all you need to do is remove the ALEncoder in local_encoder.py :

self.al_encoder = ALEncoder(node_dim=node_dim,
edge_dim=edge_dim,
embed_dim=embed_dim,
num_heads=num_heads,
dropout=dropout)

edge_index, edge_attr = self.drop_edge(data['lane_actor_index'], data['lane_actor_vectors'])
out = self.al_encoder(x=(data['lane_vectors'], out), edge_index=edge_index, edge_attr=edge_attr,
is_intersections=data['is_intersections'], turn_directions=data['turn_directions'],
traffic_controls=data['traffic_controls'], rotate_mat=data['rotate_mat'])

You can also remove the mapping sections from the data preprocessing if you are using Argoverse:

# get lane features at the current time step
df_19 = df[df['TIMESTAMP'] == timestamps[19]]
node_inds_19 = [actor_ids.index(actor_id) for actor_id in df_19['TRACK_ID']]
node_positions_19 = torch.from_numpy(np.stack([df_19['X'].values, df_19['Y'].values], axis=-1)).float()
(lane_vectors, is_intersections, turn_directions, traffic_controls, lane_actor_index,
lane_actor_vectors) = get_lane_features(am, node_inds_19, node_positions_19, origin, rotate_mat, city, radius)

With this you should be able to run the code without map information, though I cannot say if this is the best way as to get optimal results.

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

2 participants