Skip to content

Commit

Permalink
mess with path prefixes/suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
philipqueen committed Apr 17, 2024
1 parent 0b12f19 commit a02ab6c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions skellytracker/process_folder_of_videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@

logger = logging.getLogger(__name__)

# TODO: figure out how we want to handle prefixes or suffixes here.
file_name_dictionary = {
"MediapipeHolisticTracker": "mediapipe2dData_numCams_numFrames_numTrackedPoints_pixelXY.npy",
"YOLOMediapipeComboTracker": "mediapipe2dData_numCams_numFrames_numTrackedPoints_pixelXY.npy",
"YOLOPoseTracker": "yolo2dData_numCams_numFrames_numTrackedPoints_pixelXY.npy",
"BrightestPointTracker": "brightestPoint2dData_numCams_numFrames_numTrackedPoints_pixelXY.npy",
"MediapipeHolisticTracker": "2dData_numCams_numFrames_numTrackedPoints_pixelXY.npy",
"YOLOMediapipeComboTracker": "2dData_numCams_numFrames_numTrackedPoints_pixelXY.npy",
"YOLOPoseTracker": "2dData_numCams_numFrames_numTrackedPoints_pixelXY.npy",
"BrightestPointTracker": "2dData_numCams_numFrames_numTrackedPoints_pixelXY.npy",
}


Expand Down Expand Up @@ -115,7 +116,7 @@ def process_single_video(
:return: Array of tracking data
"""
video_name = (
video_path.stem + "_mediapipe.mp4"
video_path.stem + "_annotated.mp4"
) # TODO: fix it so blender output doesn't require mediapipe addendum here
tracker = get_tracker(tracker_name=tracker_name, tracking_params=tracking_params)
logger.info(
Expand All @@ -126,6 +127,10 @@ def process_single_video(
output_video_filepath=annotated_video_path / video_name,
save_data_bool=False,
)

if output_array is None:
raise ValueError("Output array is None, verify that the tracker has an associated recorder")

return output_array


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

class BaseTrackingParams(BaseModel):
num_processes: int = 1
run_image_tracking: bool = True
run_image_tracking: bool = True

0 comments on commit a02ab6c

Please sign in to comment.