How to Fix Outdated Reconstruction Pipeline ConfigurationLink
Goal:
Repair old pipeline.toml files so that reconstruction pipelines run without errors (e.g., "missing Undistorted task") and adopt the current set of parameters.
When to use this guideLink
- You have one or more
pipeline.tomlfiles generated by older versions of PlantDB/FSDB. - The files contain deprecated fields (
Undistorted, oldColmapsettings, etc.). - You want a reliable, repeat‑able way to update them without manually editing each file.
Overview of the fix processLink
- Parse each TOML file into a Python dictionary.
- Update the dictionary:
- Rename section
[Undistorted]to[Undistort]. - Refresh the
Colmapsection with modern defaults (MAD‑based QC, new thresholds, etc.). - Convert old
Masksdefinitions to the newmin_threshold/max_thresholdformat and set sensible defaults. - Replace the old
Voxelsconfiguration with the currentaveragingmethod. - Write the updated dictionary back to
pipeline.toml. - Create a timestamped backup (unless you disable this with
--no‑backup).
Step‑by‑step instructionsLink
1. Choose the appropriate modeLink
The CLI can work on three kinds of input:
| Mode | What you pass as PATH |
What happens |
|---|---|---|
| Single file | Path to a single pipeline.toml |
That file is fixed. |
| Directory | Path to a folder containing many *.toml files (excluding scan*.toml) |
Every matching file is fixed. |
| FSDB database | Path to an FSDB root directory (contains the marker file) | The script connects to the DB, selects scans, and fixes each scan’s pipeline.toml. |
2. Run the commandLink
First, open a terminal and navigate to the directory containing fix_pipeline_toml.py.
cd ~/Projects/plant-3d-vision/scripts/
Then apply one of the following solutions.
a. Fix a single file (default creates a backup)Link
python fix_pipeline_toml.py /data/FSDB/pipeline.toml
b. Fix every file in a directory without backupsLink
python fix_pipeline_toml.py /data/FSDB/configs --no-backup
c. Fix scans in an FSDB database, limiting to a date patternLink
python fix_pipeline_toml.py /data/FSDB \
--scan "2023-03-*" \
--user admin --password secret
d. Test against a database that does not require authenticationLink
python fix_pipeline_toml.py /data/FSDB --no-auth
3. Verify the resultsLink
- The script prints a line for each file it processes, e.g.
Fixing toml file /path/to/pipeline.toml.... - After it finishes, look for a new file named
pipeline_YYYY-MM-DD_HH‑MM‑SS.toml.baknext to each original file (unless you used--no-backup). - Open a corrected
pipeline.tomland confirm that: - Section
[Undistorted]is now[Undistort]. Colmapincludes the new fields (colmap_exe,qc_check,mad_factor, etc.).Maskshasmin_threshold,max_threshold,colorspace,dilation, andmethod.Voxelscontainsquery,method,voxel_size, and optionallybounding_box.
4. (Optional) Roll backLink
If anything looks wrong, restore the original file from its backup:
mv pipeline_2026-07-16_14-30-00.toml.bak pipeline.toml
Tips and common pitfallsLink
| Issue | Why it happens | Fix |
|---|---|---|
| No files processed | Path points to a directory that lacks pipeline.toml files or the DB marker file. |
Double‑check the path and file extensions. |
| Authentication error | --user/--password missing or wrong, and --no-auth not set. |
Provide correct credentials or add --no-auth for test databases. |
| Backup not created | You used --no-backup. |
Omit the flag if you want safety copies. |
| Unexpected TOML decode error | The file is malformed. | Inspect the file manually; the script will stop on that file and continue with others. |
Next stepsLink
After fixing the configuration, run your reconstruction pipeline as usual. If new errors appear, revisit the reference guide or open an issue in the project repository.