3D shape analysis using deep learning
Project description
cellshape-cluster
Cellshape-cluster is an easy-to-use tool to analyse the cluster cells by their shape using deep learning and, in particular, deep-embedded-clustering. The tool provides the ability to train popular graph-based or convolutional autoencoders on point cloud or voxel data of 3D single cell masks as well as providing pre-trained networks for inference.
To install
pip install cellshape-cluster
Usage
import torch
from cellshape_cloud import CloudAutoEncoder
from cellshape_cluster import DeepEmbeddedClustering
autoencoder = CloudAutoEncoder(
num_features=128,
k=20,
encoder_type="dgcnn"
)
model = DeepEmbeddedClustering(autoencoder=autoencoder,
num_clusters=10,
alpha=1.0)
points = torch.randn(1, 2048, 3)
recon, features, clusters = model(points)
Parameters
autoencoder
: CloudAutoEncoder or VoxelAutoEncoder.
Instance of autoencoder class from cellshape-cloud or cellshape-voxelnum_clusters
: int.
The number of clusters to use in deep embedded clustering algorithm.alpha
: float.
Degrees of freedom for the Student's t-distribution. Xie et al. (ICML, 2016) let alpha=1 for all experiments.
For developers
- Fork the repository
- Clone your fork
git clone https://github.com/USERNAME/cellshape-cluster
- Install an editable version (
-e
) with the development requirements (dev
)
cd cellshape-cluster
pip install -e .[dev]
- To install pre-commit hooks to ensure formatting is correct:
pre-commit install
- To release a new version:
Firstly, update the version with bump2version (bump2version patch
,
bump2version minor
or bump2version major
). This will increment the
package version (to a release candidate - e.g. 0.0.1rc0
) and tag the
commit. Push this tag to GitHub to run the deployment workflow:
git push --follow-tags
Once the release candidate has been tested, the release version can be created with:
bump2version release
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
Hashes for cellshape-cluster-0.0.3rc0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe234406ceed979a715ed763e5519d83913b3daa96723bb18f946806792f5bdc |
|
MD5 | 9bec6bf48d6bb64650cdc59b17efaeaf |
|
BLAKE2b-256 | 8787237bd94623f697364794a5946533958f24e50b945cc2d8548b010a1a866f |
Hashes for cellshape_cluster-0.0.3rc0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c5a11d9a355936810c8dd0b002cf825af1a02dca571bb77cde6d750102de780 |
|
MD5 | ff78ba42df1ef395e085acc9eb1e3a1a |
|
BLAKE2b-256 | ca59123763741cf6e9269d4e4ee7049947fc5a19cf50232b0b3e851221eb812d |