# synth_captioning Captioning pipeline for the synthetic PinPan datasets (`enrue1893/PinPan_Train_Syn`), extracted from `JointGen-backup`. Perspective-crop rendering happens upstream (external simulator); this bundle only covers the **captioning stage**: pulling pre-rendered panorama + 5 perspective clips per sample and generating structured JSON captions with a locally-served Qwen VLM (`Qwen/Qwen3.6-27B`). ## Files ``` data/dataset_streaming_template/ stream_process_pinpan_train_syn_captions_only.py # entry point — run this stream_process.py # generic streaming template (reference) README.md # streaming pattern docs data/_5traj_4view_analysis/ pano_conditioning.py # provides equi2pers() (ERP -> pinhole) qwen36_test/ caption_qwen36_8k_5traj.py # caption_9view_qwen() engine caption_qwen36_pano_perspective_pair.py # low-level ERP/pinhole + Qwen helpers vllm_serve_wrapper.py # `vllm serve` wrapper (GEMM kernel workaround) README.md # vLLM server launch instructions requirements/ qwen36_env.txt # pinned Python deps ``` Import chain: `stream_process_pinpan_train_syn_captions_only.py` -> `caption_qwen36_8k_5traj.py` (`q5`) -> `caption_qwen36_pano_perspective_pair.py` -> `pano_conditioning.py` (`equi2pers`). ## Setup 1. `python -m venv venv && source venv/bin/activate && pip install -r requirements/qwen36_env.txt` 2. Serve the captioning model: see `qwen36_test/README.md` (`python qwen36_test/vllm_serve_wrapper.py serve Qwen/Qwen3.6-27B --host 0.0.0.0 --port 8000 ...`). 3. **Fix the hardcoded conditioning path.** `caption_qwen36_pano_perspective_pair.py` defines: ```python DEFAULT_PANO_CONDITIONING_PATH = ( "/home/work/.local/khs/Projects/PanoWorld/cosmos_predict2/_src/predict2/utils/pano_conditioning.py" ) ``` That absolute path won't exist on a new machine. Point it at the copy included in this bundle (`data/_5traj_4view_analysis/pano_conditioning.py`), e.g. edit the constant or symlink it into place before running. 4. Put an HF **write** token at `data/dataset_streaming_template/.hftoken` (gitignored, not included here) — used to upload results to `OUTPUT_REPO`. Override the input/output repos, `QWEN36_TEST_DIR`, `VLLM_BASE_URLS`, `VLLM_MODEL`, etc. via env vars (see the top of `stream_process_pinpan_train_syn_captions_only.py`). 5. Run: ```bash cd data/dataset_streaming_template python stream_process_pinpan_train_syn_captions_only.py ``` Source: `JointGen-backup` (khs2001d), `data/dataset_streaming_template/` and `qwen36_test/`.