Сформирован пресет для отрисовки
This commit is contained in:
@@ -35,6 +35,15 @@
|
||||
- `strategies`: конкретные стадии пайплайна (preprocess, transform, registration, reconstruction).
|
||||
- `factories`: сборка `PipelineExecutor` из plugin-id и профиля.
|
||||
|
||||
## Этап 1 (backend-first, без CLI)
|
||||
|
||||
- Парсинг и применение `defaults` параметров стадий вынесены из UI в `core`:
|
||||
`src/core/pipeline_stage_defaults.h` и `src/core/pipeline_stage_defaults.cpp`.
|
||||
- `MainWindow` больше не содержит backend-логику разбора параметров, а вызывает
|
||||
`core::applyStageDefaultsToConfig(...)`.
|
||||
- Это позволяет использовать один и тот же backend API из GUI сейчас и из будущего
|
||||
CLI на этапе 2 без дублирования логики.
|
||||
|
||||
## Pipeline Dashboard: UX и анализ цепочки
|
||||
|
||||
В dashboard реализованы инструменты для пошаговой настройки всей pipeline-цепочки (preprocess + reconstruction):
|
||||
@@ -103,6 +112,98 @@ make
|
||||
|
||||
При успешном запуске runner печатает `Smoke tests passed.` и завершаетcя с кодом `0`.
|
||||
|
||||
## CLI режим (этап 2)
|
||||
|
||||
Для headless-прогона без GUI добавлен CLI-режим в основном бинарнике через `--cli`.
|
||||
|
||||
Пример:
|
||||
|
||||
```bash
|
||||
cd /mnt/d/yakupov/Projects/DotsToSirface/build-wsl
|
||||
qmake ../DotsToSirface.pro 'DEFINES+=PCL_ENABLED'
|
||||
make -j4
|
||||
./DotsToSirface --cli \
|
||||
--input /mnt/d/path/to/cloud.xyz \
|
||||
--profile desktop_debug \
|
||||
--preprocess pcl_remove_nan,pcl_voxel_grid,pcl_statistical_outlier \
|
||||
--reconstruction pcl_greedy_triangulation \
|
||||
--stage-default pcl_voxel_grid:leaf=0.03 \
|
||||
--stage-default pcl_greedy_triangulation:searchRadius=0.08,mu=2.5,maxNearest=100,maxSurfaceAngle=0.8 \
|
||||
--output-json /mnt/d/path/to/result.json
|
||||
```
|
||||
|
||||
CLI печатает краткую сводку по метрикам (`input`, `after preprocess`, `triangles`, `reconstruction ms`).
|
||||
|
||||
### JSON-конфиг для CLI (этап 2.1)
|
||||
|
||||
Чтобы не передавать длинную команду, можно задать пайплайн через `--config-json`.
|
||||
|
||||
Пример `pipeline_config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"profile": "desktop_debug",
|
||||
"preprocessPlugins": ["pcl_remove_nan", "pcl_voxel_grid", "pcl_statistical_outlier"],
|
||||
"reconstructionPlugin": "pcl_greedy_triangulation",
|
||||
"stageDefaults": {
|
||||
"pcl_voxel_grid": "leaf=0.03",
|
||||
"pcl_greedy_triangulation": "searchRadius=0.08,mu=2.5,maxNearest=100,maxSurfaceAngle=0.8"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Запуск:
|
||||
|
||||
```bash
|
||||
./DotsToSirface --cli --input /mnt/d/path/to/cloud.xyz --config-json /mnt/d/path/to/pipeline_config.json
|
||||
```
|
||||
|
||||
Если одновременно переданы `--config-json` и обычные CLI-флаги (`--preprocess`, `--reconstruction`, `--stage-default`), флаги командной строки имеют приоритет.
|
||||
|
||||
### Autotune Grid Search (этап 3)
|
||||
|
||||
Для подбора параметров с целью уменьшения дыр на поверхности добавлен режим:
|
||||
`--autotune-config`.
|
||||
|
||||
Пример `autotune_config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"baseConfigJson": "/mnt/d/path/to/pipeline_config.json",
|
||||
"searchSpace": {
|
||||
"pclVoxelLeafSize": [0.02, 0.03, 0.04],
|
||||
"pclGreedySearchRadius": [0.06, 0.08, 0.10],
|
||||
"neighborRadiusScale": [2.5, 3.0]
|
||||
},
|
||||
"objective": {
|
||||
"connectivityWeight": 0.45,
|
||||
"coverageWeight": 0.45,
|
||||
"speedPenaltyWeight": 0.10
|
||||
},
|
||||
"limits": {
|
||||
"maxCandidates": 20,
|
||||
"topK": 5
|
||||
},
|
||||
"output": {
|
||||
"resultJsonPath": "/mnt/d/path/to/autotune_result.json"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Запуск:
|
||||
|
||||
```bash
|
||||
./DotsToSirface --cli \
|
||||
--input /mnt/d/path/to/cloud.xyz \
|
||||
--autotune-config /mnt/d/path/to/autotune_config.json
|
||||
```
|
||||
|
||||
Опционально можно переопределить путь результата через `--output-json`.
|
||||
|
||||
Файл `autotune_result.json` теперь содержит поля `title` и `stages` в формате GUI-пресета,
|
||||
поэтому его можно загрузить напрямую кнопкой `Загрузить пресет`.
|
||||
Дополнительно рядом сохраняется `*_best_preset.json` (чистый preset-JSON).
|
||||
|
||||
## Демо
|
||||
|
||||
При запуске приложение:
|
||||
|
||||
Reference in New Issue
Block a user