diff --git a/.gitignore b/.gitignore index 063e64bb6..e4691057b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ Context Labeling App/Datasets Context Labeling App/compass-env Context Labeling App/__pycache__ -.vscode/launch.json \ No newline at end of file +.vscode/launch.json +__pycache__/ +*.pyc \ No newline at end of file diff --git a/TCN/preprocess.py b/TCN/preprocess.py index 76686bd5e..4d64236f7 100644 --- a/TCN/preprocess.py +++ b/TCN/preprocess.py @@ -567,6 +567,9 @@ def preprocess(set, var, labeltype, raw_feature_dir): # kinematics currently contains position, velocity, orientation, and gripper angle kine_dir_all = glob.glob(os.path.join("/".join(sub.split('/')[0:-1]),"kinematics/*")) + # Print the number of transcription files found + print(f"Found {len(ges_dir_all)} transcription files") + # For each transcription file for ges_dir in ges_dir_all: #[0:1]: print("\t Preprocessing: " + ges_dir) diff --git a/Translation Scripts/Context to Motion Primitives/context_to_gestures.py b/Translation Scripts/Context to Motion Primitives/context_to_gestures.py index 4d2f31c06..b6f29cfbb 100644 --- a/Translation Scripts/Context to Motion Primitives/context_to_gestures.py +++ b/Translation Scripts/Context to Motion Primitives/context_to_gestures.py @@ -963,6 +963,7 @@ def labelGs(npGrouped): # For each transcript transcripts = glob.glob(transcriptDir+"/*.txt") +print(f"Found {len(transcripts)} transcription files") for transcript in transcripts: #[0:5]: #[0:1]: # get file name of transcript trial = transcript.split("/")[-1] diff --git a/Translation Scripts/Context to Motion Primitives/context_to_motion_primitives.py b/Translation Scripts/Context to Motion Primitives/context_to_motion_primitives.py index ce90ae73d..d71297d56 100644 --- a/Translation Scripts/Context to Motion Primitives/context_to_motion_primitives.py +++ b/Translation Scripts/Context to Motion Primitives/context_to_motion_primitives.py @@ -717,6 +717,7 @@ def labelMPs(npGrouped): # For each transcript transcripts = glob.glob(transcriptDir+"/*.txt") +print(f"Found {len(transcripts)} transcription files") for transcript in transcripts: #[0:5]: #[0:1]: # get file name of transcript trial = transcript.split("/")[-1] diff --git a/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_knot_tying.py b/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_knot_tying.py index a268d60d7..86512e3ad 100644 --- a/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_knot_tying.py +++ b/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_knot_tying.py @@ -269,6 +269,7 @@ def getDistance(translated, truth): # Get list of trials trials = os.listdir(mpDir) +print(f"Found {len(trials)} transcription files") # Set up to take average edit distance editDistances = [] diff --git a/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_needle_passing.py b/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_needle_passing.py index 47b528599..c58db6808 100644 --- a/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_needle_passing.py +++ b/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_needle_passing.py @@ -270,6 +270,7 @@ def getDistance(translated, truth): # Get list of trials trials = os.listdir(mpDir) +print(f"Found {len(trials)} transcription files") # Set up to take average edit distance editDistances = [] diff --git a/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_peg_transfer.py b/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_peg_transfer.py index d02a83132..90a453a56 100644 --- a/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_peg_transfer.py +++ b/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_peg_transfer.py @@ -328,6 +328,7 @@ def getDistance(translated, truth): # Get list of trials trials = os.listdir(mpDir) +print(f"Found {len(trials)} transcription files") # Set up to take average edit distance editDistances = [] diff --git a/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_suturing.py b/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_suturing.py index 4250117c0..3bb866829 100644 --- a/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_suturing.py +++ b/Translation Scripts/Motion Primitives to Gestures/motion_primitives_to_gestures_suturing.py @@ -287,6 +287,7 @@ def getDistance(translated, truth): # Get list of trials trials = os.listdir(mpDir) +print(f"Found {len(trials)} transcription files") # Set up to take average edit distance editDistances = []