Here are some files for converting SAM models to make it available in the BioEngine (local deployment: https://github.com/oeway/bioengine/).
The tree strcture for the model repository is like this:
├── sam-backbone
│ ├── 1
| # pip install imjoy-rpc numpy qrcode[pil] | |
| # Code adopted from https://github.com/Khalil-Youssefi/qrcodeT/tree/master | |
| # Released under MIT license | |
| import qrcode | |
| import numpy as np | |
| def qrcode2text(img): | |
| bindata = np.array(img)[::10,::10] + 0 | |
| if bindata.shape[0] % 2 != 0: |
| import asyncio | |
| import threading | |
| from concurrent.futures import ThreadPoolExecutor | |
| from imjoy_rpc.hypha import connect_to_server | |
| import time | |
| class BackgroundServer: | |
| def __init__(self, server_url): | |
| self.loop = None |
| <docs lang="markdown"> | |
| [TODO: write documentation for this plugin.] | |
| </docs> | |
| <config lang="json"> | |
| { | |
| "name": "stlite Demo", | |
| "type": "window", | |
| "tags": [], | |
| "ui": "", |
| <docs lang="markdown"> | |
| [TODO: write documentation for this plugin.] | |
| </docs> | |
| <config lang="json"> | |
| { | |
| "name": "React UI Plugin", | |
| "type": "window", | |
| "tags": [], | |
| "ui": "", |
Here are some files for converting SAM models to make it available in the BioEngine (local deployment: https://github.com/oeway/bioengine/).
The tree strcture for the model repository is like this:
├── sam-backbone
│ ├── 1
| <docs> | |
| [TODO: write documentation for this plugin.] | |
| </docs> | |
| <config lang="json"> | |
| { | |
| "name": "ImageViewerServices", | |
| "type": "web-worker", | |
| "tags": [], | |
| "ui": "", |
| <docs lang="markdown"> | |
| [TODO: write documentation for this plugin.] | |
| </docs> | |
| <config lang="json"> | |
| { | |
| "name": "CodeInterpreter", | |
| "type": "window", | |
| "tags": [], | |
| "ui": "", |
| import sys, os | |
| import imagej | |
| import scyjava as sj | |
| import argparse | |
| import asyncio | |
| import traceback | |
| import numpy as np | |
| import xarray as xr | |
| from jpype import JOverride, JImplements | |
| from imjoy_rpc.hypha import connect_to_server |
Title: colab_websocket.js
Description: This JavaScript file implements a WebSocket client for Google Colab that facilitates communication between the Colab notebook and a WebSocket server. It includes buffer handling for binary data and a simple debug console for sending and receiving messages.
Title: colab_websocket_proxy.py