Your code tries to load .h5 files from the ground truth directory:
with h5py.File(img_path.replace('.jpg','.h5').replace('images','ground_truth'), 'w')
Neither are .h5 files included in the google drive file, nor you do generate them in the code. (as far as I ca see it). Did you omit any intermediate steps that you performed elsewhere?
(Or do you actually load the .mat files to h5py?)
image_object = bucket.Object(img_path.replace('.jpg','.mat').replace('images/','ground_truth/GT_'))
with h5py.File(image_object.get()['Body'].read(), 'w') as hf: :
hf['density'] = k
Your code tries to load .h5 files from the ground truth directory:
with h5py.File(img_path.replace('.jpg','.h5').replace('images','ground_truth'), 'w')
Neither are .h5 files included in the google drive file, nor you do generate them in the code. (as far as I ca see it). Did you omit any intermediate steps that you performed elsewhere?
(Or do you actually load the .mat files to h5py?)