本文整理汇总了Python中feature.Feature.getLabelImage方法的典型用法代码示例。如果您正苦于以下问题:Python Feature.getLabelImage方法的具体用法?Python Feature.getLabelImage怎么用?Python Feature.getLabelImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类feature.Feature
的用法示例。
在下文中一共展示了Feature.getLabelImage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from feature import Feature [as 别名]
# 或者: from feature.Feature import getLabelImage [as 别名]
scipy.io.savemat(folder+"texture", {'features':feature.getSuperpixelsTexture()}, oned_as='column')
scipy.io.savemat(folder+"features_combined", {'features':feature.getFeaturesVectors()}, oned_as='column')
if file_labels[i] != TESTING:
# store data
if file_labels[i] == TRAINING:
train_superpixels.append(feature.getSuperpixelImage())
train_labels = np.append(train_labels, labels, 0)
if train_data==[]:
train_data = feature_vectors
else:
train_data = np.vstack((train_data,feature_vectors))
else:
valid_superpixels.append(feature.getSuperpixelImage())
#validation_original_image.append(images[i])
valid_pixels_labels.append(getPixelLabel(feature.getLabelImage()))
valid_files_count += 1
valid_labels = np.append(valid_labels, labels, 0)
if valid_data==[]:
valid_data = feature_vectors
else:
valid_data = np.vstack((valid_data,feature_vectors))
else:
test_files_count += 1
test_superpixels.append(feature.getSuperpixelImage())
#testOriginalImage.append(images[i])
#test_files = sp.getSuperValidFiles(fe.getSuperpixelImage(), test_files_count, test_files)
test_pixels_labels.append(getPixelLabel(feature.getLabelImage()))
test_files_count += 1
test_labels = np.append(test_labels, labels, 0)
if test_data==[]: