def ProDeeplearningMain(folder_test = '', folder_train = '', analysis_type = dict()): if analysis_type["analysis_type"] == 0: SegmentMain.segmentMain(folder_test, folder_train, analysis_type) elif analysis_type["analysis_type"] == 1: DetectionMain.detectionMain(folder_test, folder_train, analysis_type) elif analysis_type["analysis_type"] == 2: # detection + classify # DetectionMain.detectionMain(folder_test, folder_train, analysis_type) ClassifyMain.classifyMain(folder_test, folder_train, analysis_type) else: raise ValueError("Analysis Mapping Wrong") print("Test folder: ", folder_test) print("Analysis type: ", analysis_type) print("complete")
def classify(anklePath, hipPath, options): print("---- Classification ---- \n") print("Calculating features...") features = getFeatures(anklePath, hipPath) print("Predicting classification...") data = fm.main(True, options['p']) result = cm.predict(data, features, options['a'], options['c'], options['f']) print(result)
def ProDeeplearningMain(folder_test='', folder_train='', analysis_type=dict()): # convert 1024*1024 or 512*512 to 256*256 folder_test = cropImg(analysis_type, folder_test) if analysis_type["analysis_type"] == 0: SegmentMain.segmentMain(folder_test, folder_train, analysis_type) elif analysis_type["analysis_type"] == 1: DetectionMain.detectionMain(folder_test, folder_train, analysis_type) elif analysis_type["analysis_type"] == 2: # detection + classify DetectionMain.detectionMain(folder_test, folder_train, analysis_type) ClassifyMain.classifyMain(folder_test, folder_train, analysis_type) else: raise ValueError("Analysis Mapping Wrong") print("Test folder: ", folder_test) print("Analysis type: ", analysis_type) print("complete")
def experiment(options): data = fm.main(True, options['p']) cm.main(data, options['f'])