euler-preprocess 2.3.0__tar.gz → 3.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/PKG-INFO +289 -9
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/README.md +288 -8
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/output.py +22 -4
- euler_preprocess-3.1.0/euler_preprocess/fog/atmospheric_light.py +306 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/augmentations.py +4 -0
- euler_preprocess-3.1.0/euler_preprocess/fog/capture.py +4017 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/models.py +502 -4
- euler_preprocess-3.1.0/euler_preprocess/fog/pipeline.py +159 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/transform.py +454 -319
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess.egg-info/PKG-INFO +289 -9
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess.egg-info/SOURCES.txt +3 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/pyproject.toml +1 -1
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/tests/test_dcp_heuristic_airlight.py +2 -0
- euler_preprocess-3.1.0/tests/test_fog_aux_outputs.py +2201 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/tests/test_source_backed_output.py +11 -4
- euler_preprocess-2.3.0/tests/test_fog_aux_outputs.py +0 -643
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/__init__.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/cli.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/__init__.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/dataset.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/device.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/intrinsics.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/io.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/logging.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/noise.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/normalize.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/sampling.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/common/transform.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/__init__.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/airlight_from_sky.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/dcp_airlight.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/dcp_airlight_torch.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/dcp_heuristic_airlight.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/dcp_heuristic_airlight_torch.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/foggify.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/foggify_logging.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/fog/logging.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/radial/__init__.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/radial/transform.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/sky_depth/__init__.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess/sky_depth/transform.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess.egg-info/dependency_links.txt +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess.egg-info/entry_points.txt +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess.egg-info/requires.txt +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/euler_preprocess.egg-info/top_level.txt +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/setup.cfg +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/tests/test_airlight_fallback.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/tests/test_cli_sample_selection.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/tests/test_foggify_integration.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/tests/test_radial.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/tests/test_sky_depth.py +0 -0
- {euler_preprocess-2.3.0 → euler_preprocess-3.1.0}/tests/test_zip_output.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: euler-preprocess
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: Physics-based preprocessing (fog, etc.) for RGB+depth datasets
|
|
5
5
|
Requires-Python: >=3.9
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -98,7 +98,7 @@ starting at index 10 with stride 5.
|
|
|
98
98
|
|
|
99
99
|
| Transform | `modalities` | `hierarchical_modalities` |
|
|
100
100
|
|---|---|---|
|
|
101
|
-
| `fog` | `rgb`, `depth`, `semantic_segmentation` |
|
|
101
|
+
| `fog` | `rgb`, `depth`, `semantic_segmentation` | `intrinsics` when available; used for radial depth conversion and camera-profile optics |
|
|
102
102
|
| `sky-depth` | `depth`, `semantic_segmentation` | — |
|
|
103
103
|
| `radial` | `depth` | `intrinsics` |
|
|
104
104
|
|
|
@@ -150,6 +150,8 @@ Controls the fog simulation.
|
|
|
150
150
|
"contrast_threshold": 0.05,
|
|
151
151
|
"device": "cpu",
|
|
152
152
|
"gpu_batch_size": 4,
|
|
153
|
+
"capture": { "preset": "camera" },
|
|
154
|
+
"camera_profile": "dashcam",
|
|
153
155
|
"augmentations": { ... },
|
|
154
156
|
"selection": { ... },
|
|
155
157
|
"models": { ... }
|
|
@@ -165,8 +167,221 @@ Controls the fog simulation.
|
|
|
165
167
|
| `contrast_threshold` | Threshold *C_t* used in the visibility-to-attenuation conversion (default `0.05`). |
|
|
166
168
|
| `device` | `"cpu"`, `"cuda"`, `"mps"`, or `"gpu"` (alias for cuda). |
|
|
167
169
|
| `gpu_batch_size` | Batch size when running on GPU. Uniform-model samples are batched; heterogeneous samples are processed individually. |
|
|
170
|
+
| `capture` / `capture_artifacts` | Optional post-fog camera artifact pipeline. Omit it or set `{"stages": []}` for the legacy no-op path. Set `true`, `{"preset": "camera"}`, or a custom `stages` list to enable optics, raw sensor, ISP, and compression artifacts. |
|
|
171
|
+
| `camera_profile` | Optional named or inline camera profile whose stage defaults are merged into the capture stack before per-stage overrides. Built-ins are `"default"`, `"generic"`, `"dashcam"`, and `"low_light_fog"`. |
|
|
172
|
+
| `camera_profiles` | Optional map of project-specific named profiles. Use this for calibrated lens, sensor, ISP, and transport settings. |
|
|
173
|
+
| `scenario_profiles` | Optional top-level correlated condition sampler. Each sampled scenario can choose the fog model, override model parameters, select the airlight method, switch camera profile/settings, and force named capture-stage condition profiles. |
|
|
168
174
|
| `augmentations` | Optional stepped augmentation set. When present, every input sample produces every configured augmentation and uses the file-id hierarchy output layout described below. |
|
|
169
175
|
|
|
176
|
+
### Processing Pipeline
|
|
177
|
+
|
|
178
|
+
Fog generation is split into two phases:
|
|
179
|
+
|
|
180
|
+
1. Ideal scene rendering: physics-based fog and auxiliary `scattering_coefficient`
|
|
181
|
+
/ `atmospheric_light` maps are computed.
|
|
182
|
+
2. Capture artifacts: camera-specific effects are applied to the rendered RGB
|
|
183
|
+
only. Physical fog maps stay stable while the RGB output can receive
|
|
184
|
+
exposure shifts, lens blur, vignetting, raw sensor noise, Bayer/demosaicing
|
|
185
|
+
artifacts, ISP tone/gamma/sharpening, and JPEG/resize/quantization effects.
|
|
186
|
+
|
|
187
|
+
This keeps physical fog maps stable while making the RGB output extensible for
|
|
188
|
+
real-camera simulation.
|
|
189
|
+
|
|
190
|
+
### Capture Artifact Stack
|
|
191
|
+
|
|
192
|
+
Enable the recommended camera stack with:
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
"capture": { "preset": "camera" }
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
or equivalently:
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
"capture": true
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
For tighter control, provide explicit stages in camera order:
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
"camera_profiles": {
|
|
208
|
+
"real_drive_front": {
|
|
209
|
+
"optics": {
|
|
210
|
+
"lens_distortion": -0.012,
|
|
211
|
+
"vignetting_strength": 0.18,
|
|
212
|
+
"windshield_haze": {"enabled": true, "probability": 0.55}
|
|
213
|
+
},
|
|
214
|
+
"sensor": {
|
|
215
|
+
"bayer_pattern": "RGGB",
|
|
216
|
+
"iso": {"dist": "choice", "values": [200, 400, 800]},
|
|
217
|
+
"base_iso": 100,
|
|
218
|
+
"auto_exposure": {
|
|
219
|
+
"enabled": true,
|
|
220
|
+
"metering": "center_weighted",
|
|
221
|
+
"target_luminance": {"dist": "uniform", "min": 0.16, "max": 0.24},
|
|
222
|
+
"highlight_protection": 0.7,
|
|
223
|
+
"resolve_iso": true,
|
|
224
|
+
"max_iso": 1600
|
|
225
|
+
},
|
|
226
|
+
"full_well_electrons": [14000, 12000, 13000],
|
|
227
|
+
"read_noise_electrons": {"dist": "uniform", "min": 2.0, "max": 6.0},
|
|
228
|
+
"shadow_recovery_noise": {
|
|
229
|
+
"enabled": true,
|
|
230
|
+
"luminance_threshold": {"dist": "uniform", "min": 0.16, "max": 0.24},
|
|
231
|
+
"luma_sigma": {"dist": "uniform", "min": 0.0, "max": 0.001},
|
|
232
|
+
"chroma_sigma": {"dist": "uniform", "min": 0.012, "max": 0.028},
|
|
233
|
+
"chroma_mode": "balanced",
|
|
234
|
+
"red_chroma_gain": {"dist": "uniform", "min": 0.7, "max": 1.0},
|
|
235
|
+
"blue_chroma_gain": {"dist": "uniform", "min": 1.7, "max": 2.7},
|
|
236
|
+
"chroma_axis_correlation": {"dist": "uniform", "min": 0.05, "max": 0.25},
|
|
237
|
+
"chroma_spatial_sigma": 0.0,
|
|
238
|
+
"chroma_fine_fraction": 1.0,
|
|
239
|
+
"chroma_luminance_preservation": 1.0,
|
|
240
|
+
"black_noise_floor": 0.25,
|
|
241
|
+
"black_suppression_luminance": 0.03,
|
|
242
|
+
"black_suppression_softness": 0.08
|
|
243
|
+
},
|
|
244
|
+
"black_level": [0.003, 0.0035, 0.003],
|
|
245
|
+
"white_level": [1.0, 0.995, 1.0],
|
|
246
|
+
"adc_bit_depth": 12,
|
|
247
|
+
"post_demosaic_bit_depth": 12
|
|
248
|
+
},
|
|
249
|
+
"isp": {
|
|
250
|
+
"tone_map": "reinhard",
|
|
251
|
+
"gamma": "srgb",
|
|
252
|
+
"denoise_sigma": 0.2,
|
|
253
|
+
"sharpen_amount": 0.2,
|
|
254
|
+
"saturation": 0.9
|
|
255
|
+
},
|
|
256
|
+
"transport": {
|
|
257
|
+
"jpeg": {"enabled": true, "quality": {"dist": "uniform", "min": 65, "max": 92}},
|
|
258
|
+
"bit_depth": 8
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"camera_profile": "real_drive_front",
|
|
263
|
+
"capture": {
|
|
264
|
+
"stages": [
|
|
265
|
+
{
|
|
266
|
+
"type": "optics",
|
|
267
|
+
"blur_sigma": {"dist": "uniform", "min": 0.2, "max": 0.8},
|
|
268
|
+
"vignetting_strength": 0.15,
|
|
269
|
+
"windshield_haze": {"enabled": true, "probability": 0.4},
|
|
270
|
+
"droplets": {"enabled": false}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "sensor",
|
|
274
|
+
"input_space": "srgb",
|
|
275
|
+
"exposure_gain": {"dist": "uniform", "min": 0.85, "max": 1.2},
|
|
276
|
+
"row_noise_sigma": 0.003
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"type": "isp",
|
|
280
|
+
"tone_map": "reinhard",
|
|
281
|
+
"gamma": "srgb",
|
|
282
|
+
"denoise_sigma": 0.2,
|
|
283
|
+
"sharpen_amount": 0.2,
|
|
284
|
+
"saturation": 0.9
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"type": "transport",
|
|
288
|
+
"jpeg": {"enabled": true, "quality": {"dist": "uniform", "min": 65, "max": 92}},
|
|
289
|
+
"bit_depth": 8
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Supported stage types:
|
|
296
|
+
|
|
297
|
+
| Stage | Main effects |
|
|
298
|
+
|---|---|
|
|
299
|
+
| `optics` | Defocus/MTF blur, motion blur, bloom, veiling glare, vignetting, chromatic aberration, lens distortion, windshield haze, optional droplets. |
|
|
300
|
+
| `sensor` | Image-driven or sampled exposure, white balance, camera matrix, Bayer mosaic, shot/read noise, fixed-pattern noise, row/column banding, shadow-local recovery noise, hot/dead pixels, bilinear demosaic. |
|
|
301
|
+
| `isp` | Denoising, color correction, tone mapping, sRGB/gamma, local contrast, sharpening halos, saturation shifts. |
|
|
302
|
+
| `transport` | Crop/resize, bit-depth quantization, JPEG round-trip compression. |
|
|
303
|
+
| `exposure` | Lightweight standalone exposure and white-balance stage for simple custom chains. |
|
|
304
|
+
|
|
305
|
+
Set `sensor.auto_exposure.enabled` to meter the rendered image before raw sensor
|
|
306
|
+
sampling. `target_luminance`, `metering`, `highlight_*`, and gain bounds choose
|
|
307
|
+
the exposure; `resolve_iso` can raise ISO from the metering pressure, dark pixel
|
|
308
|
+
fraction, and fog opacity. When auto exposure is enabled, `exposure_gain` still
|
|
309
|
+
applies as scenario-specific exposure compensation.
|
|
310
|
+
|
|
311
|
+
Set `sensor.shadow_recovery_noise.enabled` to add extra post-demosaic luma and
|
|
312
|
+
chroma corruption only where the pre-exposure rendered luminance was low. This
|
|
313
|
+
is useful for reducing broad global grain while keeping lifted shadows visibly
|
|
314
|
+
noisy. For dark high-ISO scenes, keep `luma_sigma` much lower than
|
|
315
|
+
`chroma_sigma`, use `chroma_mode: "balanced"`, and leave
|
|
316
|
+
`chroma_luminance_preservation` near `1.0`; this makes the local corruption read
|
|
317
|
+
as color noise instead of black luma speckles. `red_chroma_gain`,
|
|
318
|
+
`blue_chroma_gain`, and `chroma_axis_correlation` can match camera-specific
|
|
319
|
+
color noise, including blue/purple-biased high-ISO noise. Keep
|
|
320
|
+
`chroma_spatial_sigma` near `0` and avoid chroma subsampling when the target
|
|
321
|
+
noise is fine-grained rather than blocky. `black_noise_floor` with
|
|
322
|
+
`black_suppression_luminance`/`black_suppression_softness` reduces the extra
|
|
323
|
+
noise in near-clipped black regions, so the strongest visible noise sits in
|
|
324
|
+
dim-but-readable shadows.
|
|
325
|
+
|
|
326
|
+
Any stage can define `condition_profiles` to sample coherent per-image settings
|
|
327
|
+
before the stage runs. This is useful for exposure states where ISO, exposure
|
|
328
|
+
gain, read noise, banding, and dark/fog noise modulation should move together:
|
|
329
|
+
|
|
330
|
+
```json
|
|
331
|
+
{
|
|
332
|
+
"type": "sensor",
|
|
333
|
+
"condition_profiles": [
|
|
334
|
+
{"name": "clean_daylight", "weight": 0.25, "exposure_gain": 1.0, "iso": 100},
|
|
335
|
+
{"name": "underexposed_noisy", "weight": 0.25, "exposure_gain": 0.65, "iso": 1600}
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Top-level `scenario_profiles` sample one latent scene/camera condition before
|
|
341
|
+
rendering. The selected scenario is merged over the root config, so it can drive
|
|
342
|
+
fog density, atmospheric light, camera profile, capture-stage overrides, ISP, and
|
|
343
|
+
compression together:
|
|
344
|
+
|
|
345
|
+
```json
|
|
346
|
+
"scenario_profiles": [
|
|
347
|
+
{
|
|
348
|
+
"name": "clean_low_noise_haze",
|
|
349
|
+
"weight": 0.22,
|
|
350
|
+
"model": "heterogeneous_k_ls",
|
|
351
|
+
"airlight_method": "dcp_heuristic",
|
|
352
|
+
"models": {
|
|
353
|
+
"heterogeneous_k_ls": {
|
|
354
|
+
"visibility_m": {"dist": "uniform", "min": 60.0, "max": 130.0}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"capture_overrides": {
|
|
358
|
+
"sensor": {"condition_profile": "clean_daylight"},
|
|
359
|
+
"isp": {"denoise_sigma": {"dist": "uniform", "min": 0.08, "max": 0.32}}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "underexposed_dense_gloom",
|
|
364
|
+
"weight": 0.25,
|
|
365
|
+
"model": "heterogeneous_k_ls",
|
|
366
|
+
"airlight_method": "dcp_heuristic",
|
|
367
|
+
"models": {
|
|
368
|
+
"heterogeneous_k_ls": {
|
|
369
|
+
"visibility_m": {"dist": "uniform", "min": 18.0, "max": 55.0}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"capture_overrides": {
|
|
373
|
+
"sensor": {"condition_profile": "underexposed_noisy"},
|
|
374
|
+
"transport": {"jpeg": {"quality": {"dist": "uniform", "min": 54, "max": 78}}}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
`capture_overrides` is merged after camera-profile and stage settings. Use
|
|
381
|
+
`condition_profile` to force one named profile from a stage's
|
|
382
|
+
`condition_profiles`; if omitted, the stage continues sampling its own profile
|
|
383
|
+
weights locally.
|
|
384
|
+
|
|
170
385
|
### Fog Model
|
|
171
386
|
|
|
172
387
|
The core equation is the **Koschmieder model** (atmospheric scattering):
|
|
@@ -224,6 +439,39 @@ When `airlight` is `"dcp_heuristic"`, you can optionally add:
|
|
|
224
439
|
- `white_bias + cool_bias` must be `<= 1`.
|
|
225
440
|
- The tint bias preserves the estimated airlight luminance, so it shifts colour without silently changing fog density.
|
|
226
441
|
|
|
442
|
+
### Airlight Intensity Dampening
|
|
443
|
+
|
|
444
|
+
Estimated airlight is dampened by default as fog density increases. This keeps
|
|
445
|
+
strong fog closer to the low, grey lighting seen in real in-car fog footage
|
|
446
|
+
instead of letting DCP-style estimates wash dense fog toward white.
|
|
447
|
+
|
|
448
|
+
Each fog model can override the dampening curve:
|
|
449
|
+
|
|
450
|
+
```json
|
|
451
|
+
"airlight_dampening": {
|
|
452
|
+
"enabled": true,
|
|
453
|
+
"apply_to": "estimated",
|
|
454
|
+
"reference_visibility_m": 80.0,
|
|
455
|
+
"min_factor": 0.45,
|
|
456
|
+
"max_factor": 1.0,
|
|
457
|
+
"strength": 1.0
|
|
458
|
+
}
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
The factor is:
|
|
462
|
+
`min_factor + (max_factor - min_factor) / (1 + strength * beta / reference_beta)`.
|
|
463
|
+
`reference_beta` is either `reference_scattering_coefficient` /
|
|
464
|
+
`reference_beta`, or it is derived from `reference_visibility_m` using the
|
|
465
|
+
model's contrast threshold. The default applies only when `atmospheric_light`
|
|
466
|
+
uses an estimated airlight method (`"from_sky"`, `"dcp"`, or
|
|
467
|
+
`"dcp_heuristic"`); literal RGB `atmospheric_light` values stay exact unless
|
|
468
|
+
`apply_to` is set to `"all"`. Set `"enabled": false` or `apply_to: "none"` to
|
|
469
|
+
preserve the previous undampened behavior.
|
|
470
|
+
|
|
471
|
+
For `heterogeneous_ls` and `heterogeneous_k_ls`, the Perlin atmospheric-light
|
|
472
|
+
field is sampled around the dampened base airlight, so the spatial variation
|
|
473
|
+
does not reintroduce the old over-illuminated look.
|
|
474
|
+
|
|
227
475
|
### Model Selection
|
|
228
476
|
|
|
229
477
|
Each image is assigned a fog model via the `selection` block:
|
|
@@ -264,7 +512,10 @@ Each model specifies a `visibility_m` distribution from which a visibility dista
|
|
|
264
512
|
| `lognormal` | `mean`, `sigma`, optional `min`/`max` | Log-normal. |
|
|
265
513
|
| `choice` | `values`, optional `weights` | Discrete weighted choice. |
|
|
266
514
|
|
|
267
|
-
The sampled visibility *V* is converted to the attenuation coefficient:
|
|
515
|
+
The sampled visibility *V* is converted to the attenuation coefficient:
|
|
516
|
+
**k = -ln(C_t) / V**. This happens once per output image. For
|
|
517
|
+
`heterogeneous_k` and `heterogeneous_k_ls`, that sampled value is the base
|
|
518
|
+
coefficient that is then spatially modulated by the noise field.
|
|
268
519
|
|
|
269
520
|
### Stepped Augmentations
|
|
270
521
|
|
|
@@ -355,7 +606,31 @@ The noise field (values in [0, 1]) is mapped to a factor field:
|
|
|
355
606
|
`contrast < 1` compresses the noise around 0.5 before this mapping, avoiding
|
|
356
607
|
extreme local fog density. When `normalize_to_mean` is `true`, the factor field
|
|
357
608
|
is rescaled so its spatial mean equals 1.0, preserving the overall fog density
|
|
358
|
-
while introducing spatial variation.
|
|
609
|
+
while introducing spatial variation. In other words, with heterogeneous `k`:
|
|
610
|
+
`k(x) = k_sampled * factor(x)`. If `visibility_m` / MOR was sampled from a
|
|
611
|
+
distribution, `k_sampled` is the coefficient derived from that one sampled MOR.
|
|
612
|
+
With `normalize_to_mean: true`, the arithmetic mean of the per-pixel `k` map
|
|
613
|
+
equals `k_sampled`; the median is not forced to match. With
|
|
614
|
+
`normalize_to_mean: false`, the map mean shifts by the mean of the factor field.
|
|
615
|
+
|
|
616
|
+
For `heterogeneous_ls` / `heterogeneous_k_ls`, `ls_hetero` can also include a
|
|
617
|
+
weak view-direction illumination prior. This modulates the atmospheric-light
|
|
618
|
+
field itself, so the rendered effect is still gated by fog transmittance:
|
|
619
|
+
|
|
620
|
+
```json
|
|
621
|
+
"ls_hetero": {
|
|
622
|
+
"ls_gradient": {
|
|
623
|
+
"enabled": true,
|
|
624
|
+
"probability": 0.65,
|
|
625
|
+
"axis": "vertical",
|
|
626
|
+
"top_factor": {"dist": "uniform", "min": 1.03, "max": 1.14},
|
|
627
|
+
"bottom_factor": {"dist": "uniform", "min": 0.88, "max": 0.99},
|
|
628
|
+
"gamma": {"dist": "uniform", "min": 0.85, "max": 1.6},
|
|
629
|
+
"normalize_to_mean": true,
|
|
630
|
+
"fog_opacity_weight": 0.65
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
```
|
|
359
634
|
|
|
360
635
|
| Parameter | Effect |
|
|
361
636
|
|---|---|
|
|
@@ -366,16 +641,19 @@ while introducing spatial variation.
|
|
|
366
641
|
| `octaves` / `lacunarity` / `max_scale` | Control how many increasingly broad Perlin components are mixed. |
|
|
367
642
|
| `contrast` | Compress or expand the Perlin range before mapping to factors. Values below 1 are recommended. |
|
|
368
643
|
| `smooth_sigma` / `smooth_sigma_fraction` | Optional final Gaussian blur in pixels or as a fraction of the shorter image side. |
|
|
644
|
+
| `ls_gradient` | Optional `L_s` top-to-bottom or left-to-right factor field. Keep it weak and probabilistic to avoid a deterministic image-position shortcut. |
|
|
369
645
|
|
|
370
646
|
### Fog Output
|
|
371
647
|
|
|
372
648
|
CLI runs write a source-backed RGB dataset. The output keeps the source RGB
|
|
373
|
-
dataset's relative paths, basenames, extensions, and
|
|
374
|
-
|
|
649
|
+
dataset's relative paths, basenames, extensions, and ds-crawler metadata so the
|
|
650
|
+
result stays loadable by `euler-loading`:
|
|
375
651
|
|
|
376
652
|
```
|
|
377
653
|
<output_path>/
|
|
378
|
-
.ds_crawler/
|
|
654
|
+
.ds_crawler/dataset-head.json
|
|
655
|
+
.ds_crawler/ds-crawler.json
|
|
656
|
+
.ds_crawler/index.json
|
|
379
657
|
Scene01/
|
|
380
658
|
Camera_0/
|
|
381
659
|
00000.png
|
|
@@ -390,7 +668,9 @@ the source file id instead:
|
|
|
390
668
|
|
|
391
669
|
```
|
|
392
670
|
<output_path>/
|
|
393
|
-
.ds_crawler/
|
|
671
|
+
.ds_crawler/dataset-head.json
|
|
672
|
+
.ds_crawler/ds-crawler.json
|
|
673
|
+
.ds_crawler/index.json
|
|
394
674
|
Scene01/
|
|
395
675
|
Camera_0/
|
|
396
676
|
00000/
|
|
@@ -446,6 +726,6 @@ No special parameters are required. The transform reads intrinsics from the `int
|
|
|
446
726
|
### Radial Output
|
|
447
727
|
|
|
448
728
|
CLI runs write a source-backed depth dataset mirroring the input depth
|
|
449
|
-
modality's layout and writer metadata. The emitted `
|
|
729
|
+
modality's layout and writer metadata. The emitted `index.json` also flips
|
|
450
730
|
`meta.radial_depth` to `true`. Standalone/direct `RadialTransform(...)` usage
|
|
451
731
|
keeps the legacy `.npy` output behavior.
|