-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tiling #160
Tiling #160
Conversation
preprocess = [ | ||
{"spec": "ij.IJ::runMacroFile", | ||
"kwargs": macro} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
preprocess = [ | |
{"spec": "ij.IJ::runMacroFile", | |
"kwargs": macro} | |
] | |
preprocess = [{"spec": "ij.IJ::runMacroFile", "kwargs": macro}] |
def _get_deepimagej_config(export_folder, | ||
sample_inputs, sample_outputs, | ||
test_in_path, test_out_path, | ||
preprocessing): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
def _get_deepimagej_config(export_folder, | |
sample_inputs, sample_outputs, | |
test_in_path, test_out_path, | |
preprocessing): | |
def _get_deepimagej_config(export_folder, sample_inputs, sample_outputs, test_in_path, test_out_path, preprocessing): |
{ | ||
"name": in_path, | ||
"size": _get_size(in_path), | ||
"pixel_size": {"x": 1.0, "y": 1.0, "z": 1.0} | ||
} for in_path in sample_inputs | ||
], | ||
"outputs": [ | ||
{ | ||
"name": out_path, | ||
"type": "image", | ||
"size": _get_size(out_path) | ||
} for out_path in sample_outputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
{ | |
"name": in_path, | |
"size": _get_size(in_path), | |
"pixel_size": {"x": 1.0, "y": 1.0, "z": 1.0} | |
} for in_path in sample_inputs | |
], | |
"outputs": [ | |
{ | |
"name": out_path, | |
"type": "image", | |
"size": _get_size(out_path) | |
} for out_path in sample_outputs | |
{"name": in_path, "size": _get_size(in_path), "pixel_size": {"x": 1.0, "y": 1.0, "z": 1.0}} | |
for in_path in sample_inputs |
"size": _get_size(out_path) | ||
} for out_path in sample_outputs | ||
], | ||
"memory_peak": None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
"memory_peak": None, | |
"outputs": [{"name": out_path, "type": "image", "size": _get_size(out_path)} for out_path in sample_outputs], | |
"memory_peak": None, |
} for out_path in sample_outputs | ||
], | ||
"memory_peak": None, | ||
"runtime": None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
"runtime": None | |
"runtime": None, |
# other stuff deepimagej needs | ||
"pyramidal_model": False, | ||
"allow_tiling": True, | ||
"model_keys": None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
"model_keys": None | |
"model_keys": None, |
sample_in_path, sample_out_path = _write_sample_data(test_inputs, | ||
test_outputs, | ||
root) | ||
ij_config, attachments = _get_deepimagej_config(root, | ||
sample_in_path, sample_out_path, | ||
test_inputs, test_outputs, | ||
preprocessing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
sample_in_path, sample_out_path = _write_sample_data(test_inputs, | |
test_outputs, | |
root) | |
ij_config, attachments = _get_deepimagej_config(root, | |
sample_in_path, sample_out_path, | |
test_inputs, test_outputs, | |
preprocessing) | |
sample_in_path, sample_out_path = _write_sample_data(test_inputs, test_outputs, root) | |
ij_config, attachments = _get_deepimagej_config( | |
root, sample_in_path, sample_out_path, test_inputs, test_outputs, preprocessing | |
) |
kwargs.update({ | ||
"sample_inputs": [sample_in_path], | ||
"sample_outputs": [sample_out_path], | ||
"config": config | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
kwargs.update({ | |
"sample_inputs": [sample_in_path], | |
"sample_outputs": [sample_out_path], | |
"config": config | |
}) | |
kwargs.update({"sample_inputs": [sample_in_path], "sample_outputs": [sample_out_path], "config": config}) |
spec_path, | ||
out_path, | ||
weight_type, | ||
tensorflow_version=None, | ||
use_implicit_output_shape=False, | ||
for_deepimagej=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
spec_path, | |
out_path, | |
weight_type, | |
tensorflow_version=None, | |
use_implicit_output_shape=False, | |
for_deepimagej=True | |
spec_path, out_path, weight_type, tensorflow_version=None, use_implicit_output_shape=False, for_deepimagej=True |
predict_image( | ||
any_model, in_path, out_path, padding={"x": original_shape[0], "y": original_shape[1], "mode": "fixed"} | ||
model, in_path, out_path, padding={"x": original_shape[0], "y": original_shape[1], "mode": "fixed"} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶
predict_image( | |
any_model, in_path, out_path, padding={"x": original_shape[0], "y": original_shape[1], "mode": "fixed"} | |
model, in_path, out_path, padding={"x": original_shape[0], "y": original_shape[1], "mode": "fixed"} | |
) | |
predict_image(model, in_path, out_path, padding={"x": original_shape[0], "y": original_shape[1], "mode": "fixed"}) |
Fixes #157.
Pending #159 and bioimage-io/spec-bioimage-io#282.