File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ """Precompute image embeddings and automatic mask generator state for image data.
2+ """
3+
14import os
25import 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
Original file line number Diff line number Diff line change 1+ """Functionality for training Segment Anything.
2+ """
3+
14from .sam_trainer import SamTrainer , SamLogger
25from .util import ConvertToSamInputs , get_trainable_sam_model
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments