Example #1
0
def plot_encoded_gestures():
    dataset = OpportunityDatasetEncoded()
    templates, labels = dataset.load_isolated_dataset()
    templates = [templates[t] for t in np.where(labels > 0)[0]]
    labels = labels[np.where(labels > 0)[0]]
    plot_creator.plot_gestures(templates, labels)
    plt.show()
Example #2
0
def plot_isolate_gestures(plot=True, save=False):
    dataset = HCIGuided()
    if plot:
        templates, labels = dataset.load_isolated_dataset()
        labels = np.array(labels)
        templates = [templates[t] for t in np.where(labels > 0)[0]]
        labels = labels[np.where(labels > 0)[0]]
        plot_creator.plot_gestures(templates, labels)
        plt.show()
Example #3
0
def plot_isolate_gestures(sensor_no=67, annotation_column=249):
    dataset = OpportunityDataset()
    data = dataset.load_data()
    stream_labels = data[:, annotation_column]
    tmp_data = data[:, sensor_no]
    templates, labels = Dataset.segment_data(tmp_data, stream_labels)
    labels = np.array(labels)
    templates = [templates[t] for t in np.where(labels > 0)[0]]
    labels = labels[np.where(labels > 0)[0]]
    plot_creator.plot_gestures(templates, labels)
    plt.show()
Example #4
0
def plot_isolate_gestures():
    dataset = WetlabDataset()
    data = dataset.load_data()
    timestamps = data[:, 0]
    stream_labels = data[:, -1]
    tmp_data = np.sqrt(data[:, 1]**2 + data[:, 2]**2 + data[:, 3]**2)
    # tmp_data = data[:, 2]
    templates, labels = Dataset.segment_data(tmp_data, stream_labels)
    labels = np.array(labels)
    templates = [templates[t] for t in np.where(labels > 0)[0]]
    labels = labels[np.where(labels > 0)[0]]
    plot_creator.plot_gestures(templates, labels)
    # subplt_1.plot(timestamps, data[:, sensor_no], linewidth=0.5)
    # subplt_2.plot(timestamps, data[:, 249], '.')
    plt.show()
Example #5
0
import matplotlib.pyplot as plt

from data_processing import data_loader as dl
from utils.plots import plot_creator as plt_creator

if __name__ == '__main__':
    plot_choice = 41
    input_file = "/home/mathias/Documents/Academic/PhD/Research/WLCSSTraining/training/cuda/beachvolleyball_encoded/variable_templates/zeus_templates_2021-01-20_16-37-08"
    dataset_choice = 'beachvolleyball_encoded'
    classes = [1001, 1002, 1003, 1004]
    if plot_choice == 0:
        templates, streams, streams_labels = dl.load_training_dataset(
            dataset_choice, classes=classes, use_quick_loader=True)
        plt_creator.plot_gestures(streams, streams_labels, classes=classes)
    elif plot_choice == 1:
        data = dl.load_continuous_dataset(dataset_choice)
        plt_creator.plot_continuous_data(data, classes=classes)
    elif plot_choice == 2:
        input_files = [
            "/home/mathias/Documents/Academic/PhD/Research/WLCSSTraining/training/cuda/hci_guided/params/zeus_param_thres_2020-08-10_15-14-30"
        ]
        plt_creator.plot_gascores(input_files)
    elif plot_choice == 21:
        # input_files = [
        #     '/home/mathias/Documents/Academic/PhD/Research/WLCSSTraining/training/cuda/hci_guided/params/poseidon_param_thres_2020-08-19_14-51-38',
        #     '/home/mathias/Documents/Academic/PhD/Research/WLCSSTraining/training/cuda/hci_guided/params/poseidon_param_thres_2020-08-19_14-57-07',
        #     '/home/mathias/Documents/Academic/PhD/Research/WLCSSTraining/training/cuda/hci_guided/params/poseidon_param_thres_2020-08-19_15-02-46',
        #     '/home/mathias/Documents/Academic/PhD/Research/WLCSSTraining/training/cuda/hci_guided/params/poseidon_param_thres_2020-08-19_15-12-43',
        #     '/home/mathias/Documents/Academic/PhD/Research/WLCSSTraining/training/cuda/hci_guided/params/poseidon_param_thres_2020-08-19_15-19-31']
        input_files = [
            "/home/mathias/Documents/Academic/PhD/Research/WLCSSTraining/training/cuda/opportunity_encoded/params_perclass/poseidon_param_thres_2020-12-08_18-57-59",
Example #6
0
def plot_isolate_gestures():
    dataset = SkodaMini()
    templates, labels = dataset.load_isolated_from_mat()
    plot_creator.plot_gestures(templates, labels)
    plt.show()
Example #7
0
def plot_isolated_gestures():
    dataset = BeachVolleyball()
    templates, labels = dataset.load_isolated_dataset()
    plot_creator.plot_gestures(templates, labels)
    plt.show()
Example #8
0
def plot_isolated_gestures_quick_loader():
    dataset = HCITable()
    templates, streams, labels = dataset.quick_load_training_dataset()
    plot_creator.plot_gestures(streams, labels)
    plt.show()
Example #9
0
def plot_isolate_gestures(plot=True, save=False):
    dataset = HCITable()
    streams, labels = dataset.load_isolated_dataset()
    plot_creator.plot_gestures(streams, labels)
    plt.show()
Example #10
0
def plot_isolated_gestures(plot_null=False):
    dataset = UWaveGestureLibraryX()
    templates, labels = dataset.load_isolated_dataset()
    plot_creator.plot_gestures(templates, labels)
    plt.show()
Example #11
0
def plot_isolated_gestures():
    dataset = SHLPreview()
    streams, labels = dataset.load_isolated_dataset()
    plot_creator.plot_gestures(streams, labels)
    plt.show()
Example #12
0
def plot_isolate_gestures():
    dataset = UTDMhad()
    templates, labels = dataset.load_isolated_dataset()
    plot_creator.plot_gestures(templates, labels)
    plt.show()