Skip to main content

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-voxel
  • num_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cellshape-cluster-0.0.3rc0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

cellshape_cluster-0.0.3rc0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file cellshape-cluster-0.0.3rc0.tar.gz.

File metadata

  • Download URL: cellshape-cluster-0.0.3rc0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for cellshape-cluster-0.0.3rc0.tar.gz
Algorithm Hash digest
SHA256 fe234406ceed979a715ed763e5519d83913b3daa96723bb18f946806792f5bdc
MD5 9bec6bf48d6bb64650cdc59b17efaeaf
BLAKE2b-256 8787237bd94623f697364794a5946533958f24e50b945cc2d8548b010a1a866f

See more details on using hashes here.

File details

Details for the file cellshape_cluster-0.0.3rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for cellshape_cluster-0.0.3rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c5a11d9a355936810c8dd0b002cf825af1a02dca571bb77cde6d750102de780
MD5 ff78ba42df1ef395e085acc9eb1e3a1a
BLAKE2b-256 ca59123763741cf6e9269d4e4ee7049947fc5a19cf50232b0b3e851221eb812d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page