Пример #1
0
        "tab": ["gx", "gy", "gz"]
    }
)  # gx, gy, gz are the names of the columns for the Gyroscope in the CSV Files
Extractor.AddDevice(
    {
        "name": "Magnetometer",
        "tab": ["mx", "my", "mz"]
    }
)  # mx, my, mz are the names of the columns for the Magnetometer in the CSV Files

# If the dataset is not here, download it.
if not os.path.isdir("Datasets/"):
    import subprocess

    def git(*args):
        return subprocess.check_call(['git'] + list(args))

    print("Datasets not detected.")
    print("Downloading ...")
    git("clone", "https://github.com/LIARALab/Datasets.git")
    print("Downloaded.")

raw_folder = "Datasets/ActivitiesExercisesRecognition/raw/A/"  # Path to one exercice of this data
exercice = "ExoFente"  # Folder containing the exercice
full_path = raw_folder + exercice + "/"  # Compilation

print("Running Extractor on \"" + full_path + "\"...")
Extractor.ExtractFeaturesFromFolder(
    full_path, output_file="output.csv",
    class_added=exercice)  # Running the Extractor on whole folder
print("Finished !")