from skimage import io # VisualizationSE- import seaborn as sns import visdom # 可视化工具 import torchvision import scipy.io as scio import os from utils import metrics, convert_to_color_, convert_from_color_,\ display_dataset, display_predictions, explore_spectrums, plot_spectrums, plot_spectrums_, \ sample_gt, build_dataset, show_results, compute_imf_weights, get_device from datasets import get_dataset, HyperX, open_file, DATASETS_CONFIG from CBW import get_model, train, test, save_model import argparse dataset_names = [ v['name'] if 'name' in v.keys() else k for k, v in DATASETS_CONFIG.items() ] # 提取dataset的名称 # 利用argparse设置参数 # Argument parser for CLI interaction parser = argparse.ArgumentParser(description="Run deep learning experiments on" " various hyperspectral datasets") parser.add_argument( '--dataset', type=str, default='Salinas', choices=dataset_names, # 数据集!!! help="Dataset to use. IndianPines; PaviaU; Salinas") parser.add_argument('--model', type=str, default="CBW",
sample_gt, build_dataset, show_results, compute_imf_weights, get_device, ) from datasets import get_dataset, HyperX, open_file, DATASETS_CONFIG from models import get_model, train, test, save_model import argparse # save train/test split import scipy.io dataset_names = [ v["name"] if "name" in v.keys() else k for k, v in DATASETS_CONFIG.items() ] # Argument parser for CLI interaction parser = argparse.ArgumentParser(description="Run deep learning experiments on" " various hyperspectral datasets") parser.add_argument("--dataset", type=str, default=None, choices=dataset_names, help="Dataset to use.") parser.add_argument( "--model", type=str, default=None, help="Model to train. Available:\n"