This repository contains code and instructions to generate a synchronized dataset using the CARLA simulator. The dataset includes data from the CARLA environment, such as sensor data and vehicle information, and is useful for various research and development purposes.
Before using this code to generate a CARLA synchronized dataset, make sure you have the following prerequisites installed:
- CARLA Simulator: Download and install the CARLA simulator on your system.
-
Start CARLA Server:
- Open a terminal and navigate to the CARLA directory where the
CarlaUE4.shscript is located. - Start the CARLA server with the following command:
./CarlaUE4.sh --opengl -quality-level=Epic --sync
- The
-quality-level=Epicflag sets the graphics quality to Epic,--openglensures it runs with the OpenGL graphics backend, andsyncensures it runs in synchronous mode.
- Open a terminal and navigate to the CARLA directory where the
-
Generate Data:
- Use the provided
data_generator.pyto generate data.
- Class ID:
- Description: Define the class IDs used for semantic segmentation of objects in the CARLA environment.
- Example:
Class ID : 1 == Roads 2 == Sidewalks 3 == Buildings 6 == Street lights 7 == Traffic lights 8 == Traffic Signs 9 == Trees / Grass 11 == Sky 14 == Car (Vehicles) 15 == Trucks (Vehicles)
- class_id_yolo:
- Description: Specify the YOLO class ID used for object detection or recognition in the CARLA environment.
- area_val:
- Description: Set the area threshold value to filter objects based on their size in the recorded images.
- vehicle_count:
- Description: Define the number of vehicles you want to spawn in the CARLA environment.
- save_folder:
- Description: Specify the folder where the recorded RGB images will be saved.
- cropped_image_height and cropped_image_width:
- Description: Set the desired height and width dimensions for cropped images.
Please refer to the
data_generator.pyscript itself for detailed comments and instructions on how to use these controls effectively. Customize the script according to your project's requirements to generate the desired synchronized dataset. - Use the provided
This project is licensed under the MIT License - see the LICENSE file for details.