MIRAGE
Efficient and scalable image registration (alignment) for multiplexed imaging data. Currently only available for GPU.
Installation
git clone https://github.com/dpeerlab/MIRAGE.git
cd mirage
pip install -e .
Example
Also, check out the example in tests/quickstart.ipynb:
Before alignment:
After alignment:
# load package
import mirage
# Load images
image = mirage.tl.get_data("sample2_image.tiff")
reference = mirage.tl.get_data("sample2_reference.tiff")
# Images must be 2D numpy arrays (grayscale only) and scaled to 0-1.
# Initialise model
mirage_model = mirage.MIRAGE(
images=image,
references=reference,
bin_mask=bin_mask,
pad=12,
offset=12,
num_neurons=196, # more for larger images
num_layers=2, # more for larger images
pool=1,
loss="SSIM"
)
# Train model
mirage_model.train(batch_size=256, num_steps=256, lr__sched=True, LR=0.005)
# Apply transformation
mirage_model.compute_transform()
image_aligned = mirage_model.apply_transform(image)
# Inspect results pre/post alignment of a smale mesh
mesh = mirage.tl.Mesh(x=80, y=160, pad=35)
mirage.pl.plot_before_after(reference, image, image_aligned, mesh=mesh)
Metadata
Release files for cellmirage 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cellmirage-0.1.2.tar.gz | 2.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cellmirage-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 MB
Release files / cellmirage-0.1.2.tar.gz
| Download URL | cellmirage-0.1.2.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06a0fb712cf8a9a504a2c50eec9d981b07eb6a432f8c934b900c2ea9e2b379d6
|
|
BLAKE2b-256 checksum How to use checksums |
24ad9f6a6965cc405b88c0d5db9a5af9d973f184763ffb98e62009fed06db62a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.9.13 Darwin/22.4.0
|
Release files / cellmirage-0.1.2-py3-none-any.whl
| Download URL | cellmirage-0.1.2-py3-none-any.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8f155869df5076686796b6d94c808c199a9833e49d80b3dde45107ec365950d
|
|
BLAKE2b-256 checksum How to use checksums |
92e75be86791b4b0014517fdfea9d2b301b2afa9020c31f6ac1c7b1711d3d0bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.9.13 Darwin/22.4.0
|