Train.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:BirdProject 作者: ZlodeiBaal 项目源码 文件源码
def PrepareDataList(BASE, length):
    List = []
    for M in range(0,min(length,len(BASE))):
        img, text = BASE[M]
        image = misc.imread(img,mode='RGB')
        #image = misc.imresize(image, [227, 227])
        r1 = []
        if isfile(text):
            f = open(text, 'r')
            s = f.readline()
            st = s.split(' ')
            for i in range(0,2):
                r1.append(int(st[i]))
            f.close()
        else: #If there are no txt file - "no bird situation"
            r1.append(0);
            r1.append(0);
        List.append([image,r1])
    return List

# Random test and train list
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号