Repository navigation
Conversation
Add MorphEm inference tool: config, inference script, pixi env, and Dockerfile that bakes model weights into the image.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Adds the MorphEm algorithm in Bilayers: a self-supervised ViT-Small feature extractor for single-cell microscopy images (CHAMMI benchmark).
Includes:
Dockerfile:multi-stage build, pixi env (Python 3.11 CPU). MorphEm weights baked into the image.morphem_inference.py: CLI wrapper. One file = one object; Requires to input extra info:--concatenated: whether the image is a horizontal CHAMMI-75(H, W*C)strip.--num_channels: number of image channels.each object split into num_channels planes. Applies the model card's preprocessing, runs each channel through in
batch_sizechunks, and writes a feature table (O objects × num_channels·384) as.pklor.csv.config.yaml: Bilayers config describing I/O and params (--num_channels,--batch_size,--concatenated,--output_format) for the UI and CLI, matching the schema.pixi.toml+pixi.lock: define and pin the environment (Python 3.11, pytorch-cpu, etc.).Notes
compileallregex skips 3.12+ intrinsics files (py31x_intrinsics.py) that a Python 3.11 interpreter can't byte-compile.fastapi==0.112.2/starlette==0.38.2alongside theGradio 4.44.1helper libs in Gradio.Dockerfile.