yyyyangyi / CNNs-for-Multi-Source-Remote-Sensing-Data-Fusion

MIT License
55 stars 5 forks source link

About MUUFL dataset extraction #2

Closed 4fee8fea closed 2 years ago

4fee8fea commented 2 years ago

Hi, @yyyyangyi

Thanks for your detailed reply a month ago in #1 , which encouraged me a lot!

I have tried to extract information from the MUUFL dataset directly, and compare the resulting files with yours. The codes are as follows:

from scipy import io muufl = io.loadmat('muufl_gulfport_campus_1_hsi_220_label.mat')['hsi'] HSI = muufl[0][0]['Data'] # (325, 220, 64) LiDAR = muufl[0][0]['Lidar'][0][0]['z'][0][0] # (325, 220, 2) labels = muufl[0][0]['sceneLabels'][0][0]['labels'] # (325, 220)

The compare results are as follows: (HSI == io.loadmat('hsi_data.mat')['hsi_data']).all() # True (LiDAR == io.loadmat('lidar_data.mat')['lidar_data']).all() # False (labels == io.loadmat('labels.mat')['labels']).all() # True

Could you please tell me what causes the difference within the LiDAR datasets?

Thanks!

P.S. The muufl_gulfport_campus_1_hsi_220_label.mat data structure is as follows:

muufl_gulfport_campus_1_hsi_220_label.mat

└── hsi
    ├── info  
        ├── description //description of the data collection
        ├── samples // ==220, equals to number of columns in the data
        ├── lines   // ==325, equals to number of rows in the data
        ├── bands   //==64, number of spectral bands in the data
        ├── sensor_type //=='HSI' for hyperspectral imaging
        ├── map_info 
            ├── projection //=='UTM'
            ├── dx  //=='1', 1 meter ground sample distance in x direction
            ├── dy  //=='1', 1 meter ground sample distance in y direction
            ├── zone //==16, UTM zone
            ├── hemi //=='North', north hemisphere
            ├── datum //=='WGS-84'
            ├── units //=='Meters'
        ├── wavelength_units //=='Nanometers'
        ├── wavelength   //wavelength information for each band
        ├── original_file_name   //file name for original data collection
        └──remove_band_index //remove first four and last four bands due to noise
    ├── Data  //HSI data cube: 325x220x64
    ├── Northing
    ├── Easting
    ├── Lat
    ├── Lon
    ├── Lidar // LiDAR from two returns, rasterized
        ├── x
        ├── y
        ├── z 
        └──info
    ├── sceneLabels     //scene annotations
        ├── Materials_Type  //11 materials in the scene 
        ├── Materials_rowIndices   // row indices of each material 
        ├── Materials_colIndices   // column indices of each material 
        ├── Materials_Indices     // RGB image indices of each material 
        ├── subLabels_description   //each cell contains material types of sub-labels for each class
        ├── subLabels_labels    // sub-labels for each class. Note that this label correspond to the ordering in 'subLabels_description'.
        └── labels //overall labels for all 12 classes (labels -1 'un-labeled' plus 11 materials) of materials in the scene
    ├── groundTruth  //ground truth information of targets in the scene
        ├── Targets_UTMx  //UTM Easting for all targets
        ├── Targets_UTMy  //UTM Northing for all targets
        ├── Targets_Lat   //Latitude (Degrees) for all targets
        ├── Targets_Lon   //Longitude (Degrees) for all targets
        ├── Targets_ID    //numerical identifier for the target
        ├── Targets_Size  //size of all targets. one of {0.5, 1, 3, 6} indicating target size. The 0.5, 1, and 3, are square targets of that dimension (ie 3m by 3m), the size 6 are the large 6m by 10m calibration cloths in the center of the campus
        ├── Targets_Type  //cloth color, one of {faux vineyard green, pea green, dark green, brown, vineyard green} for the regular targets, or one of {red,black,blue,green} for the large calibration cloths
        ├── Targets_Elevated  //one of {0,1} indicating if the target was on an elevated platform
        ├── Targets_HumanCat  //one of {0,1,2} indicating occlusion category. 0 unoccluded, 1 part or fully in shadow but no tree occlusion, 2 part or full occlusion by tree
        ├── Targets_HumanConf  //one of {1,2,3,4} indicating target visibility. That is, whether the human truthers felt they could identify the target in the data. Scale of: 1 visible, 2 probably visible, 3 possibly visible, 4 not visible
        ├── Targets_rowIndices  //target row indices (as in the RGB imagery)
        ├── Targets_colIndices  //target column indices (as in the RGB imagery)
        └── id   //version and contact
    └── RGB    //RGB imagery, 325x220x3
yyyyangyi commented 2 years ago

Hi,

As the annotation in the data structure file says, the lidar data contains "LiDAR from two returns". So we averaged the two lidar arrays. The matlab script we used for preprocessing is:

lidar_data = (hsi.Lidar{1,1}.z + hsi.Lidar{1,2}.z) / 2;

Hope this answers your question :)

4fee8fea commented 2 years ago

Thanks a lot !