Skip to content

Commit e6c273e

Browse files
committed
Updates to docs
Signed-off-by: Adityan Jothi <ajothi@nvidia.com>
1 parent f75e79f commit e6c273e

3 files changed

Lines changed: 33 additions & 17 deletions

File tree

README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ An end-to-end workflow for generating photo-realistic synthetic data for Vision-
2222
- [Recorder Config](#recorder-config)
2323
- [System Requirements](#system-requirements)
2424
- [Quickstart (Docker Compose)](#quickstart-docker-compose)
25-
- [Configuration](#configuration)
2625
- [Advanced Configuration](#advanced-configuration)
2726
- [Workflow Usage (Stage-by-Stage)](#workflow-usage-stage-by-stage)
28-
- [Data Layout and Examples](#data-layout-and-examples)
2927
- [Troubleshooting / FAQ](#troubleshooting--faq)
3028
- [Security and Compliance](#security-and-compliance)
3129
- [Contributing and Support](#contributing-and-support)
@@ -35,13 +33,25 @@ An end-to-end workflow for generating photo-realistic synthetic data for Vision-
3533
---
3634

3735
## Overview
38-
This workflow provides a Synthetic Data Generation (SDG) recipe to produce VLM-ready datasets for smart city applications:
39-
- CARLA-based scenario simulation and recording
40-
- Ground-truth extraction (RGB, Depth, Segmentation, Normals, 2D/3D bounding boxes, events)
41-
- COSMOS-Transfer photo-realistic augmentation guided by multi-modal inputs and prompts
42-
- SoM-aware post-processing to preserve object correspondence across modalities
36+
This workflow provides a Synthetic Data Generation (SDG) recipe to produce VLM-ready datasets for smart city applications. In areas where the highest model accuracy is vital, finetuning on domain specific data is essential. Synthetic data generation and augmentaion offer an easy and scalable way to collect this data to your exact specifications. However, there are significant challenges associated with creating diverse, photorealistic training data from simulators that this workflow aims to address:
4337

44-
Primary components:
38+
- **Domain Gap**: While simulators provide perfect ground truth and controllable scenarios, their synthetic appearance creates a substantial domain gap that limits the performance of models trained on simulator data when deployed in real-world environments.
39+
- **Scalability Constraints**: Manually crafting diverse scenarios in simulators requires substantial engineering effort and computational resources, making it prohibitively expensive to scale up data diversity.
40+
- **Limited Visual Realism**: Traditional simulator outputs lack the photorealistic quality needed for robust real-world model deployment, requiring additional post-processing or domain adaptation techniques.
41+
42+
To remedy these issues, this workflow provides a recipe to:
43+
- Simulate customized traffic scenarios using CARLA
44+
- Ground-truth extraction from simulation (RGB, Depth, Segmentation, Normals, 2D/3D bounding boxes, events)
45+
- Use COSMOS-Transfer to generate photo-realistic augmentations that bridge the sim-to-real gap
46+
- Scale synthetic data with customizable augmentation variables
47+
- Generate post-training datasets for model fine-tuning
48+
- SoM-aware post-processing to preserve object correspondence across modalities
49+
- Q&A Caption generation for VLM post-training
50+
51+
The output of this recipe is designed to offer a simple hand-off for further fine-tuning and deployment in the metropolis stack.
52+
Refer to the [Cosmos Cookbook](https://nvidia-cosmos.github.io/cosmos-cookbook/) for [Fine-tuning](https://nvidia-cosmos.github.io/cosmos-cookbook/recipes/post_training/reason1/intelligent-transportation/post_training.html) and [VSS documentation](https://docs.nvidia.com/vss/latest/#) for [Deployment](https://docs.nvidia.com/vss/latest/content/installation-vlms.html#local-models-cosmos-reason1) guides.
53+
54+
**Primary components:**
4555
- `modules/carla-ground-truth-generation`: CARLA ground-truth extraction and dataset tooling
4656
- `modules/augmentation`: Prompting, template/prompt generation, and COSMOS execution utilities
4757
- `modules/postprocess/postprocess_for_vlm.py`: SoM-aligned overlays/validations
@@ -164,7 +174,9 @@ cp env.example env
164174
4) Deploy the stack. There are two main deployment options available:
165175

166176
- **Homogeneous Deployment:** This mode launches all NIM services (VLM, LLM, Cosmos-Transfer) and the Workbench on a single machine (default, no extra arguments). It is recommended for systems with at least 4 suitable GPUs (RTX support and 80+ GB VRAM). Simply run `./deploy.sh` to start the entire stack locally.
167-
![Homogeneous Deployment Diagram](data/docs/homogeneous.png)
177+
178+
<img src="data/docs/homogeneous.png" width="700">
179+
168180
```bash
169181
# On the target machine
170182
./deploy.sh
@@ -179,7 +191,8 @@ cp env.example env
179191
180192

181193
- **Heterogeneous Deployment:** This mode allows you to run the NIM stack (VLM, LLM, Cosmos-Transfer) on one machine and the Workbench (with CARLA) on another, using the `nim` and `workbench` arguments respectively. This is useful if you wish to distribute resource usage across multiple hosts. You'll need to set the `NIM_HOST` environment variable on the Workbench node to point to the NIM node.
182-
![Heterogeneous Deployment Diagram](data/docs/heterogeneous.png)
194+
195+
<img src="data/docs/heterogeneous.png" width="700">
183196

184197
The NIM stack requires a machine with 3 GPUs with 80+ GB VRAM (Ampere or later) to launch the 3 inference endpoints using the command below:
185198
```bash
@@ -241,10 +254,11 @@ Stage 3 — Post-processing for VLM
241254
- Inputs: Augmented videos, Ground Truth metadata
242255
- Outputs: SoM-aligned overlays, Q&A pairs
243256

244-
---
257+
**Workflow Outputs by Stage:**
258+
259+
<img src="data/docs/outputs.png" width="1000">
245260

246-
## Data Layout and Examples
247-
Sample outputs are included under `data/outputs/`:
261+
Workflow outputs are generated under `data/outputs/`:
248262
- `CARLA/default_run/scenario_1/` → simulator GT outputs and videos
249263
- `Cosmos/default_run/scenario_1/` → stylized videos (augmentation variants)
250264
- `postprocess/` → SoM overlays and annotations

data/docs/outputs.png

628 KB
Loading

notebooks/carla_synthetic_data_generation.ipynb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
"|-------------------|---------|---------|---------|------------|\n",
4747
"| 4x RTX PRO 6000 | ~9m | ~20m | ~1m | ~30m |\n",
4848
"\n",
49-
"The notebook utilizes 3 scenarios (for simulation) and each scenario is augmented twice using Cosmos Transfer2.5. On the 4xRTX PRO 6000 setup the end-to-end notebook runtime would be roughly 2h 30 mins.\n",
49+
"The notebook utilizes 3 scenarios (for simulation) and each scenario is augmented once using Cosmos Transfer2.5. On the 4xRTX PRO 6000 setup the end-to-end notebook runtime would be roughly 1h 30 mins.\n",
5050
"\n",
5151
"Below is the overall breakdown for the end to end notebook \n",
5252
"| GPU Configuration | Stage 1 | Stage 2 | Stage 3 | End-to-end | \n",
5353
"|-------------------|---------|---------|---------|------------|\n",
54-
"| 4x RTX PRO 6000 | ~27m | ~120m | ~1m | ~2h 28m |\n"
54+
"| 4x RTX PRO 6000 | ~27m | ~60m | ~1m | ~1h 28m |\n"
5555
]
5656
},
5757
{
@@ -231,7 +231,9 @@
231231
"id": "e3b31344-b540-4de5-80c0-920a5546f185",
232232
"metadata": {},
233233
"source": [
234-
"Let us now set up the configuration necessary to perform augmentation. These will determine what gets generated by Cosmos Transfer. If using the default files no changes are needed. "
234+
"Let us now set up the configuration necessary to perform augmentation. These will determine what gets generated by Cosmos Transfer. If using the default files no changes are needed.\n",
235+
"\n",
236+
"By default, `NUM_AUGMENTATIONS` is set to 1, meaning only 1 augmented video will be generated per ground-truth input. If you would like to further increase your data diversity, you can modify this parameter to generate more videos (note this will greatly increase processing time). To limit which conditions can be chosen in each augmentation, you can add or remove items from the 3 lists in `variables`."
235237
]
236238
},
237239
{
@@ -246,7 +248,7 @@
246248
"BASE_INPUT_DIR = os.path.join(os.getenv('CARLA_OUTPUT_DIR'), os.getenv('RUN_ID'))\n",
247249
"BASE_OUTPUT_DIR = os.path.join(os.getenv('COSMOS_OUTPUT_DIR'), os.getenv('RUN_ID'))\n",
248250
"CONFIG_FILE_PATH = \"/workspace/modules/augmentation/configs/config_carla.yaml\"\n",
249-
"NUM_AUGMENTATIONS = 2\n",
251+
"NUM_AUGMENTATIONS = 1\n",
250252
"\n",
251253
"# Endpoint and model configuration\n",
252254
"VLM_URL = f\"http://{os.getenv('NIM_HOST')}:{os.getenv('VLM_PORT')}/v1\" \n",

0 commit comments

Comments
 (0)