Free Motion Capture for Everyone πβ¨
TypeScript
First working recording in Richards 417
Richards4170aa4b5c4905a
diff --git a/freemocap/fmc_deeplabcut.py b/freemocap/fmc_deeplabcut.pyindex 3a947bb5..1893b304 100644--- a/freemocap/fmc_deeplabcut.py+++ b/freemocap/fmc_deeplabcut.py@@ -33,7 +33,7 @@ def parseDeepLabCut(session): # NOTE this is assuming both the dlc config file ah5files =session.dlcDataPath.glob('*.h5') #Take all h5 files from foldernumCams = int(session.numCams)#Get num of cams- numFrames = session.numFrames+1#Get num of frames+ numFrames = session.numFrames+10#Get num of framesnumPoints = len(bodypartList)# Get amount of points trackeddlcData_nCams_nFrames_nImgPts_XYC = np.ndarray([numCams, numFrames, numPoints, 3]) # Create empty array for dlc pointsdiff --git a/parameters.yaml b/parameters.yamlindex 6e3a79e9..aac3d904 100644--- a/parameters.yaml+++ b/parameters.yaml@@ -1,32 +1,32 @@-#default parameters-----default:- rotations: {}- parameters:- exposure: -5- resWidth: 640- resHeight: 480- framerate: 25- codec: DIVX--#saved parameters------saved:- rotations:- 0: 90- 1: 270- 2: 90- 4: 90- parameters:- exposure: -6- resWidth: 640- resHeight: 480- framerate: 30- codec: H264+#default parameters+++++default:+ rotations: {}+ parameters:+ exposure: -5+ resWidth: 640+ resHeight: 480+ framerate: 25+ codec: DIVX++#saved parameters++++++saved:+ rotations:+ 0: 270+ 1: 90+ 2: 90+ 3: 90+ parameters:+ exposure: -8+ resWidth: 640+ resHeight: 480+ framerate: 30+ codec: H264diff --git a/runme_fmc_staged.py b/runme_fmc_staged.pyindex c2e32382..1fe8642a 100644--- a/runme_fmc_staged.py+++ b/runme_fmc_staged.py@@ -13,11 +13,12 @@ sesh = session.Session()sesh.useOpenPose= Truesesh.useMediaPipe = True-sesh.useDLC=False+sesh.useDLC=Trueif sesh.useDLC:import deeplabcut as dlc- sesh.dlcConfigPath = Path("C:\\Users\\jonma\\Dropbox\\GitKrakenRepos\\freemocap\\DLC_Models\\PinkGreenRedJugglingBalls-JSM-2021-05-31\\config.yaml")+ # sesh.dlcConfigPath = Path("C:\\Users\\jonma\\Dropbox\\GitKrakenRepos\\freemocap\\DLC_Models\\PinkGreenRedJugglingBalls-JSM-2021-05-31\\config.yaml")+ sesh.dlcConfigPath = Path("C:\\Users\\jonma\\Desktop\\freemocap\\DLC_Models\\PinkGreenRedJugglingBalls-JSM-2021-05-31\\config.yaml")@@ -25,7 +26,8 @@ if sesh.useDLC:stage = 7 #set your starting stage here (stage = 1 will run the pipeline from webcams)sesh.debug = False-sesh.sessionID = 'sesh_21-06-10_151714' #fill in if you are running from Stage 2 onwards+sesh.sessionID = '' #fill in if you are running from Stage 2 onwards+if not sesh.sessionID:dataFolder = Path.cwd()/'Data'subfolders = [ f.path for f in os.scandir(dataFolder) if f.is_dir() ] #copy-pasta from who knows where@@ -92,7 +94,7 @@ if stage <= 4:sesh.openPoseSkel_fr_mar_dim = reconstruct3D.reconstruct3D(sesh,sesh.openPoseData_nCams_nFrames_nImgPts_XYC, confidenceThreshold=.1)np.save(sesh.dataArrayPath/'openPoseSkel_3d.npy', sesh.openPoseSkel_fr_mar_dim) #save data to npy- sesh.syncedVidList = []+ sesh.syncedVidList = []if sesh.useDLC:for vid in sesh.syncedVidPath.glob('*.mp4'):sesh.syncedVidList.append(str(vid))@@ -134,15 +136,15 @@ sesh.config_settings = recordingconfig.load_config_yaml(sesh.yamlPath)# %% Stage Sevenif stage <= 7:print('Starting Skeleton Plotting')- # playskeleton.ReplaySkeleton_matplotlib(- # sesh,- # vidType=1,- # startFrame=40,- # azimuth=-90,- # elevation=-80,- # useOpenPose=useOpenPose,- # useMediaPipe=useMediaPipe,- # useDLC=useDLC)+ playskeleton.ReplaySkeleton_matplotlib(+ sesh,+ vidType=1,+ startFrame=40,+ azimuth=-90,+ elevation=-80,+ useOpenPose=sesh.useOpenPose,+ useMediaPipe=sesh.useMediaPipe,+ useDLC=sesh.useDLC)# fmc_pyqtgraph.PlaySkeleton(# sesh,# vidType=1,