Free Motion Capture for Everyone πβ¨
TypeScript
Merge branch 'develop' into feature/PYQT-mediapipe
aaroncherian475ea5440198
diff --cc freemocap/fmc_runme.pyindex 2640d3e1,a5aebd9b..c5db2797--- a/freemocap/fmc_runme.py+++ b/freemocap/fmc_runme.py@@@ -102,10 -110,14 +111,14 @@@ def RunMe(sessionID=Nonetry:current_path_to_data = preferences['saved']['path_to_save']basePath = current_path_to_data- except KeyError('Saved Data path not found, please choose a new one'):+ except KeyError:+ print('Saved Data path not found, please choose a new one')basePath = runmeGUI.RunChooseDataPathGUI(session)+ sesh.preferences['saved']['path_to_save'] = str(basePath)+ sesh.save_user_preferences(sesh.preferences)+- dataFolder = Path(basePath)/sesh.dataFolderName+ dataFolder = Path(sesh.basePath)/sesh.dataFolderNamesesh.dataFolderPath = dataFolderif not dataFolder.exists():@@@ -222,68 -236,27 +237,26 @@@else:print('Skipping Run MediaPipe')- # # %% Stage Five- # if not stage > 5:- # print('Starting Parse MediaPipe')- # sesh.mediaPipeData_nCams_nFrames_nImgPts_XYC = fmc_mediapipe.parseMediaPipe(sesh)- # else:- # print('Skipping Parse MediaPipe')---- # # %% Stage Six- # if not stage > 6:- # print()- # print('Starting Skeleton Reconstruction')- # sesh.skel_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.mediaPipeData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=.1)-- # path_to_skel_points = sesh.dataArrayPath/'skeleton_points.npy'- # np.save(path_to_skel_points, sesh.skel_fr_mar_dim)- # else:- # print('Skipping Skeleton Reconstruction')---- #reupdate the config_settings with mediapipe and openpose image paths- #sesh.config_settings = recordingconfig.load_config_yaml(sesh.yamlPath)--- # %% Stage Six- if stage <= 6:- print ('Starting PyQT Animation')- createvideo.createBodyTrackingVideos(sesh)- displayVid = 1- #if displayVid = 0, will show the synced videos- #if displayVid = 1, will show the openPosed videos- playWin = PlayerDockedWindow(sesh,displayVid)- playWin.animate()-- # %% Stage Seven- if stage <= 7:+ # %% Stage Five - Make Skreleton Animation+ if stage <= 5:print('Starting Skeleton Plotting')- playskeleton.ReplaySkeleton_matplotlib(- sesh,- vidType=0,- startFrame=40,- azimuth=-90,- elevation=-80,- useOpenPose=sesh.useOpenPose,- useMediaPipe=sesh.useMediaPipe,- useDLC=sesh.useDLC)- # fmc_pyqtgraph.PlaySkeleton(- # sesh,- # vidType=1,- # startFrame=40,- # azimuth=-90,- # elevation=-80,- # useOpenPose=useOpenPose,- # useMediaPipe=useMediaPipe,- # useDLC=useDLC)-- # playSkel = PlaySkeleton(sesh)- # playSkel.animate()- #playWin =PlayerDockedWindow(sesh)- #playWin.animate()-+ play_skeleton_animation.PlaySkeletonAnimation(+ sesh,+ startFrame=0,+ azimuth=-90,+ elevation=-81,+ useOpenPose=True,+ useMediaPipe=False,+ useDLC=False,+ recordVid = recordVid+ )+ # print ('Starting PyQT Animation')+ # createvideo.createBodyTrackingVideos(sesh)+ # displayVid = 1+ # #if displayVid = 0, will show the synced videos+ # #if displayVid = 1, will show the openPosed videos+ # playWin = PlayerDockedWindow(sesh,displayVid)+ # playWin.animate()else:print('Skipping Skeleton Plotting')diff --cc freemocap/user_preferences.yamlindex ebbd6136,c7d4a449..ec3182a9--- a/freemocap/user_preferences.yaml+++ b/freemocap/user_preferences.yaml@@@ -1,5 -1,5 +1,6 @@@default:- path_to_save: C:\Users\jonma\Dropbox\GitKrakenRepos\freemocap+++ path_to_save: C:\Users\Rontc\Documents\GitHub\freemocapdlc_config_paths: []rotations: {}parameters:diff --cc freemocap_runme_script.pyindex 65654f84,c93ce48b..8b5fb9af--- a/freemocap_runme_script.py+++ b/freemocap_runme_script.py@@@ -2,11 -2,12 +2,13 @@@ import freemocap as fmfrom pathlib import Pathimport socket- # dlcConfigPath = Path(r"C:\Users\jonma\Dropbox\DLC_Models\PinkGreenRedJugglingBalls-JSM-2021-05-31\config.yaml")- # if socket.gethostname() == 'DESKTOP-DCG6K4F':- # fmc.RunMe( stage=7, openPoseDummyRun=True, useDLC = True, dlcConfigPath=dlcConfigPath, recordVid = True)- # else:- # fmc.RunMe( useDLC = True, dlcConfigPath=dlcConfigPath, recordVid = True)+- fmc.RunMe(sessionID = 'sesh_21-07-29_104227', stage = 6, useMediaPipe=True, useOpenPose=False, setDataPath = True)+ fmc.RunMe( stage=5,+ useOpenPose=True,+ openPoseDummyRun=True,+ useMediaPipe=True,+ useDLC=False,+ recordVid = True,+ reconstructionConfidenceThreshold = 0.2,+ calVideoFrameLength = -1)