I found out my mistake … check that you’re properly calculating the box min_max… for COCO i was under the assumption it was just part of the datasets data… when in fact you need something like this :
        # get bounding box coordinates for each mask
        num_targets = len(targets)
        boxes = []
        for i in range(num_targets):
            box = targets[i]["bbox"]
            xmin = box[0]
            xmax = box[0] + box[2]
            ymin = box[1]
            ymax = box[1] + box[3]
            boxes.append([xmin, ymin, xmax, ymax])