open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.91k stars 1.65k forks source link

transforms/loading: support reading numpy files (.npy, .npz) #2950

Open jonGuti13 opened 1 year ago

jonGuti13 commented 1 year ago

This PR is related to open-mmlab/mmsegmentation#3365.

Motivation

Add support for reading numpy images which will enable working with hyperspectral/multispectral databases.

Modification

I have modified mmcv/transforms/loading.py so as to correctly open Numpy files. Documentation file openmm/mmcv/docs/en/understand_mmcv/data_process.md has also been updated. I lack the capacity to correct openmm/mmcv/docs/zh_cn/understand_mmcv/data_process.md.

BC-breaking (Optional)

No.

Use cases (Optional)

This PR is related to open-mmlab/mmsegmentation#3365 which aims to include HSI Drive 2.0 dataset, a hyperspectral database, to the repository.

Checklist

Before PR:

After PR:

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

kbasterr commented 1 year ago

This would be great!