Cellshape-cloud is an easy-to-use tool to analyse the shapes of cells using deep learning and, in particular, graph-neural networks. The tool provides the ability to train popular graph-based autoencoders on point cloud data of 2D and 3D single cell masks as well as providing pre-trained networks for inference.
To install
pip install cellshape-cloud
Usage
Basic Usage
import torch
from cellshape_cloud import CloudAutoEncoder
model = CloudAutoEncoder(num_features=128,
k=20,
encoder_type="dgcnn",
decoder_type="foldingnet")
points = torch.randn(1, 2048, 3)
recon, features = model(points)
To train an autoencoder on a set of point clouds created using cellshape-helper:
import torch
from torch.utils.data import DataLoader
import cellshape_cloud as cloud
from cellshape_cloud.vendor.chamfer_distance import ChamferLoss
input_dir = "path/to/pointcloud/files/"
batch_size = 16
learning_rate = 0.0001
num_epochs = 1
output_dir = "path/to/save/output/"
model = cloud.CloudAutoEncoder(num_features=128,
k=20,
encoder_type="dgcnn",
decoder_type="foldingnet")
dataset = cloud.PointCloudDataset(input_dir)
dataloader = DataLoader(dataset, batch_size=batch_size, shuffle=True)
criterion = ChamferLoss()
optimizer = torch.optim.Adam(
model.parameters(),
lr=learning_rate * 16 / batch_size,
betas=(0.9, 0.999),
weight_decay=1e-6,
)
cloud.train(model, dataloader, num_epochs, criterion, optimizer, output_dir)
Parameters
num_features: int.
The size of the latent space of the autoencoder.k: int.
The number of neightbours to use in the k-nearest-neighbours graph construction.encoder_type: str.
The type of encoder: 'foldingnet' or 'dgcnn'decoder_type: str.
The type of decoder: 'foldingnet' or 'dgcnn'
References
[1] An Tao, 'Unsupervised Point Cloud Reconstruction for Classific Feature Learning', GitHub Repo, 2020
Metadata
Release files for cellshape-cloud 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cellshape-cloud-0.1.3.tar.gz | 21.4 kB | Without provenance | Details for cellshape-cloud-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cellshape_cloud-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for cellshape_cloud-0.1.3-py3-none-any.whl |
Total release size: 47.5 kB
Release files / cellshape-cloud-0.1.3.tar.gz
| Download URL | cellshape-cloud-0.1.3.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b409a9f5d59f6d0071db6a0341bd6684a2c1f4d2c265d296b370fa45203a4495
|
|
BLAKE2b-256 checksum How to use checksums |
1559779c526cb9b527957a2a7e1f5e1ddf441c27c109f2c2716d9d6bac079486
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / cellshape_cloud-0.1.3-py3-none-any.whl
| Download URL | cellshape_cloud-0.1.3-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
942b050a93d021e67bd79417833caacced593cac299e8ed46b184893d0a280e7
|
|
BLAKE2b-256 checksum How to use checksums |
8576db49c113b932f0cc4e9085cb3f2494d89ef1d510f19b10016ffb250edbe2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for cellshape-cloud 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.