Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KerenLab/CellSighter
/ functions
Functions
32 in github.com/KerenLab/CellSighter
⨍
Functions
32
◇
Types & classes
6
↓ 2 callers
Function
load_crops
Given paths to the data, generate crops for all the cells in the data Args: root_dir: channels_path: crop_size: size
data/utils.py:140
↓ 2 callers
Function
load_data
(fname)
data/utils.py:39
↓ 2 callers
Function
load_samples
Args: images_dir: path to the images cells_dir: path to the segmentation cells2labels_dir: path to mapping cells to labe
data/utils.py:92
↓ 2 callers
Method
preprocess_cells
(self, cells_crop)
metrics/metrics.py:23
↓ 2 callers
Method
save_results
(self, path, cells_crop, pred_prob)
metrics/metrics.py:40
↓ 2 callers
Function
val_epoch
(model, dataloader, device=None)
eval.py:18
↓ 1 callers
Function
_extend_slices_1d
Extend a slice to be the size of crop size
data/utils.py:63
↓ 1 callers
Function
create_slices
Args: slices: slices that bound the cell crop_size: the needed size of the crop bounds: shape of the image containing th
data/utils.py:75
↓ 1 callers
Function
define_sampler
Sampler that sample from each cell category equally The hierarchy_match defines the cell category for each class. if None then each class
train.py:57
↓ 1 callers
Function
filter_channels
Filters out "blacklisted" channels. Args: channels (List[Tuple[int, str]]): A list of channels. blacklist (List[str], option
data/utils.py:25
↓ 1 callers
Function
load_image
(image_path, cells_path, cells2labels_path, channels=[], to_pad=False, crop_size=0)
data/utils.py:47
↓ 1 callers
Function
metric
(gt, pred, classes_for_cm, colorbar=True)
analyze_results/confusion_matrix.py:9
↓ 1 callers
Function
read_channels
Reads channels from a line-separated text file. Args: path (PathLike): A path to a text file of line-separated channels. Return
data/utils.py:10
↓ 1 callers
Method
sample
(self, mask=False)
data/cell_crop.py:17
↓ 1 callers
Function
subsample_const_size
sample same number of cell from each class
train.py:40
↓ 1 callers
Function
train_epoch
(model, dataloader, optimizer, criterion, epoch, writer, device=None)
train.py:18
Method
__call__
(self, cells_crop, pred_prob, epoch)
metrics/metrics.py:35
Method
__call__
(self, cells, pred_prob, tb, epoch, prefix)
metrics/metrics.py:55
Method
__getitem__
(self, idx)
data/data.py:18
Method
__init__
(self, input_len, num_classes)
model.py:7
Method
__init__
(self, metrics, tb, prefix="")
metrics/metrics.py:12
Method
__init__
(self, mapping=None, labels_name=None, name=None)
metrics/metrics.py:50
Method
__init__
(self, cell_id, image_id, label, slices, cells, image)
data/cell_crop.py:9
Method
__init__
(self, n_size, shift_max=0)
data/shift_augmentation.py:10
Method
__init__
(self, crops, mask=False, transform=None)
data/data.py:6
Method
__len__
(self)
data/data.py:15
Method
attach
Attack new metric to run of the data
metrics/metrics.py:17
Function
cell_shape_aug
Augment the mask of the cell size by dilating the size of the cell with random kernel
data/transform.py:23
Function
env_shape_aug
Augment the size of the cells mask in the environment, by dilating the size of the cell with random kernel
data/transform.py:36
Method
forward
(self, x)
model.py:17
Method
forward
(self, x)
data/shift_augmentation.py:20
Function
poisson_sampling
Augmentation that resample the data from poisson distribution. Args: x: (H,W,C) when C is th number of markers + 2. (one for the mask
data/transform.py:8