malrabeiah / CameraPredictsBeams

Camera based beam prediction
MIT License
17 stars 10 forks source link

Question about generating training, validating and testing datasets #2

Closed nasirsinani closed 2 years ago

nasirsinani commented 2 years ago

I am trying to generate the train/validation/test dataset in order to see the dataset in action and I am facing issues. Steps that I am following are the steps provided in the official website and the official paper: https://arxiv.org/pdf/1911.06255.pdf.

Steps that I followed:

    Downloaded the data generation package v1 provided in the official website
    Downloaded the scenario The Distributed-Camera Scenario with Direct View (Single User) (dist_cam) from the official website
    As mentioned in the README file, moved the wireless folder of dataset to RayTracing Scenarios folder and renamed to dist_direct
    In the Dataset_Generator file, the hyperparameters are referenced from Table 1 of the paper https://arxiv.org/pdf/1911.06255.pdf
    Generated the .mat file

In the prep_data_struct.py, getMATLAB function I am giving the path of the generated .mat file but I am getting the following error:

key2 = list(raw_data.keys())
AttributeError: 'Dataset' object has no attribute 'keys'

Also, can you please provide more information about how to generate the codebook? What are the values of the parameters for the UFA_codebook_generator?

Thank you in advance,

Haotian-Zhang-PKU commented 2 years ago

Like you, I also want to ask how to generate the codebook and how to set the parameters for the UFA_codebook_generator.

malrabeiah commented 2 years ago

Thanks for your interest, both @nasirsinani and @Haotian-Zhang-PKU.

For the dataset, I really recommend you, guys, to read the notes in the beginning of the function you're using, for they are provided to help you "understand" what the function is doing. I know they are not detailed notes, but in this case they provide an answer to your question about preparing the datasets.

From the "getMATLAB" function notes: ":param matlab_file: path to the matlab data structure to read. The structure is expected to have two fields: wireless channels and user locations. The channel field should be a 4D array: #of antennas, # of subcarriers, # of user positions, # of BS user location field should be a 2D array: 3, # of user positions" The .mat file must be a "MATLAB" structure with two fields, whatever you want to name them. The important thing is that one is for channel data and the other is for the location data. Both fields must contain MATLAB arrays with different sizes, 4D for channel and 2D for location.

Please make sure you process the generated data to get the described structure!

malrabeiah commented 2 years ago

Now for the codebook function, i.e., "UPA_codebook_generator_DFT.m", I have added some notes in the beginning of the function to explain the arguments. Please, use the parameters in Table 1 in the paper "Millimeter Wave Base Stations with Cameras: Vision Aided Beam and Blockage Prediction" to configure your codebook.

In the end, I would really like to emphasize two points: 1) Please read the notes provided in any script. 2) When you get stuck with a script, consider playing around with it. This usually resolves 70% of the problems you may face.

Haotian-Zhang-PKU commented 2 years ago

Thank you very much! In fact, I can now run the code normally. I just want to confirm the parameter setting of "UPA_codebook_generator_DFT.m".