Free Motion Capture for Everyone πβ¨
TypeScript
Merge branch 'develop' into alpha-dev
jonmatthis0f0902276f62
diff --cc freemocap/dev_scratchpad/dev_alpha/FMC_MultiCamera.pyindex bae15f28,49a4d1c8..48d52937--- a/freemocap/dev_scratchpad/dev_alpha/FMC_MultiCamera.py+++ b/freemocap/dev_scratchpad/dev_alpha/FMC_MultiCamera.py@@@ -11,12 -11,9 +11,10 @@@+from rich.repr import Tfrom FMC_Camera import FMC_Camera- import concurrent.futures- import logging- import queue+import threadingimport pathos.multiprocessing as pathos_mpfrom pathos.helpers import mp as pathos_mp_helper@@@ -75,20 -71,15 +73,20 @@@ class FMC_MultiCameraif save_path is None:self._save_path = Path('data/' + self._rec_name)else:- self._save_path = Path(save_path)+ self._save_path = Path(save_path) / self._rec_name- if save_path or save_to_mp4 or save_to_h5 or save_log_file:- self._save_path.mkdir(parents=True)+ if save_path or save_multi_cam_to_mp4 or save_to_h5 or save_log_file or save_each_cam_to_mp4:+ self._save_path.mkdir(parents=True, exist_ok=True)self._path_to_log_file = Path(str(self._save_path / self._rec_name) + '_log.txt')- self._save_to_mp4 = save_to_mp4- if self._save_to_mp4:- self._output_video_object = None #build this after we get the first multi_frame_image+ self._save_multi_cam_to_mp4 = save_multi_cam_to_mp4+ if self._save_multi_cam_to_mp4:+ self._output_multi_cam_video_object = None #build this after we get the first multi_frame_image++ self._save_each_cam_to_mp4 = save_each_cam_to_mp4+ if self._save_each_cam_to_mp4:+ self._each_cam_video_writer_object_list = None #build this after we get the first multi_frame_image+# log_file_obj = open(self._path_to_log_file,'w+')# rich_console = Console(file=log_file_obj)diff --cc freemocap/fmc_runme.pyindex 5cb6e2c3,e43b4d20..b2da863b--- a/freemocap/fmc_runme.py+++ b/freemocap/fmc_runme.py@@@ -212,10 -206,10 +211,10 @@@ def RunMe(sessionID=NonethisStage=4console.rule(style="color({})".format(thisStage))console.rule('Starting 2D Point Trackers'.upper(),style="color({})".format(thisStage))- stage4_msg ='This step implements various computer vision that track the skeleton (and other objects) in the 2d videos, to produce the data that will be combined with the `camera projection matrices` from the calibration stage to produce the estimates of 3d movement. \n \n Each algorithm is different, but most involve using [bold magenta] convolutional neural networks [/bold magenta] trained from labeled videos to produce a 2d probability map of the likelihood that the tracked bodypart/object/feature (e.g. \'LeftElbow\') is in a given location. \n \n The peak of that distrubtion on each frame is recorded as the pixel-location of that item on that frame (e.g. \'LeftElbow(pixel-x, pixel-y, confidence\') where the a confidence value proportional to the underlying probability distribution (i.e. tall peaks in the probablitiy distribution -> high confidence that the LeftElbow actually is at this pixel-x, pixel-y location) \n \nThis part is crazy future tech sci fi stuff. Seriously unbelievable this kind of thing is possible β¨'+ stage4_msg ='This step implements various computer vision that track the skeleton (and other objects) in the 2d videos, to produce the data that will be combined with the `camera projection matrices` from the calibration stage to produce the estimates of 3d movement. \n \n Each algorithm is different, but most involve using [bold magenta] convolutional neural networks [/bold magenta] trained from labeled videos to produce a 2d probability map of the likelihood that the tracked bodypart/object/feature (e.g. \'LeftElbow\') is in a given location. \n \n The peak of that distrubtion on each frame is recorded as the pixel-location of that item on that frame (e.g. \'LeftElbow(pixel-x, pixel-y, confidence\') where the a confidence value proportional to the underlying probability distribution (i.e. tall peaks in the probablitiy distribution indicate high confidence that the LeftElbow actually is at this pixel-x, pixel-y location) \n \nThis part is crazy future tech sci fi stuff. Seriously unbelievable this kind of thing is possible β¨'console.print(Padding(stage4_msg, (1,4)), overflow="fold", justify='center',style="color({})".format(thisStage))console.rule(style="color({})".format(thisStage))- time.sleep(pauseBetweenStages)+if sesh.useMediaPipe:console.rule(style="color({})".format(thisStage))