Skip to content

Commit

Permalink
Merge branch 'ck/benchmark' of github.com:apperception-db/spatialyze …
Browse files Browse the repository at this point in the history
…into ck/benchmark
  • Loading branch information
chanwutk committed Oct 25, 2023
2 parents 9d88ffc + 2eff9e6 commit d1a7738
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ def _run(self, payload: "Payload"):
if i != next_frame_num:
skipped_frame_num.append(i)
metadata.append([])
print('skip ', i, next_frame_num)
print("skip ", i, next_frame_num)
continue

next_frame_num = i + 1

det, _, dids = dets[i]
print('--new ', i, new_car(dets, i, i + 5))
print("--new ", i, new_car(dets, i, i + 5))
if new_car(dets, i, i + 5) <= i + 1:
# will not map segment if cannot skip in the first place
metadata.append([])
print('new ', i, new_car(dets, i, i + 5))
print("new ", i, new_car(dets, i, i + 5))
continue

start_detection_time = time.time()
Expand All @@ -108,7 +108,7 @@ def _run(self, payload: "Payload"):
if len(det) == 0 or len(all_detection_info_pruned) == 0:
# skipped_frame_num.append(i)
metadata.append([])
print('0 ', i)
print("0 ", i)
continue

start_generate_sample_plan = time.time()
Expand All @@ -119,7 +119,7 @@ def _run(self, payload: "Payload"):
next_frame_num = next_sample_plan.get_next_frame_num()
next_frame_num = new_car(dets, i, next_frame_num)
logger.info(f"founded next_frame_num {next_frame_num}")
print('next ', i)
print("next ", i)
metadata.append(all_detection_info)

next_action_type = next_sample_plan.get_action_type()
Expand Down
5 changes: 1 addition & 4 deletions spatialyze/video_processor/stream/exit_frame_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
from collections.abc import Iterable, Iterator
from typing import Generic, TypeVar

import shapely
import shapely.wkb

from ..stages.detection_estimation import (
construct_estimated_all_detection_info,
generate_sample_plan_once,
Expand All @@ -14,7 +11,7 @@
trajectory_3d,
)
from ..video import Video
from .data_types import Detection3D, Skip, skip
from .data_types import Detection3D, Skip
from .stream import Stream

logging.basicConfig()
Expand Down

0 comments on commit d1a7738

Please sign in to comment.