Primary competition visual

Africa Biomass Challenge

Helping Côte d'Ivoire
$10 000 USD
Completed (almost 3 years ago)
Earth Observation
Prediction
1223 joined
276 active
Starti
Jan 27, 23
Closei
May 21, 23
Reveali
May 21, 23
User avatar
Koleshjr
Multimedia university of kenya
Extracting the bands
Help · 25 Apr 2023, 12:54 · 1

Just a question how do you extract the band values from the images? Can someone share the function to do that or even a starter notebook that utilizes the band features as inputs to a tabular solution for this problem ?

Discussion 1 answer

All you need to do is

"""

import h5py

trainset = h5py.File("/path/to/file/09072022_1154_train.h5", "r")

train_images = np.array(trainset['images'], dtype=np.float64)

"""

You should have an numpy array of size (25036, 15,15,12)

To get band 10 of image number 25, try

band_10 = train_images[24, :, :, 9]

25 Apr 2023, 14:57
Upvotes 1