Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chanwutk committed Aug 10, 2023
1 parent d10d591 commit 5af81b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions spatialyze/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from .video_processor.payload import Payload
from .video_processor.pipeline import Pipeline
from .video_processor.stages.decode_frame.decode_frame import DecodeFrame
from .video_processor.stages.decode_frame.parallel_decode_frame import ParallelDecodeFrame
from .video_processor.stages.detection_2d.object_type_filter import ObjectTypeFilter
from .video_processor.stages.detection_2d.yolo_detection import YoloDetection
from .video_processor.stages.detection_3d.from_detection_2d_and_road import (
Expand Down Expand Up @@ -101,10 +102,10 @@ def _execute(world: "World"):
objtypes_filter = ObjectTypeFilter(predicate=world.predicates)
pipeline = Pipeline(
[
DecodeFrame(),
ParallelDecodeFrame(),
InView(distance=50, predicate=world.predicates),
YoloDetection(),
objtypes_filter,
# objtypes_filter,
FromDetection2DAndRoad(),
*(
[DetectionEstimation()]
Expand Down
3 changes: 2 additions & 1 deletion tests/workflow/test_simple_workflow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pickle
import json
import os
from os import environ
import psycopg2
Expand Down Expand Up @@ -47,7 +48,7 @@ def test_simple_workflow():
objects = _execute(world)

with open(os.path.join(OUTPUT_DIR, f'simple-workflow.json'), 'w') as f:
f.write(objects, indent=1)
json.dump(objects, f, indent=1)

with open(os.path.join(OUTPUT_DIR, f'simple-workflow.json'), 'r') as f:
objects_groundtruth = f.read()
Expand Down

0 comments on commit 5af81b3

Please sign in to comment.