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

How to get BEV camera config data? #9

Open
Light-- opened this issue Feb 19, 2024 · 2 comments
Open

How to get BEV camera config data? #9

Light-- opened this issue Feb 19, 2024 · 2 comments

Comments

@Light--
Copy link

Light-- commented Feb 19, 2024

LIke this in the dataset ( xxxx.txt ):

BEVCamera, 7.467841, 40.13262, 2.768845, 90, 0.9908196, 0

@Light-- Light-- changed the title How to get BEV camera config? How to get BEV camera config data? Feb 19, 2024
@ektas0330
Copy link

The BEV camera config represents the 3D rotation and translation of the BEV camera used to capture the ground truth BEV in the FB-SSEM dataset. Generally, there is no BEV camera in the real world, so there won't be any BEV camera config for your case.

Note that testing the F2BEV model does not require a BEV camera config; the seq_len parameter in the code for testing F2BEV (e.g., line 46 in test_f2bev_attn_st_height.py) is always set to 1, which ensures that a BEV camera config is not required.

@Light--
Copy link
Author

Light-- commented Feb 20, 2024

ektas0330

Thanks for your reply.
I use my own fisheye images for inference, organize the folder and files like the FB-SSEM-dataset, and already set sql_len to 1, but it still go to read the camera config, more specifically, the bev camera confg (lines[5])

The process will be:
construct test_data -> build UnityImageDataset -> call read_config_for_bevposrot() -> read bev cam config

   def read_config_for_bevposrot(self,configdir,filename):
        with open(os.path.join(configdir, filename)) as f:
            lines = f.readlines()
        # will read bev cam config and report error here
        bpos = [float(lines[5].split(',')[1]),float(lines[5].split(',')[2]),float(lines[5].split(',')[3])] 
        brot = [float(lines[5].split(',')[4]),float(lines[5].split(',')[5]),float(lines[5].split(',')[6])]
        return [bpos,brot]

error :

Traceback (most recent call last):
  File "test_f2bev_attn_st_height.py", line 155, in <module>
    test_temporal(test_dataloader,seq_len,model,loss,all_images)
  File "test_f2bev_attn_st_height.py", line 99, in test_temporal
    for batch_idx, (dataseq, targetseq) in enumerate(tqdm(test_dataloader)):
  File "/home/data2/conda/envs/f2bev/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
    for obj in iterable:
  File "/home/data2/conda/envs/f2bev/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 628, in __next__
    data = self._next_data()
  File "/home/data2/conda/envs/f2bev/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 671, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home/data2/conda/envs/f2bev/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/data2/conda/envs/f2bev/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 58, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/traindata/FB-SSEM-dataset/F2BEV_code/F2BEV/test_loader_single_task.py", line 171, in __getitem__
    [bpos,brot] = self.read_config_for_bevposrot(config_dir,image_list[cidx].split('.')[0]+'.txt')
  File "/home/traindata/FB-SSEM-dataset/F2BEV_code/F2BEV/test_loader_single_task.py", line 114, in read_config_for_bevposrot
    bpos = [float(lines[5].split(',')[1]),float(lines[5].split(',')[2]),float(lines[5].split(',')[3])]
IndexError: list index out of range

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