dsj96/CTVI-master

how to get the the `features` ?

Closed this issue · 3 comments

YN-ST commented

Hi, really appreciate your work. Meanwhile, I also get one question.

In the extract_features_graph.py file, if I want to generate the knn file by myself instead of using the knn data in jinan.zip , how to get the required features in the function generate_knn('jinan', features)?

dsj96 commented

HI, [YN-ST]! If you want use your own feature, you can construct a pkl file like ./jinan/features.pkl.
features.pkl is a two-dimensional ndarray, and its shape is (493, 7). write_pkl() and read_pkl() are used to generate and read pkl file.
Some details you can change by your features, and extract_features_graph.py is modified from dataprocess.py.
Important: The feature in row i should be correspond to node i. Since our max node id is 493, min node id is 0.

I hope my reply can provide you with some help.

YN-ST commented

Hi, thanks so much for your reply! Your reply helps me a lot.

I'm new to this field, sorry for my ignorance, there is still one more question :(
What is the content the features.pkl based on ? Furthermore, what is the information in node i?

I'm looking forward to your reply, thank you so much!

dsj96 commented

Including road level, road length, number of lanes, speed limitation ...
For more details, you can read the paper in details.