xinhez / simulation-for-detection

Apache License 2.0
2 stars 2 forks source link

Synthetic Crosswalks generation in CARLA #2

Open bhuvanharlapur opened 2 years ago

bhuvanharlapur commented 2 years ago

Hello,

@xinhez @tom-bu I am also trying to generate synthetic crosswalks data using Carla for object detection task. I saw you dataset on Kaggle. I am trying to edit crosswallks in carla maps but not able to do so successfully. Could you please let me know as to how you add crosswalks and also how did you annotate the crosswalks images

tom-bu commented 2 years ago

Hi Bhuvan,

You can take a look here for the crosswalks that we used, or you can create your own crosswalks in Unreal Engine. I didn't manage to find a way to modify the crosswalks already in the CARLA maps easily, so I added them as a new object and gave those objects a different segmentation label. This is because some of the crosswalk in CARLA are combined with other road markings like lane boundaries, which we don't want. Hope this helps.

bhuvanharlapur commented 2 years ago

@tom-bu Thank you for the reply. Is there any documentation that you could refer me to change to create objects in unreal engine and also to create different segmentation labels? Because all the documentation refers to only creating which i do not want

bhuvanharlapur commented 2 years ago

Coorection

@tom-bu Thank you for the reply. Is there any documentation that you could refer me to create objects in unreal engine and also to create different segmentation labels? Because all the documentation refers to only creating new maps entirely which i do not want

tom-bu commented 2 years ago

To create different segmentation labels, you can follow Step 2 part 3 as well as step 3 part 1, where it says to change tagger.h, tagger.cpp, and CityScapesPalette.h, as shown in these images

Screen Shot 2021-11-11 at 11 03 57 AM Screen Shot 2021-11-11 at 11 04 02 AM Screen Shot 2021-11-11 at 11 04 07 AM
tom-bu commented 2 years ago

As for creating objects in CARLA, this method isn't perfect, but was good enough for creating crosswalks. In Carla, you can add basic objects, specifically the"Plane" object, drag and drop the planes into the scene, and resize them and adjust the color as you see fit. Then select each "plane" object, right click, and select "convert to static mesh." This will create an object for you. If you're working with crosswalks, it maybe good to place the crosswalk objects slightly above the ground and turn off shadows. Hope this helps.