romi / plant-3d-vision

Reconstruct a 3D digital twin of the plant from pictures (RGB images) and quantify its phyllotaxis.
https://docs.romi-project.eu/plant_imager/
GNU Lesser General Public License v3.0
5 stars 1 forks source link

Feature/print task info close #88 #86

Closed jlegrand62 closed 4 years ago

jlegrand62 commented 4 years ago

A small executable to print quick summaries about tasks.

Helpful to visually inspect the output of a task.

jlegrand62 commented 4 years ago

To quickly test it on all ROMI tasks (change db_path):

import subprocess
from romiscan.modules import TASKS
db_path = "/data/ROMI/DB/2018-12-17_17-05-35"
for task in TASKS:
    if task in ["Clean", "Visualization"]:
        continue
    subprocess.run(["print_task_info.py", task, db_path])
    print("\n")

Note that you might need to redo a pip install -e . in romiscan...

jlegrand62 commented 4 years ago

Example for PointCloud task:

# -- Summary of task PointCloud:
# - Used TOML configuration:
{'level_set_value': 1, 'background_prior': 0.5, 'log': False}

# - Generated metadata:
Found more than one JSON metadata file associated to task 'PointCloud' in dataset '/data/ROMI/DB/2018-12-17_17-05-35':
 - PointCloud_1_0_0_5_False_44178d9e01.json
 - PointCloud_0_5_0_1_False_c22050bff7.json
 - PointCloud__200_0_1_0_False_4ce2e46446.json
 - PointCloud_0_5_0_01_False_ba5828b9d5.json
 - PointCloud_0_5_1_0_False_ad4f0fe0b4.json
The most recent one is 'PointCloud_0_5_1_0_False_ad4f0fe0b4.json'
PointCloud_0_5_1_0_False_ad4f0fe0b4 task recorded the following parameters metadata:
{
  "task_params": {
    "background_prior": 0.5,
    "level_set_value": 1.0,
    "log": "False",
    "min_contrast": 10.0,
    "min_score": 0.2,
    "output_file_id": "out",
    "scan_id": "",
    "upstream_task": "Voxels"
  }
}

# - Task outputs:
Found PLY file for task 'PointCloud_0_5_1_0_False_ad4f0fe0b4':
 - 184504 points
 - pointcloud dimensions (x, y, z): [ 56.0470089   58.1141032  237.00560593]