KDD'22 Cam_Traj_Rec文献阅读与复现
KDD’22 Cam_Traj_Rec
论文简介
Fudan Yu∗, Wenxuan Ao∗, Huan Yan†, Guozhen Zhang, Wei Wu, and Yong Li. 2022. Spatio-Temporal Vehicle Trajectory Recovery on Road Network Based on Traffic Camera Video Data. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD ’22), August 14–18, 2022, Washington, DC, USA. ACM, New York, NY, USA, 9 pages. https://doi.org/10.1145/3534678.3539186
复现细节
文件结构
数据文件
camera_info.pkl
1 | class: list |
road_graph.pkl
1 |
records_100w_pca_64.pkl
1 | class: list |
matched_traj.pkl
A data format example for “matched_traj.pkl”
The file “matched_traj.pkl” which is readed in “calculate_speed.py” is the map-matched historical trajectories.
It also involves original GPS points thus is not open access.
If you’ re interested in running “calculate_speed.py”, you have to prepare your map-matched trajectories.
Here shows the data format of each item in “matched_traj.pkl” for your convenience.
1 | lon, lat = 111, 22 |
run.py运行过程
整体迭代过程
1 | ---------- iter 0 ----------- |
先通过SigCluster进行聚类操作
SigCluster类
通过FlatSearcher指定好GPU相关后,通过进入fit()函数,获取到cluster的结果。
1 | fit( |
特征的维度为[64,64,64],即通过将car_feature、plate_feature、plate_text三个维度的数据,进行车辆聚类。
1 | f_car = [x["car_feature"] for x in records] |
data_:将data转化为3个维度,每个维度999654条数据,即相当于解压成3个特征
对于data_中的某个特征维度i,再解压为f特征和f_id特征序号
循环结束后分别加入到fs(3*特征总数*特征维数64)与f_ids(3*特征总数)
f_topks内:对于每个特征的向量,找最相似的128个向量(这个过程非常耗时,运算维度很大)
运算好后的f_topks:(3*特征总数,每个特征后求出相似度在前128的其他特征)