今日的工作内容
1.我准备把每天的进展和代码(retinaNet 在服务器中的myCode提交上去)
0.0278???
are you kidding me???
这个简直是太搞笑了,如果数据没问题是不可能出现这样的错误的。
后来在运行的过程中看到了这样的警告。
keras-retinanet/keras_retinanet/preprocessing/generator.py:155: UserWarning: Image with id 687 (shape (3946, 2041, 3)) contains the following invalid boxes: [array([1397., 1861., 2056., 2612., 0.])].
这个图片在这里cancers_jpg/D_4185_1.RIGHT_CC.jpg,1397,1861,2056,2612,leisons
[annotations[invalid_index, :] for invalid_index in invalid_indices]
keras-retinanet/keras_retinanet/preprocessing/generator.py:155: UserWarning: Image with id 614 (shape (4696, 2131, 3)) contains the following invalid boxes: [array([2003., 2666., 2138., 2969., 0.])].
[annotations[invalid_index, :] for invalid_index in invalid_indices]
这里是图片的宽和高的问题。确实上面加粗的bounding box 2612>图片本身的大小2041
问题是 这里shape (3946, 2041, 3)) 应该是(2041,3946,3) 宽和高的顺序正好相反
这里我不清楚是什么样的原因。
代码在这里/home/ld/keras-retinanet/keras_retinanet/preprocessing/generator.py
def filter_annotations(self, image_group, annotations_group, group):
""" Filter annotations by removing those that are outside of the image bounds or whose width/height < 0.
"""
# test all annotations
for index, (image, annotations) in enumerate(zip(image_group, annotations_group)):
# test x2 < x1 | y2 < y1 | x1 < 0 | y1 < 0 | x2 <= 0 | y2 <= 0 | x2 >= image.shape[1] | y2 >= image.shape[0]
invalid_indices = np.where(
(annotations['bboxes'][:, 2] <= annotations['bboxes'][:, 0]) |
(annotations['bboxes'][:, 3] <= annotations['bboxes'][:, 1]) |
(annotations['bboxes'][:, 0] < 0) |
(annotations['bboxes'][:, 1] < 0) |
(annotations['bboxes'][:, 2] > image.shape[1]) |
(annotations['bboxes'][:, 3] > image.shape[0])
)[0]
# delete invalid indices
if len(invalid_indices):
warnings.warn('Image with id {} (shape {}) contains the following invalid boxes: {}.'.format(
group[index],
image.shape,
annotations['bboxes'][invalid_indices, :]
))
for k in annotations_group[index].keys():
annotations_group[index][k] = np.delete(annotations[k], invalid_indices, axis=0)
return image_group, annotations_group
后来我无意中看到
image_min_side : After resizing the minimum side of an image is equal to image_min_side.
image_max_side : If after resizing the maximum side is larger than image_max_side, scales down further so that the max side is equal to image_max_side.
image_min_side=800,
image_max_side=1333,
python train.py --backbone=resnet50 --batch-size=8 --step=90 --epochs=10 --gpu 2 --image-min-side=224 --random–transform csv
1.–image-min-side=224 这里的最小的尺寸 需要重新商榷
2.batchsize*steps=样本的总数
晚上的时候有一点点负能量,脑袋里又是感情问题。跑步了1小时以后 觉得应该把注意力foucus在我的实验上,毕竟实验差了这么多我心里还没点数吗,浪了整个研一上,这周6的舞蹈课我也没去上。
今天早上的闹钟没把我叫醒,因为手机没电,我刚刚把ipad 设置了alarm 我不信明天起不来了~~
总的来说目前的状态整体 比之前的好一些
专注在学习上,对抗抑郁症!!!!
盐酸舍曲林就是个垃圾~