【发布时间】:2019-04-02 16:38:15
【问题描述】:
我在 python 中尝试 yolo 模型。 为了处理数据和注释,我分批获取数据。
batchsize = 50
#boxList= []
#boxArr = np.empty(shape = (0,26,5))
for i in range(0, len(box_list), batchsize):
boxList = box_list[i:i+batchsize]
imagesList = image_list[i:i+batchsize]
#to convert the annotation from VOC format
convertedBox = np.array([np.array(get_boxes_for_id(box_l)) for box_l in boxList])
#pre-process on image and annotaion
image_data, boxes = process_input_data(imagesList,max_boxes,convertedBox)
boxes = np.array(list(itertools.chain.from_iterable(boxes)))
detectors_mask, matching_true_boxes = get_detector_mask(boxes, anchors)
在此之后,我想将我的数据传递给模型进行训练。 当我附加列表时,由于数组大小,它会出现内存错误。 当我附加数组时,由于形状而出现维度错误。
如何训练数据以及我应该使用什么 model.fit() 或 model.train_on_batch()
【问题讨论】:
标签: python tensorflow image-processing keras object-detection