I implemented the Object Detection with RetinaNet Code by https://keras.io/examples/vision/retinanet/.
Now i want to import the Metric MeanAveragePrecision. I try to use the keras_cv.metrics.COCOMeanAveragePrecision as metric but i get for mAP and REcall 0. Can someone tell me what i do wrong, or is there another way to get the Map or IoU metric?
I put the metric call in my model compile
resnet50_backbone = get_backbone()
loss_fn = RetinaNetLoss(num_classes)
model = RetinaNet(num_classes, resnet50_backbone)
optimizer = tf.optimizers.SGD(learning_rate=learning_rate_fn, momentum=0.9)
model.compile(loss=loss_fn, optimizer=optimizer, metrics=[keras_cv.metrics.COCOMeanAveragePrecision(
bounding_box_format="xyxy",
max_detections=100,
class_ids=range(80),
area_range=(0, 64**2),
name="Mean Average Precision",
)])
the resnet50_backbone, loss_fn, and model ist from the keras implementation i linked at the top