将边界框字典转换为-1填充的密集张量
[source]
to_dense
function
keras_cv.bounding_box.to_dense(bounding_boxes, max_boxes=None, default_value=-1)
to_dense converts bounding boxes to Dense tensors
Arguments
- bounding_boxes: bounding boxes in KerasCV dictionary format.
- max_boxes: the maximum number of boxes, used to pad tensors to a given
shape. This can be used to make object detection pipelines TPU
compatible.
- default_value: the default value to pad bounding boxes with. defaults
to -1.