Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
chanwutk committed Jul 28, 2024
1 parent 6ffaf55 commit 8557591
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 35 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
# - name: Ignore modules
# run: |
# rm -rf spatialyze/video_processor/modules
# rm -rf spatialyze/video_processor/stages
- name: API Doc
run: |
pip install pydoctor
Expand All @@ -55,7 +51,7 @@ jobs:
--intersphinx=https://docs.python.org/3/objects.inv \
--privacy="HIDDEN:spatialyze.video_processor.modules" \
--privacy="HIDDEN:spatialyze.video_processor.stages" \
./spatialyze || true
./spatialyze
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3
Expand Down
40 changes: 20 additions & 20 deletions spatialyze/video_processor/stages/detection_3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@
class Metadatum(NamedTuple):
"""
detections:
-----------
===========
A torch.Tensor with size N x 18, representing N objects detected from a single frame.
Each including 3d information.
Each column represents:
- bbox_left
- bbox_top
- bbox_w
- bbox_h
- conf
- class
- bbox_left
- bbox_top
- bbox_w
- bbox_h
- conf
- class
- bbox3d_left_x
- bbox3d_left_y
- bbox3d_left_z
- bbox3d_left_x
- bbox3d_left_y
- bbox3d_left_z
- bbox3d_right_x
- bbox3d_right_y
- bbox3d_right_z
- bbox3d_right_x
- bbox3d_right_y
- bbox3d_right_z
- bbox3d_from_camera_left_x
- bbox3d_from_camera_left_y
- bbox3d_from_camera_left_z
- bbox3d_from_camera_left_x
- bbox3d_from_camera_left_y
- bbox3d_from_camera_left_z
- bbox3d_from_camera_right_x
- bbox3d_from_camera_right_y
- bbox3d_from_camera_right_z
- bbox3d_from_camera_right_x
- bbox3d_from_camera_right_y
- bbox3d_from_camera_right_z
class_map:
----------
==========
A mapping from an object class number (in detections[:, 5]) to a class string name
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
"""Detection Estimation Module
"""
Detection Estimation Module
===========================
This module is responsible for estimating the object detection throughout the whole video.
The sampling algorithm skips frames based on the current frame geo information.
We estimate objects' metadata only based on the sampled frames.
Usage example:
from detection_estimation import detection_estimation
detection_estimation(sorted_ego_config, video, start_frame_num, view_distance=50, img_base_dir='')
==============
from detection_estimation import detection_estimation
detection_estimation(sorted_ego_config, video, start_frame_num, view_distance=50, img_base_dir='')
TODO:
1. incoporate yolo detection, either merge this module to the tracking pipeline
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
""" Goal to map the road segment to the frame segment
Now only get the segment of type lane and intersection
except for the segment that contains the ego camera
"""
Goal to map the road segment to the frame segment
Now only get the segment of type lane and intersection
except for the segment that contains the ego camera
Usage example:
from optimization_playground.segment_mapping import map_imgsegment_roadsegment
from spatialyze.utils import fetch_camera_config
==============
from optimization_playground.segment_mapping import map_imgsegment_roadsegment
from spatialyze.utils import fetch_camera_config
test_config = fetch_camera_config(test_img, database)
mapping = map_imgsegment_roadsegment(test_config)
test_config = fetch_camera_config(test_img, database)
mapping = map_imgsegment_roadsegment(test_config)
"""

import array
Expand Down

0 comments on commit 8557591

Please sign in to comment.