Skip to content

Commit ddbf448

Browse files
More doc updates
1 parent a668cd0 commit ddbf448

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

micro_sam/precompute_state.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"""Precompute image embeddings and automatic mask generator state for image data.
2+
"""
3+
14
import os
25
import pickle
36

@@ -26,7 +29,7 @@ def cache_amg_state(
2629
predictor: The segment anything predictor.
2730
raw: The image data.
2831
image_embeddings: The image embeddings.
29-
save_path: The embedding save path. The AMG state will be stored in <save_path>/amg_state.pickle.
32+
save_path: The embedding save path. The AMG state will be stored in 'save_path/amg_state.pickle'.
3033
verbose: Whether to run the computation verbose.
3134
kwargs: The keyword arguments for the amg class.
3235

micro_sam/training/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
"""Functionality for training Segment Anything.
2+
"""
3+
14
from .sam_trainer import SamTrainer, SamLogger
25
from .util import ConvertToSamInputs, get_trainable_sam_model

micro_sam/training/sam_trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SamTrainer(torch_em.trainer.DefaultTrainer):
2626
n_objects_per_batch: If not given, we compute the loss for all objects in a sample.
2727
Otherwise the loss computation is limited to n_objects_per_batch, and the objects are randomly sampled.
2828
mse_loss: The regression loss to compare the IoU predicted by the model with the true IoU.
29-
sigmoid: The actuction function for normalizing the model output.
29+
sigmoid: The activation function for normalizing the model output.
3030
**kwargs: The keyword arguments of the DefaultTrainer super class.
3131
"""
3232

0 commit comments

Comments
 (0)