Spaces:
Paused
Paused
Zhen Ye Claude Opus 4.6 commited on
Commit ·
05bd36a
1
Parent(s): 0719ba5
feat: expose step param on /detect/async, default to 7
Browse filesStep=7 matches num_maskmem and reduces TTFS by shrinking the first
SAM2 propagation segment from 60 frames to 7. Benchmark shows
negligible end-to-end overhead (YOLO detection is fast).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Files changed (3)
408 unmodified lines409410411412413414118 unmodified lines533534535536537538408 unmodified linesdepth_scale: float = Form(25.0),enable_depth: bool = Form(False),enable_gpt: bool = Form(True),):_ttfs_t0 = time.perf_counter()118 unmodified linesmission_spec=mission_spec,mission_mode=mission_mode,first_frame_gpt_results=first_frame_gpt_results,ttfs_t0=_ttfs_t0,)get_job_storage().create(job)408 unmodified lines409410411412413414415118 unmodified lines534535536537538539540408 unmodified linesdepth_scale: float = Form(25.0),enable_depth: bool = Form(False),enable_gpt: bool = Form(True),step: int = Form(7),):_ttfs_t0 = time.perf_counter()118 unmodified linesmission_spec=mission_spec,mission_mode=mission_mode,first_frame_gpt_results=first_frame_gpt_results,step=step,ttfs_t0=_ttfs_t0,)get_job_storage().create(job)
33 unmodified lines3435363738394033 unmodified linessegmenter_name=job.segmenter_name,job_id=job_id,stream_queue=stream_queue,step=60,enable_gpt=job.enable_gpt,mission_spec=job.mission_spec,first_frame_gpt_results=job.first_frame_gpt_results,33 unmodified lines3435363738394033 unmodified linessegmenter_name=job.segmenter_name,job_id=job_id,stream_queue=stream_queue,step=job.step,enable_gpt=job.enable_gpt,mission_spec=job.mission_spec,first_frame_gpt_results=job.first_frame_gpt_results,
37 unmodified lines3839404137 unmodified linesmission_spec: Optional[Any] = None # utils.schemas.MissionSpecificationmission_mode: str = "LEGACY" # "MISSION" or "LEGACY"first_frame_gpt_results: Optional[Dict[str, Any]] = None # Cached GPT results from process_first_framettfs_t0: Optional[float] = None # TTFS anchor: time.perf_counter() at endpoint entry37 unmodified lines383940414237 unmodified linesmission_spec: Optional[Any] = None # utils.schemas.MissionSpecificationmission_mode: str = "LEGACY" # "MISSION" or "LEGACY"first_frame_gpt_results: Optional[Dict[str, Any]] = None # Cached GPT results from process_first_framestep: int = 7 # Segmentation keyframe step (matches num_maskmem)ttfs_t0: Optional[float] = None # TTFS anchor: time.perf_counter() at endpoint entry
app.py+2
jobs/background.py+1-1
jobs/models.py+1