Skip to content

Instantly share code, notes, and snippets.

@Nanguage
Last active January 15, 2024 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nanguage/3c97a8fd69c18a772193f0a4a3ca60fe to your computer and use it in GitHub Desktop.
Save Nanguage/3c97a8fd69c18a772193f0a4a3ca60fe to your computer and use it in GitHub Desktop.
import micropip
await micropip.install("kaibu-utils")
import pyodide_http
pyodide_http.patch_all()
from kaibu_utils import fetch_image
image = await fetch_image('https://zenodo.org/api/records/6647674/files/sample_input_0.tif/content')
ij = await api.createWindow(src = "https://ij.imjoy.io/", name="ImageJ.JS")
client = await api.createWindow("https://bioimage-io.github.io/bioengine-web-client/")
await client.waitForReady()
await client.setModel("Cellpose")
await ij.viewImage(image)
await client.setParameters({ "diameter": 10, "model_type": "cyto", "do_3D": True })
await client.runModel()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment