Questions about data collection
Closed this issue · 7 comments
Thanks for your good work! I started reproducing this article before, and I found that the code for the agents folder is missing in this version. In addition, in the recent version, it was found that the birdview pictures collected during data collection were all black
Hello! Thank you the kind words. There has been some recent changes on the repository, could you pull main again?
For the bird's-eye view images, they appear as black when you open them but they do contain a class id. If you'd like to visualise them you can do
from mile.constants import BIRDVIEW_COLOURS
birdview = np.array(Image.open('path_to_birdview.png'))
birdview = BIRDVIEW_COLOURS[birdview]
No, I can not pull main again. I run the following code,
bash run/data_collect.sh ~/carla11/CarlaUE4.sh dataset/ 2000 config/test_suites/lb_data.yaml
It gives the following error:
File "~/mile-main/mile/data/dataset_utils.py", line 7, in
from agents.navigation.local_planner import RoadOption
ModuleNotFoundError: No module named 'agents'
In the process of changes recently, I think some of the scripts are not updated.
Oh that's because you need to add the following to the pythonpath:
export PYTHONPATH="${CARLA_ROOT}/PythonAPI/carla/"
I can collect the data and run all the scripts, thanks for the sharing. But this code can not work and gives IndexError: index 10 is out of bounds for axis 0 with size 8 for 'birdview = BIRDVIEW_COLOURS[birdview]'.
Hello! Thank you the kind words. There has been some recent changes on the repository, could you pull main again?
For the bird's-eye view images, they appear as black when you open them but they do contain a class id. If you'd like to visualise them you can do
from mile.constants import BIRDVIEW_COLOURS birdview = np.array(Image.open('path_to_birdview.png')) birdview = BIRDVIEW_COLOURS[birdview]
Ah apologies - the proper way to visualise the labels are by loading the CarlaDataset
(mile/data/dataset.py). Then a combination of batch['birdview_label'] and BIRDVIEW_COLOURS should allow you to visualise them.
Thank you for your answer
Excuse me, can you provide a visual code example? thank you very much indeed.