dchaley / deepcell-imaging

Tools & guidance to scale DeepCell imaging on Google Cloud Batch
7 stars 2 forks source link

Define the command-line interface for each step #234

Closed dchaley closed 1 month ago

dchaley commented 1 month ago

In deepcell-imaging#233 we separated the Python predict function into 3 independent functions.

Now we need to define the command-line interface. Batch jobs don't call Python functions: they invoke Python scripts, with command-line arguments.

For example we need to pass a numpy path on cloud storage, rather than a numpy array in Python.

dchaley commented 1 month ago

Input / output per step:

Preprocessing

def preprocess_image(model_input_shape, image, image_mpp):

Input:

Output:

Infer

def infer(model, image, batch_size):

Input:

Output:

Postprocess

def postprocess(output_images, input_shape, compartment="whole-cell", whole_cell_kwargs={}, nuclear_kwargs={}):

Input:

Output:

dchaley commented 1 month ago

Interfaces:

Preprocess:

Input:

Output:

Infer

Input:

Output:

Postprocess

Input:

Output: