
Run the gray leaf spot pipeline — simplified entry point
Source:R/python_engine.R
grayleafspot_run.RdA streamlined wrapper around the SmallUNet pipeline designed for everyday
use. Unlike grayleafspot_analyze(), this function:
Usage
grayleafspot_run(
input_dir,
output_dir,
run_name = "run",
engine_model = "localunet",
plate_diameter_mm = 90
)Arguments
- input_dir
Character. Path to the folder containing plate images.
- output_dir
Character. Directory to write outputs into (created if absent).
- run_name
Character. Human-readable label appended to the timestamped run folder name (default
"run").- engine_model
Character. Must be
"localunet"(the only supported pipeline).- plate_diameter_mm
Numeric. Known petri dish diameter in mm (default 90).
Value
A named list parsed directly from the pipeline JSON output,
containing $results (per-image records) and $run (manifest metadata).
Details
reads the Python interpreter from
GRAYLEAFSPOTR_PYTHON(fail-fast with a clear message if it is not set),creates
output_dirautomatically if it does not exist,returns the raw parsed JSON payload so you can work with results directly.
One-time Python setup
Set the environment variable once per session, or add it to ~/.Rprofile
so it is loaded automatically every time R starts:
# In ~/.Rprofile (open with file.edit("~/.Rprofile"))
Sys.setenv(GRAYLEAFSPOTR_PYTHON = "/path/to/rvenv_arm_311/bin/python")See also
grayleafspot_analyze() for the full-featured interface that
returns a grayleafspot_run S3 object with tidy plotting helpers.