File size: 1,752 Bytes
246edc1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | ---
library_name: cellmap-models
tags:
- pytorch
- onnx
- torchscript
- 3d
- segmentation
- electron-microscopy
- cellmap
- ld_aff_1
- ld_aff_2
- ld_aff_3
license: bsd-3-clause
---
# ld_aff_unet_setup_48
Generalist affinities for lipids segmentation using a UNet architecture trained on setup 48 with 380k iterations.
## Model Details
| | |
|---|---|
| **Architecture** | UNet |
| **Framework** | torch |
| **Spatial Dims** | 3 |
| **Input Channels** | 1 |
| **Output Channels** | 3 |
| **Channel Names** | ld_aff_1, ld_aff_2, ld_aff_3 |
| **Iteration** | 380000 |
| **Input Voxel Size** | 16, 16, 16 nm |
| **Output Voxel Size** | 16, 16, 16 nm |
| **Inference Input Shape** | 378, 378, 378 |
| **Inference Output Shape** | 256, 256, 256 |
## Available Formats
| File | Format | Usage |
|---|---|---|
| `model.pt` | PyTorch pickle | `torch.load("model.pt")` |
| `model.ts` | TorchScript | `torch.jit.load("model.ts")` |
| `model.onnx` | ONNX | `onnxruntime.InferenceSession("model.onnx")` |
| `metadata.json` | JSON | Model metadata |
## Usage
```bash
pip install cellmap-models
```
```python
from cellmap_models.model_export.cellmap_model import CellmapModel
model = CellmapModel("path/to/model/folder")
# Inference
output = model.ts_model(input_tensor)
# Finetuning
trainable_model = model.train()
```
Or download from this repo and load directly:
```python
from huggingface_hub import snapshot_download
from cellmap_models.model_export.cellmap_model import CellmapModel
path = snapshot_download(repo_id="ld_aff_unet_setup_48")
model = CellmapModel(path)
```
## Author
Marwan Zouinkhi
## Links
- [cellmap-models](https://github.com/janelia-cellmap/cellmap-models)
- [CellMap Project](https://www.janelia.org/project-team/cellmap)
|