Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

Fixing up stage 2 of pipeline

Aaron Cheriande360b2930a2
diff --git a/freemocap/session.py b/freemocap/session.py
index 3ee61d41..f72f5c11 100644
--- a/freemocap/session.py
+++ b/freemocap/session.py
@@ -44,6 +44,8 @@ class Session: #self like "recording self"
self.session_settings = self.create_session_dictionary()
self.create_session_txt(paramDict,rotDict)
+ self.save_session()
+
def create_session_paths(self):
diff --git a/freemocap/webcamGUI.py b/freemocap/webcamGUI.py
index 7275c845..83ca4e81 100644
--- a/freemocap/webcamGUI.py
+++ b/freemocap/webcamGUI.py
@@ -51,6 +51,9 @@ def initialize(session, stage, board):
parameters['saved']['rotations'] = rotDict
parameters['saved']['parameters'] = paramDict
parameters_yaml.dump(parameters, parameter_path)
+
+ #save recording parameters to the config yaml
+
#create a list from the rotation dictionary to be used in running webcams
rotation_input = list(rotDict.values())
@@ -71,6 +74,14 @@ def initialize(session, stage, board):
#create a config yaml and text file for this session
session.start_session(session.parameterDictionary,session.rotationInputs)
+ session.session_settings['recording_parameters']['RotationInputs'] = rotDict
+ session.session_settings['recording_parameters']['ParameterDict'] = paramDict
+ #configyaml = YAML()
+ #sessionsettings = configyaml.load(session.session_yaml_path)
+ #sessionsettings['recording_parameters']['RotationInputs'] = rotDict
+ #sessionsettings['recording_parameters']['ParameterDict'] = paramDict
+ #configyaml.dump(sessionsettings, session.session_yaml_path)
+ #print(sessionsettings)
#config_yaml_path = recordingconfig.createSession(session,filepath)
#recordingconfig.createSessionTxt(session,paramDict,rotDict)
@@ -90,8 +101,8 @@ def initialize(session, stage, board):
session.initialize(stage)
#from the config settings add the camera input parameters to parameter dictionary
- session.parameterDictionary = session.config_settings['CamInputs']['ParameterDict']
- session.rotationInputs = session.config_settings['CamInputs']['RotationInputs']
+ session.parameterDictionary = session.session_settings['recording_parameters']['ParameterDict']
+ session.rotationInputs = session.session_settings['recording_parameters']['RotationInputs']
#initialize the path to the timestamp csv
csvName = session.sessionID + '.csv'
diff --git a/runme_fmc_staged.py b/runme_fmc_staged.py
index adb895e7..010b38d3 100644
--- a/runme_fmc_staged.py
+++ b/runme_fmc_staged.py
@@ -34,14 +34,14 @@ stage = 1 #set your starting stage here (stage = 1 will run the pipeline from we
#6/31/21 log -AC
#running from Stages 3,4,6,7 and 8 work until the end now
#stage 1 till the end presumably works - still need to do a full run thruogh
-#stage 2 still out of order
#**only tested with openPose - mediaPipe probably wont work
+# -update, got stage 2 onwards to work (I think)
sesh.debug = False
-sesh.sessionID = 'sesh_21-07-01_142123' #fill in if you are running from Stage 2 onwards
+sesh.sessionID = '' #fill in if you are running from Stage 2 onwards