Closed Bowie-Z closed 2 years ago
For convenience, I preprocessed the highD dataset to make it with the same format as NGSIM. Downsampling (25Hz ->10Hz) is made by simple interpolation. I just uploaded it to the highD-ngsim-format folder for your reference. Actually, I only use 5Hz in the network, so it's easier to directly downsample both datasets (25/10Hz) to 5Hz.
Another author helped with visualizing the results, so I didn't take the time to polish that part. I guess your interest lies in the colorline in my trajectory visualization? Here I provide the code snippet which you may require:
import matplotlib.pyplot as plt
import matplotlib.collections as mcoll
def colorline(self, x, y, ax,
z=None, cmap=plt.get_cmap('rainbow'), norm=plt.Normalize(0.0, 1.0), linewidth=4, alpha=0.9, zorder=3):
"""
http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb
http://matplotlib.org/examples/pylab_examples/multicolored_line.html
Plot a colored line with coordinates x and y
Optionally specify colors in the array z
Optionally specify a colormap, a norm function and a line width
"""
# Default colors equally spaced on [0,1]:
if z is None:
z = np.linspace(0.0, 1.0, len(x))
z = np.asarray(z)
segments = self.make_segments(x, y)
lc = mcoll.LineCollection(segments, array=z, cmap=cmap, norm=norm, zorder= zorder,
linewidth=linewidth, alpha=alpha)
ax.add_collection(lc)
return lc
@Haoran-SONG Thank you for providing the repo. of your insightful work.
The folder link highD-ngsim-format folder provides HighD Dataset in NGSIM format. You have divided each track the HighD dataset into fwd and bck based on direction of motion mentioned in xx_trackMeta file.
Can you please share the source code used to convert the HighD dataset into NGSIM format in the reply or at vinit.katariya99@gmail.com?
Thank you for providing source code of your brilliant work on vehicle trajectory prediction. I have 2 questions about HighD dataset using in your work: