WISRD Research & Engineering Journal

import plantcv.parallel # Create a WorkflowConfig instance config = plantcv.parallel.WorkflowConfig() config.save_config(config_file="Batch_Processing.json") # Change configuration values directly in Python as needed. At a minimum you must specify input_dir, json, filename_metadata, workflow. config.input_dir = "./Test Photos"

config.json = "./Test_Photos_Results.json" config.filename_metadata = ["timestamp"] config.workflow = "INTERNSHIP-8.4.21.py" config.validate_config()

The built-in workflow config will save the file in a format called “json” that is a hierarchical data format. The “json” file is pre-populated, but the input directory, output file, and metadata terms must be set. For my specific project, the following parameters were used: "input_dir": "./Test Photos",

"json": "./Test_Photos_Results.json", "filename_metadata": ["timestamp"], "workflow": "INTERNSHIP-8.4.21.py", "img_outdir": "./output_images", "include_all_subdirs": true, "tmp_dir": null,

"start_date": null, "end_date": null, "imgformat": "jpg", "delimiter": "_", "metadata_filters": {}, "timestampformat": "%Y-%m-%d %H-%M-%S", Use the command line to run the batch: plantcv-workflow.py –config name.json

We tried this on a PC as well, and a message popped up to “Look for an app in the Microsoft Store.” A post on stackoverflow.com suspects that it is because there are two python.exe and cmd locates the alias python.exe first. The recommendation was to turn off the aliases for python in “Manage app execution aliases'' and reinstall Python from the Microsoft Store. A small data set of four photos was sampled. PlantCV should return the number of pixels within the objects. Use the command line to run the batch. My specific command was: plantcv-workflow.py --config Batch_Processing.json The output file in json format is a single string of text that is not meant to be readable (Figure 46) and must be converted to a csv file.

61

Made with FlippingBook Online newsletter creator