fishdist.stack_prediction
predict_3D_stack_from_2D_model(deepTA, stack, apply_normalization_to_entire_stack_before=True, rotation_along_Z_axis_pattern=None, **predict_parameters)
Predict a 3D image stack slice-by-slice using a 2D model.
This function applies a 2D DeepTA model to each Z-slice of a 3D stack, optionally normalizing the stack globally, applying rotations along Z, and returning the combined predicted 3D stack.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Example
predicted_stack = predict_3D_stack_from_2D_model(deepTA_model, 'stack.tif', apply_normalization_to_entire_stack_before=True)
predict_single_image(deepTA, input_file, **predict_parameters)
Run prediction on a single image using a DeepTA model.
This function prepares a temporary image file for compatibility with DeepTA's predict_generator API, generates predictions for the input image, and returns the results.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Example
results = predict_single_image(deepTA_model, 'image.tif', clip_by_frequency=0.01)
print(results)