从图像获得的多维数组的标签

时间:2019-09-06 15:34:51

标签: python arrays image numpy image-processing

我有6个numpy格式的ndarray,形状为(80,50,170,110)float64

样本输入

数据 https://github.com/ichatnun/spatio-spectral-resnet-bottlenecks-rice-classification/blob/master/x.npy

标签 https://github.com/ichatnun/spatio-spectral-resnet-bottlenecks-rice-classification/blob/master/labels.npy

总共600张图像属于6个不同的类别。

我想给它们分配一个多类标签,例如0、1、2、3、4、5。我为每个numpy数据集的标签创建了一个单独的numpy 1d数组

现在我想将标签合并到数据集中,这样我就可以将所有ndarray合并在一起,使数据以带有标签的(600,50,170,110)的形状在一起。

我尝试了连接,附加,hstack方法,但它给出了错误。

错误消息

ValueError: all the input arrays must have same number of dimensions

预期产量

分配标签并创建数据集的单个ndarray。

0 个答案:

没有答案