Reconstructing True 3D Spatial Omics at Single-Cell Resolution
Project description
DeepSpatial is a package for true 3D reconstruction of spatial omics tissues from serial 2D slices, built with PyTorch and designed to work smoothly with AnnData/Scanpy workflows.
3D spatial omics reconstruction
DeepSpatial provides an end-to-end framework for learning continuous 3D tissue representations:
- Reconstructs missing biological structure between adjacent sections.
- Jointly models spatial coordinates, gene expression, and cell identities.
- Supports large-scale training and sampling with GPU acceleration.
- Produces outputs that can be directly used in downstream single-cell/spatial analysis.
The package exposes a high-level API (DeepSpatial) for data setup, model training, and 3D reconstruction with minimal boilerplate.
Installation
Recommended (PyPI):
pip install deepspatial
From source (development):
git clone https://github.com/yyh030806/DeepSpatial.git
cd DeepSpatial
pip install -e .
If you use GPU, install a PyTorch build matching your CUDA version.
Quick start
-
Download an example dataset first: Google Drive dataset folder
Then place files under
data/merfish_mouse_hypothalamus/. -
Run DeepSpatial:
import glob
import scanpy as sc
import deepspatial as ds
adatas = [
sc.read_h5ad(p)
for p in sorted(glob.glob("data/merfish_mouse_hypothalamus/merfish_*.h5ad"))
]
model = ds.DeepSpatial()
model.setup_data(adatas)
model.build_model()
model.fit(max_epochs=100)
adata_3d = model.reconstruct_full_volume(adatas, thickness=10.0)
Resources
- Documentation, tutorials, and API reference: https://yyh030806.github.io/DeepSpatial/docs/
- Homepage: https://yyh030806.github.io/DeepSpatial/
- Bug reports and feature requests: https://github.com/yyh030806/DeepSpatial/issues
Citation
If you use DeepSpatial in your research, please cite:
@article {yang2026deepspatial,
author = {Yang, Yuhang and Luo, Yiming and Zhang, Kai and Bu, Yonggan and Xia, Zheng and Peng, Haoxin and Yan, Rui and Liu, Qi and Chen, Yang and Shen, Lin and Chen, Enhong},
title = {Reconstructing True 3D Spatial Omics at Single-Cell Resolution},
year = {2026},
doi = {10.64898/2026.04.28.721395},
journal = {bioRxiv}
}
License
DeepSpatial is released under the MIT License.
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
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 deepspatial-1.0.0.tar.gz.
File metadata
- Download URL: deepspatial-1.0.0.tar.gz
- Upload date:
- Size: 50.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ff5626ea18137e5c455a435147e406da092513fe3b96079a9ff4233e80bac21
|
|
| MD5 |
eef9432410e2da91e853608d09ffcc8c
|
|
| BLAKE2b-256 |
ac2a2dab158a18472da85820b6acd64569f458166113cad507d4fa5a519ee3ec
|
Provenance
The following attestation bundles were made for deepspatial-1.0.0.tar.gz:
Publisher:
publish-pypi.yml on yyh030806/DeepSpatial
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deepspatial-1.0.0.tar.gz -
Subject digest:
1ff5626ea18137e5c455a435147e406da092513fe3b96079a9ff4233e80bac21 - Sigstore transparency entry: 1521834940
- Sigstore integration time:
-
Permalink:
yyh030806/DeepSpatial@fdb98657fca95679cc45adf3510a161de05bca08 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yyh030806
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@fdb98657fca95679cc45adf3510a161de05bca08 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file deepspatial-1.0.0-py3-none-any.whl.
File metadata
- Download URL: deepspatial-1.0.0-py3-none-any.whl
- Upload date:
- Size: 52.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32fa6aa6d452913cd023c8433e7dd3771246e0f7bd18efd460f23baf24fcaa18
|
|
| MD5 |
2e0ea420b35627d90dbdaf5d822790c7
|
|
| BLAKE2b-256 |
643c96c80bbefafad180765622a8930938e229e9cf3c51f5b3ef8abfc13f7285
|
Provenance
The following attestation bundles were made for deepspatial-1.0.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on yyh030806/DeepSpatial
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deepspatial-1.0.0-py3-none-any.whl -
Subject digest:
32fa6aa6d452913cd023c8433e7dd3771246e0f7bd18efd460f23baf24fcaa18 - Sigstore transparency entry: 1521834963
- Sigstore integration time:
-
Permalink:
yyh030806/DeepSpatial@fdb98657fca95679cc45adf3510a161de05bca08 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yyh030806
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@fdb98657fca95679cc45adf3510a161de05bca08 -
Trigger Event:
workflow_dispatch
-
Statement type: