Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Polus cellpose inference plugin#14

Open
Nicholas-Schaub wants to merge 47 commits intoPolusAI:masterfrom
Nicholas-Schaub:polus-cellpose-inference-plugin
Open

Polus cellpose inference plugin#14
Nicholas-Schaub wants to merge 47 commits intoPolusAI:masterfrom
Nicholas-Schaub:polus-cellpose-inference-plugin

Conversation

@Nicholas-Schaub
Copy link
Copy Markdown
Contributor

This PR updates the cellpose inference plugin to run using the Cellpose package. The previous iteration of the plugin used bits and pieces of an older version of Cellpose. Cellpose has since had multiple commits and upgrades, and trying to incorporate those commits into a custom codebase will be difficult in the long run.

This PR also resolves some issues when trying to run the container as a user.

Copy link
Copy Markdown

@hsidky hsidky left a comment

Choose a reason for hiding this comment

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

Looks good. Just a few minor adjustments to the readme mainly to bring it into consistency with the plugin.

tile_img = br[y_min:y_max, x_min:x_max, z:z + 1, 0, 0].squeeze()
img = cellpose.transforms.convert_image(tile_img,[0,0],False,True,False)

if diameter in [None,0]:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

you can just write if not diameter

bw.dtype = np.float32
bw.channel_names = ['cell_probability','x','y','labels']

bw._backend._init_writer()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why is it necessary to call the backend? Would be useful to know why this programming pattern was used with biowriter


| Name | Description | I/O | Type |
|---------------|-------------------------|--------|--------|
| `--diameter` | Diameter| Input | number |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

diameterMode and and filePattern missing, while cpretrainedModel is not in the plugin json manifest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants