コード例 #1
0
    def test_angle_distribution_large_speed(self):
        filter_method = drive_record_filter_include_all
        tubgroup = TubGroup("../data/log_w_6,../data/log_w_7")
        dataset = DriveDataSet.from_tubgroup(tubgroup.df,
                                             filter_method=filter_method,
                                             fake_image=True)

        plt = Plot.angle_distribution(dataset.angles())
        plt.savefig("angle/angle_distribution_original_faster_max_speed.jpg")
コード例 #2
0
def create_real_dataset(filter_method):
    tubgroup = TubGroup(
        "data/log_20,data/log_21,data/log_23,data/log_1,data/log_2,data/log_3,data/log_4,data/log_w_6,data/log_w_7"
    )

    print("splitting train / validation 0.9/0.1")

    train_df = tubgroup.df.sample(frac=0.9, random_state=200)
    val_df = tubgroup.df.drop(train_df.index)

    train_data_set = DriveDataSet.from_tubgroup(train_df,
                                                filter_method=filter_method,
                                                fake_image=False)
    val_data_set = DriveDataSet.from_tubgroup(val_df,
                                              filter_method=filter_method,
                                              fake_image=False)

    print("dataset created")

    return train_data_set, val_data_set
コード例 #3
0
 def create_real_dataset(filter_method):
     tubgroup = TubGroup("../data/aws")
     return DriveDataSet.from_tubgroup(tubgroup.df,
                                       filter_method=filter_method,
                                       fake_image=False)