subsampling.py 1.42 KB
Newer Older
1 2 3 4 5 6
import numpy as np
import matplotlib.pyplot as plt
import time
import sys
sys.path.append("C://Users//xbrjos//Desktop//Python")
from gepard import dataset
Josef Brandt's avatar
Josef Brandt committed
7
import gepardevaluation
8

Josef Brandt's avatar
Josef Brandt committed
9
from methods import RandomSampling, SizeBinFractioning
10
from geometricMethods import BoxSelectionCreator
11
from helpers import ParticleBinSorter
Josef Brandt's avatar
Josef Brandt committed
12
from evaluation import TotalResults
13 14


Josef Brandt's avatar
Josef Brandt committed
15 16 17 18 19 20 21 22 23 24
"""
IMPORTANT!!!
SET GEPARD TO EVALUATION BRANCH (WITHOUT THE TILING STUFF), OTHERWISE SOME OF THE LEGACY CONVERTS MIGHT FAIL..
"""
workingFiles: list = []
workingFiles.append(r'C:\Users\xbrjos\Desktop\temp MP\190313_Soil_5_A_50_5_1_50_1\190313_Soil_5_A_50_5_1_50_1.pkl')
workingFiles.append(r'C:\Users\xbrjos\Desktop\temp MP\181018_Microcatch-St.6_50um\181018_Microcatch-St.6_50um.pkl')
workingFiles.append(r'C:\Users\xbrjos\Desktop\temp MP\190326_MCII_WWTP_SB_50_2\190326_MCII_WWTP_SB_50_2.pkl')
workingFiles.append(r'C:\Users\xbrjos\Desktop\temp MP\190326_MCII_WWTP_SB_50_1\190326_MCII_WWTP_SB_50_1.pkl')
workingFiles.append(r'C:\Users\xbrjos\Desktop\temp MP\190201_BSB_Stroomi_ds2_R1_R2_50\190201_BSB_Stroomi_ds2_R1_R2_50.pkl')
25

Josef Brandt's avatar
Josef Brandt committed
26 27
# These do not work, due to no ramanscansortindex??
# fname: str = r'C:\Users\xbrjos\Desktop\temp MP\KWS_CT_3_ds1_all_10_2\KWS_CT_3_ds1_all_10_2.pkl'
28

Josef Brandt's avatar
Josef Brandt committed
29
results: TotalResults = TotalResults()
Josef Brandt's avatar
Josef Brandt committed
30

Josef Brandt's avatar
Josef Brandt committed
31 32 33 34 35
for index, fname in enumerate(workingFiles):
    results.add_sample(fname)
t0 = time.time()
results.update_all()
print('updating all took', time.time()-t0, 'seconds')