Efficient and scalable image registration (alignment) for multiplexed imaging data
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cellmirage-0.1.2.tar.gz
(2.9 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cellmirage-0.1.2.tar.gz.
File metadata
- Download URL: cellmirage-0.1.2.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.9.13 Darwin/22.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06a0fb712cf8a9a504a2c50eec9d981b07eb6a432f8c934b900c2ea9e2b379d6
|
|
| MD5 |
28983468eb1a5ba604c9582b1cdbfb96
|
|
| BLAKE2b-256 |
24ad9f6a6965cc405b88c0d5db9a5af9d973f184763ffb98e62009fed06db62a
|
File details
Details for the file cellmirage-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cellmirage-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.9.13 Darwin/22.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8f155869df5076686796b6d94c808c199a9833e49d80b3dde45107ec365950d
|
|
| MD5 |
ec040699fee01f5153d58130135da49c
|
|
| BLAKE2b-256 |
92e75be86791b4b0014517fdfea9d2b301b2afa9020c31f6ac1c7b1711d3d0bf
|