Skip to content

Commit

Permalink
[segmentation] update arbitrary start position in tracking (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-theodoro authored Jan 9, 2025
1 parent 55faaf4 commit 0bae324
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ultrack/core/segmentation/processing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import os
import pickle
from contextlib import nullcontext
from typing import Callable, List, Optional
Expand Down Expand Up @@ -445,8 +446,10 @@ def segment(
length, config.segmentation_config.n_workers, batch_index
)
LOG.info(f"Segmenting time points {time_points}")

batch_start_index = int(os.getenv("ULTRACK_BATCH_INDEX_START", "0"))

if batch_index is None or batch_index == 0:
if batch_index is None or batch_index == batch_start_index:
engine = sqla.create_engine(config.data_config.database_path)

if overwrite:
Expand Down

0 comments on commit 0bae324

Please sign in to comment.