单幅图像的深度学习,对NYU数据集进行划分

针对分割问题,官方已经划分好了:http://cs.nyu.edu/~silberman/projects/indoor_scene_seg_sup.html

import numpy as np
import scipy.io as sio

data = sio.loadmat('splits.mat')

train_idx = data['trainNdxs']
test_idx = data['testNdxs']

train_size = len(train_idx)
test_size = len(test_idx)

partitions = [0] * (train_size + test_size)

for i in range(test_size):
	idx = test_idx[i][0]
	partitions[idx - 1] = 1

print partitions







上一篇:潭州课堂25班:Ph201805201 爬虫基础 第九课 图像处理- PIL (课堂笔记)


下一篇:NodeJs在windows上安装配置测试