Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Tiling #160

wants to merge 3 commits into from

Conversation

constantinpape
Copy link
Contributor

Comment on lines +311 to +314
preprocess = [
{"spec": "ij.IJ::runMacroFile",
"kwargs": macro}
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
preprocess = [
{"spec": "ij.IJ::runMacroFile",
"kwargs": macro}
]
preprocess = [{"spec": "ij.IJ::runMacroFile", "kwargs": macro}]

Comment on lines +319 to +322
def _get_deepimagej_config(export_folder,
sample_inputs, sample_outputs,
test_in_path, test_out_path,
preprocessing):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
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):

Comment on lines +349 to +360
{
"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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
{
"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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
"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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
"runtime": None
"runtime": None,

# other stuff deepimagej needs
"pyramidal_model": False,
"allow_tiling": True,
"model_keys": None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
"model_keys": None
"model_keys": None,

Comment on lines +610 to +616
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
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
)

Comment on lines +618 to +622
kwargs.update({
"sample_inputs": [sample_in_path],
"sample_outputs": [sample_out_path],
"config": config
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
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})

Comment on lines +7 to +12
spec_path,
out_path,
weight_type,
tensorflow_version=None,
use_implicit_output_shape=False,
for_deepimagej=True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
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

Comment on lines 85 to 87
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"}
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blackfmt] reported by reviewdog 🐶

Suggested change
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"})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tiling assumes channel first input
1 participant