Ejemplo n.º 1
0
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 24 11:30:27 2015

@author: Henry
"""
##

import sys
from GenSimList import Load
from GenSimList import GenListsFile

imgInfotxt = Load('../finaldata/imgInfo.txt')

#%%

total = len(imgInfotxt)
print imgInfotxt[1][1]

#%%
print imgInfotxt[1]
print imgInfotxt[1116]
name = []
catg = []
attb = []
for i in range(0, total):
    name.append(imgInfotxt[i][0])
    catg.append(imgInfotxt[i][1])
    attb.append(imgInfotxt[i][2])

#%%
Ejemplo n.º 2
0
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 24 11:30:27 2015

@author: Henry
"""
##

import sys
from GenSimList import Load
from GenSimList import GenListsFile

imgInfotxt = Load('../finaldata/list_final_eva_image.txt')

#%%

total = len(imgInfotxt)
print total
print imgInfotxt[0]

#%%
label = 0
chunk = 50000
idx = 0

for chi in range(total / chunk):
    fimgtrain = open('../finaldata/fimgeva_' + str(chi) + '.txt', 'w')
    for idx in range(chi * chunk, (chi + 1) * chunk):
        fimgtrain.write(imgInfotxt[idx][0] + ' ' + str(label) + '\n')
    fimgtrain.close()
#%%
Ejemplo n.º 3
0
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 24 11:30:27 2015

@author: Henry
"""
##

import sys
from GenSimList import Load
from GenSimList import GenListsFile

imgInfotxt = Load('imgInfo.txt')

#%%

total = len(imgInfotxt)
print imgInfotxt[1][1]

#%%
print imgInfotxt[1]
print imgInfotxt[1116]
name = []
catg = []
attb = []
for i in range(0, total):
    name.append(imgInfotxt[i][0])
    catg.append(imgInfotxt[i][1])
    attb.append(imgInfotxt[i][2])

#%%