Skip to content

Commit

Permalink
Expose max_distance in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
maweigert committed Jul 4, 2024
1 parent 2918a7b commit db86a54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions trackastra/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ def cli():
" https://github.com/weigertlab/trackastra#installation."
),
)
p_track.add_argument(
"--max-distance",
type=float,
default=128,
help="Maximum distance for linking cells.",
)

p_track.add_argument(
"--device",
choices=["cuda", "mps", "cpu", "automatic"],
Expand Down Expand Up @@ -110,6 +117,7 @@ def _track_from_disk(args):
args.imgs,
args.masks,
mode=args.mode,
max_distance=args.max_distance
)

if args.output_ctc:
Expand Down
2 changes: 1 addition & 1 deletion trackastra/data/wrfeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def get_features(
imgs = _check_dimensions(imgs, ndim)
logger.info(f"Extracting features from {len(detections)} detections")
if n_workers > 0:
features = joblib.Parallel(n_jobs=n_workers, backend="multiprocessing")(
features = joblib.Parallel(n_jobs=n_workers)(
joblib.delayed(WRFeatures.from_mask_img)(
# New axis for time component
mask=mask[np.newaxis, ...],
Expand Down

0 comments on commit db86a54

Please sign in to comment.