nhanson2 commited on
Commit
2eda0ee
·
verified ·
1 Parent(s): c963de0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -60,7 +60,23 @@ The paper is is available on [Arxiv](https://arxiv.org/abs/2308.08058). If you u
60
  organization={IEEE}
61
  }
62
  ```
 
 
 
 
 
 
 
 
 
 
63
 
 
 
 
 
 
 
64
  In addition to the 500 labeled hyperspectral datacubes, raw ROS bagfiles generated of each of the sensor feeds at a higher frame rate are available [here](https://river-lab.github.io/hyper_drive_data/Data_Set.html). These files are provided as an additional resource and do not contain semantic labels, but contain ~10,000 additional hyperspectral datacubes of in-between frames from the labeled dataset. It also contains additional datatypes for terrain analysis such as inertial measurement unit (IMU) data. To the best of the authors knowledge, it is the **largest vehicle-centric hyperspectral dataset** currently available!
65
 
66
  *This research was sponsored by the United States Army Core of Engineers (USACE) Engineer Research and Development Center (ERDC) Geospatial Research Laboratory (GRL) and was accomplished under Cooperative Agreement Federal Award Identification Number (FAIN) W9132V-22-2-0001. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of USACE EDRC GRL or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.*
 
60
  organization={IEEE}
61
  }
62
  ```
63
+ ### Sample Dataloading Code
64
+ Hugging face by default has difficulty loading multi-channel TIFFs. This snippet shows an example of how to load the dataset. It is _highly_ recommended to enable `streaming` through the HuggingFace API.
65
+ ```
66
+ from datasets import load_dataset, Image
67
+ from io import BytesIO
68
+ import tifffile
69
+
70
+ def decode_hyperspectral_tiff(batch):
71
+ batch["hsi"] = tifffile.imread(BytesIO(batch['hsi']["bytes"]))
72
+ return batch
73
 
74
+ dataset = load_dataset("nhanson2/hyper_drive", split='train', streaming=True)
75
+ dataset = dataset.cast_column("rgb", Image(mode='RGB', decode=True))
76
+ dataset = dataset.cast_column("hsi", Image(decode=False))
77
+ dataset = dataset.cast_column("segmentation", Image(mode='L', decode=True))
78
+ dataset = dataset.map(decode_hyperspectral_tiff)
79
+ ```
80
  In addition to the 500 labeled hyperspectral datacubes, raw ROS bagfiles generated of each of the sensor feeds at a higher frame rate are available [here](https://river-lab.github.io/hyper_drive_data/Data_Set.html). These files are provided as an additional resource and do not contain semantic labels, but contain ~10,000 additional hyperspectral datacubes of in-between frames from the labeled dataset. It also contains additional datatypes for terrain analysis such as inertial measurement unit (IMU) data. To the best of the authors knowledge, it is the **largest vehicle-centric hyperspectral dataset** currently available!
81
 
82
  *This research was sponsored by the United States Army Core of Engineers (USACE) Engineer Research and Development Center (ERDC) Geospatial Research Laboratory (GRL) and was accomplished under Cooperative Agreement Federal Award Identification Number (FAIN) W9132V-22-2-0001. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of USACE EDRC GRL or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.*