I am trying to augment existing labeled bounding boxed image for making more object detection training data using the function tf.image.sample_distorted_bounding_box but I keep getting these errors found here. I'm pretty sure my bounding box is set correctly because it works when I draw the bounding box.
img = mpimg.imread('bPawn0.jpg')
img = img.reshape(1,300,300,3)
boxes = [100,88,253,209]
box = np.ones([1,1,4])
for i in range(4):
box[:,:,i] = boxes[i]/300
box = tf.convert_to_tensor(box, np.float32)
begin, size, bbox_for_draw = tf.image.sample_distorted_bounding_box(tf.shape(img),bounding_boxes=box)
ValueError: Tried to convert 'min_object_covered' to a tensor and failed. Error: None values not supported.
Any suggestions as to what I am doing wrong here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…