-
Set Up:
- Place the hyperspectral
.mat
files in the appropriate folder.
- Place the hyperspectral
-
Run the Program:
- Open the
maincode.py
file. - Modify the file paths for
image_path
andgt_path
as required.
- Open the
-
Example Usage: Modify the following section in the code to customize your workflow:
classifier = HyperspectralImageClassifier( image_path=r'path_to/Indian_pines_corrected.mat', gt_path=r'path_to/Indian_pines_gt.mat' ) classifier.read_data() classifier.visualize_bands(n=5, save_path=r'path_to/IP_Bands.png') classifier.visualize_ground_truth(save_path=r'path_to/IP_GT.png') classifier.extract_pixels(save_path=r'path_to/Dataset.csv') classifier.apply_pca(n_components=40, save_path=r'path_to/IP_40_PCA.csv') classifier.visualize_pca_bands(m=5, save_path=r'path_to/IP_PCA_Bands.png') classifier.train_svm() classifier.generate_classification_map(save_path=r'path_to/IP_Classification_Map.png')
-
Notifications
You must be signed in to change notification settings - Fork 0
ladan-salimi/Hyperspectral-classification-SVM
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published