{
  "id": 614778,
  "title": "Error in the code or data on the inference",
  "url": "/competitions/recodai-luc-scientific-image-forgery-detection/discussion/614778",
  "author_name": "",
  "post_date": "2025-11-06T12:19:06.099577300Z",
  "votes": 5,
  "comment_count": 7,
  "views": 0,
  "content": "<p>Hi, I have already made more than 70 submissions and still do not understand what the error is, I used yolo, deeplab, R-CNN and all approaches give a bad result, I do not believe that yolo with 3 different versions, augmentations, etc. could not segment correctly on conf=0.7+, can you please check the correctness of my inference because I took the rle_encode from the file metruc code, there is a feeling that I messed up and the correct version was earlier, which I removed</p>\n<pre><code> ():\n    \n    mask = mask.astype()\n    flat = mask.T.flatten()\n    dots = np.where(flat)[]\n     (dots) == :\n         json.dumps([])\n\n    run_lengths = []\n    prev = -\n     b  dots:\n         b &gt; prev + :\n            run_lengths.extend([b + , ])\n        run_lengths[-] += \n        prev = b\n\n    run_lengths = [(x)  x  run_lengths]\n     json.dumps(run_lengths)\n\n\npredictions = {}\ntest_files = (os.listdir(TEST_IMAGES_DIR))\n\n file  tqdm(test_files, desc=):\n    case_id = os.path.splitext(file)[]\n    img_path = os.path.join(TEST_IMAGES_DIR, file)\n\n    \n    image = Image.(img_path).convert()\n    original_size = np.array(image).shape[:]\n\n     torch.no_grad():\n        results = model(image, imgsz=, verbose=)\n\n    result = results[]\n    masks = result.masks\n    boxes = result.boxes\n\n     masks    (masks) == :\n        predictions[case_id] = \n        \n\n    \n    confs = boxes.conf.cpu().numpy()\n    mask_array = masks.data.cpu().numpy()\n\n    \n    CONF_THRESH = \n    valid = confs &gt; CONF_THRESH\n\n      np.(valid):\n        predictions[case_id] = \n        \n\n    \n    combined_mask_resized = np.zeros((original_size[], original_size[]), dtype=np.uint8)\n\n     i  np.where(valid)[]:\n        mask = mask_array[i]\n        \n        resized_mask = cv2.resize(mask, (original_size[], original_size[]), interpolation=cv2.INTER_NEAREST)\n        combined_mask_resized = np.logical_or(combined_mask_resized, resized_mask &gt; )\n\n    combined_mask_resized = combined_mask_resized.astype(np.uint8)\n\n     combined_mask_resized.() == :\n        predictions[case_id] = \n    :\n        rle = rle_encode(combined_mask_resized)\n        predictions[case_id] = rle\n\n\nsample_sub = pd.read_csv(SAMPLE_SUBMISSION_PATH)\nsubmission_rows = []\n\n _, row  sample_sub.iterrows():\n    case_id = (row[])\n    annotation = predictions.get(case_id, )\n    submission_rows.append({: row[], : annotation})\n\nsubmission = pd.DataFrame(submission_rows)\nsubmission.to_csv(, index=)\n</code></pre>",
  "messages": [
    {
      "id": "3312089",
      "postDate": "11/06/2025 12:19:06",
      "content": "<p>Hi, I have already made more than 70 submissions and still do not understand what the error is, I used yolo, deeplab, R-CNN and all approaches give a bad result, I do not believe that yolo with 3 different versions, augmentations, etc. could not segment correctly on conf=0.7+, can you please check the correctness of my inference because I took the rle_encode from the file metruc code, there is a feeling that I messed up and the correct version was earlier, which I removed</p>\n<pre><code> ():\n    \n    mask = mask.astype()\n    flat = mask.T.flatten()\n    dots = np.where(flat)[]\n     (dots) == :\n         json.dumps([])\n\n    run_lengths = []\n    prev = -\n     b  dots:\n         b &gt; prev + :\n            run_lengths.extend([b + , ])\n        run_lengths[-] += \n        prev = b\n\n    run_lengths = [(x)  x  run_lengths]\n     json.dumps(run_lengths)\n\n\npredictions = {}\ntest_files = (os.listdir(TEST_IMAGES_DIR))\n\n file  tqdm(test_files, desc=):\n    case_id = os.path.splitext(file)[]\n    img_path = os.path.join(TEST_IMAGES_DIR, file)\n\n    \n    image = Image.(img_path).convert()\n    original_size = np.array(image).shape[:]\n\n     torch.no_grad():\n        results = model(image, imgsz=, verbose=)\n\n    result = results[]\n    masks = result.masks\n    boxes = result.boxes\n\n     masks    (masks) == :\n        predictions[case_id] = \n        \n\n    \n    confs = boxes.conf.cpu().numpy()\n    mask_array = masks.data.cpu().numpy()\n\n    \n    CONF_THRESH = \n    valid = confs &gt; CONF_THRESH\n\n      np.(valid):\n        predictions[case_id] = \n        \n\n    \n    combined_mask_resized = np.zeros((original_size[], original_size[]), dtype=np.uint8)\n\n     i  np.where(valid)[]:\n        mask = mask_array[i]\n        \n        resized_mask = cv2.resize(mask, (original_size[], original_size[]), interpolation=cv2.INTER_NEAREST)\n        combined_mask_resized = np.logical_or(combined_mask_resized, resized_mask &gt; )\n\n    combined_mask_resized = combined_mask_resized.astype(np.uint8)\n\n     combined_mask_resized.() == :\n        predictions[case_id] = \n    :\n        rle = rle_encode(combined_mask_resized)\n        predictions[case_id] = rle\n\n\nsample_sub = pd.read_csv(SAMPLE_SUBMISSION_PATH)\nsubmission_rows = []\n\n _, row  sample_sub.iterrows():\n    case_id = (row[])\n    annotation = predictions.get(case_id, )\n    submission_rows.append({: row[], : annotation})\n\nsubmission = pd.DataFrame(submission_rows)\nsubmission.to_csv(, index=)\n</code></pre>",
      "rawMarkdown": "Hi, I have already made more than 70 submissions and still do not understand what the error is, I used yolo, deeplab, R-CNN and all approaches give a bad result, I do not believe that yolo with 3 different versions, augmentations, etc. could not segment correctly on conf=0.7+, can you please check the correctness of my inference because I took the rle_encode from the file metruc code, there is a feeling that I messed up and the correct version was earlier, which I removed\n\n```\ndef rle_encode(mask):\n    \"\"\"\n    Encode binary mask to RLE in the format required by the competition.\n    Returns a JSON string like \"[123,4,567,8]\"\n    \"\"\"\n    mask = mask.astype(bool)\n    flat = mask.T.flatten()\n    dots = np.where(flat)[0]\n    if len(dots) == 0:\n        return json.dumps([])\n    \n    run_lengths = []\n    prev = -2\n    for b in dots:\n        if b > prev + 1:\n            run_lengths.extend([b + 1, 0])\n        run_lengths[-1] += 1\n        prev = b\n    \n    run_lengths = [int(x) for x in run_lengths]\n    return json.dumps(run_lengths)\n\n#  Inference on test images\npredictions = {}\ntest_files = sorted(os.listdir(TEST_IMAGES_DIR))\n\nfor file in tqdm(test_files, desc=\"Inference\"):\n    case_id = os.path.splitext(file)[0]\n    img_path = os.path.join(TEST_IMAGES_DIR, file)\n    \n    # Uploading an image\n    image = Image.open(img_path).convert('RGB')\n    original_size = np.array(image).shape[:2]\n    \n    with torch.no_grad():\n        results = model(image, imgsz=512, verbose=False)\n\n    result = results[0]\n    masks = result.masks\n    boxes = result.boxes\n\n    if masks is None or len(masks) == 0:\n        predictions[case_id] = \"authentic\"\n        continue\n\n    # Confidence filtering\n    confs = boxes.conf.cpu().numpy()\n    mask_array = masks.data.cpu().numpy()\n\n    # Confidence threshold\n    CONF_THRESH = 0.67\n    valid = confs > CONF_THRESH\n\n    if not np.any(valid):\n        predictions[case_id] = \"authentic\"\n        continue\n\n    # Combining all valid masks\n    combined_mask_resized = np.zeros((original_size[0], original_size[1]), dtype=np.uint8)\n\n    for i in np.where(valid)[0]:\n        mask = mask_array[i]\n        # Resize the mask to the original size\n        resized_mask = cv2.resize(mask, (original_size[1], original_size[0]), interpolation=cv2.INTER_NEAREST)\n        combined_mask_resized = np.logical_or(combined_mask_resized, resized_mask > 0.5)\n\n    combined_mask_resized = combined_mask_resized.astype(np.uint8)\n\n    if combined_mask_resized.sum() == 0:\n        predictions[case_id] = \"authentic\"\n    else:\n        rle = rle_encode(combined_mask_resized)\n        predictions[case_id] = rle\n\n# Create submission\nsample_sub = pd.read_csv(SAMPLE_SUBMISSION_PATH)\nsubmission_rows = []\n\nfor _, row in sample_sub.iterrows():\n    case_id = str(row['case_id'])\n    annotation = predictions.get(case_id, \"authentic\")\n    submission_rows.append({'case_id': row['case_id'], 'annotation': annotation})\n\nsubmission = pd.DataFrame(submission_rows)\nsubmission.to_csv('submission.csv', index=False)\n```",
      "votes": null
    },
    {
      "id": "3312090",
      "postDate": "11/06/2025 12:21:46",
      "content": "<p>The error may be related to the fact that the predicted mask=512px was a different size expected?</p>",
      "rawMarkdown": "The error may be related to the fact that the predicted mask=512px was a different size expected?",
      "votes": null
    },
    {
      "id": "3312115",
      "postDate": "11/06/2025 13:37:33",
      "content": "<p>But you already resize the mask to the original size.</p>",
      "rawMarkdown": "But you already resize the mask to the original size.",
      "votes": null
    },
    {
      "id": "3312171",
      "postDate": "11/06/2025 16:27:37",
      "content": "<p>1) why do you write your own rle_encode function? Just use the one that the organizers gave.</p>\n<p>2) I see, maybe this is the error?</p>\n<pre><code>combined_mask_resized = np.zeros((original_size, original_size) # \n...\nresized_mask = cv2.resize(mask, (original_size, original_size) # \n</code></pre>",
      "rawMarkdown": "1) why do you write your own rle_encode function? Just use the one that the organizers gave.\n\n2) I see, maybe this is the error?\n\n```\ncombined_mask_resized = np.zeros((original_size[0], original_size[1]) # [0, 1]\n...\nresized_mask = cv2.resize(mask, (original_size[1], original_size[0]) # [1, 0]\n```",
      "votes": null
    },
    {
      "id": "3312227",
      "postDate": "11/06/2025 18:00:34",
      "content": "<blockquote>\n  <p>combined_mask_resized = np.logical_or(combined_mask_resized, resized_mask &gt; 0.5)</p>\n</blockquote>\n<p>How you deal multi copy/paste forges? I'm not sure but I think if multiple objects have been copied/pasted (note not the same object multiple times) each one should have a different integer. This part uniforms them all to 1.</p>\n<p>From the metric:</p>\n<blockquote>\n  <h1>Calculate F1 scores for each pair of predicted and ground truth masks</h1>\n<pre><code>   (num_instances_pred):\n     j  (num_instances_gt):\n        pred_flat = pred_masks()\n        gt_flat = gt_masks()\n        f1_matrix = (pred_mask=pred_flat, gt_mask=gt_flat)\n</code></pre>\n</blockquote>\n<p>So yes. You have to submit a different mask for copied/pasted object. Not a single common one.</p>",
      "rawMarkdown": ">combined_mask_resized = np.logical_or(combined_mask_resized, resized_mask > 0.5)\n\nHow you deal multi copy/paste forges? I'm not sure but I think if multiple objects have been copied/pasted (note not the same object multiple times) each one should have a different integer. This part uniforms them all to 1.\n\nFrom the metric:\n\n> # Calculate F1 scores for each pair of predicted and ground truth masks\n    for i in range(num_instances_pred):\n        for j in range(num_instances_gt):\n            pred_flat = pred_masks[i].flatten()\n            gt_flat = gt_masks[j].flatten()\n            f1_matrix[i, j] = calculate_f1_score(pred_mask=pred_flat, gt_mask=gt_flat)\n\nSo yes. You have to submit a different mask for copied/pasted object. Not a single common one.",
      "votes": null
    },
    {
      "id": "3312867",
      "postDate": "11/08/2025 06:02:09",
      "content": "<p>HI, after analyzing my results and visualizing several examples (see attached figure), I don’t think the issue comes from the inference code itself.\nThe RLE encoding and image resizing steps seem correct  the pipeline properly generates binary masks and saves them in the required format.</p>\n<p>However, the problem likely lies in the segmentation quality of the model outputs rather than the encoding logic.\nEven when using YOLO, DeepLab, or Mask R-CNN (with different confidence thresholds and augmentations), the predicted masks often fail to align with the ground truth, especially for subtle or small manipulations. These falsifications rely on texture and gradient inconsistencies rather than clear object boundaries, so standard detection models struggle to capture them.</p>\n<p>In other words, the RLE itself is fine, but the pixel-level masks are not discriminative enough, which leads to very low scores even if the inference logic works as expected.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F22379791%2F5d0ad179775c67524fd89d6458badf88%2FScreenshot%202025-11-08%20at%2000-51-44%20CNNDINOv2%20Hybrid.png?generation=1762581666047588&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "HI, after analyzing my results and visualizing several examples (see attached figure), I don’t think the issue comes from the inference code itself.\nThe RLE encoding and image resizing steps seem correct  the pipeline properly generates binary masks and saves them in the required format.\n\nHowever, the problem likely lies in the segmentation quality of the model outputs rather than the encoding logic.\nEven when using YOLO, DeepLab, or Mask R-CNN (with different confidence thresholds and augmentations), the predicted masks often fail to align with the ground truth, especially for subtle or small manipulations. These falsifications rely on texture and gradient inconsistencies rather than clear object boundaries, so standard detection models struggle to capture them.\n\nIn other words, the RLE itself is fine, but the pixel-level masks are not discriminative enough, which leads to very low scores even if the inference logic works as expected.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F22379791%2F5d0ad179775c67524fd89d6458badf88%2FScreenshot%202025-11-08%20at%2000-51-44%20CNNDINOv2%20Hybrid.png?generation=1762581666047588&alt=media)",
      "votes": null
    },
    {
      "id": "3313110",
      "postDate": "11/08/2025 17:03:37",
      "content": "<p>Where is the organizer code?, please tell me.</p>",
      "rawMarkdown": "Where is the organizer code?, please tell me.",
      "votes": null
    },
    {
      "id": "3314970",
      "postDate": "11/10/2025 12:51:12",
      "content": "<p>You can find the rle_encode, metrics, and related functions in this notebook:\n<a href=\"https://www.kaggle.com/code/metric/recodai-f1/\" target=\"_blank\">https://www.kaggle.com/code/metric/recodai-f1/</a></p>",
      "rawMarkdown": "You can find the rle_encode, metrics, and related functions in this notebook:\n[https://www.kaggle.com/code/metric/recodai-f1/](https://www.kaggle.com/code/metric/recodai-f1/)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3312090,
      "author_name": "antonoof",
      "author_url": "",
      "post_date": "11/06/2025 12:21:46",
      "content": "<p>The error may be related to the fact that the predicted mask=512px was a different size expected?</p>",
      "votes": null,
      "replies": [
        {
          "id": 3312115,
          "author_name": "bobtony",
          "author_url": "",
          "post_date": "11/06/2025 13:37:33",
          "content": "<p>But you already resize the mask to the original size.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 3312171,
      "author_name": "returnofsputnik",
      "author_url": "",
      "post_date": "11/06/2025 16:27:37",
      "content": "<p>1) why do you write your own rle_encode function? Just use the one that the organizers gave.</p>\n<p>2) I see, maybe this is the error?</p>\n<pre><code>combined_mask_resized = np.zeros((original_size, original_size) # \n...\nresized_mask = cv2.resize(mask, (original_size, original_size) # \n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 3313110,
          "author_name": "thangnm1",
          "author_url": "",
          "post_date": "11/08/2025 17:03:37",
          "content": "<p>Where is the organizer code?, please tell me.</p>",
          "votes": null,
          "replies": [
            {
              "id": 3314970,
              "author_name": "joophillipecardenuto",
              "author_url": "",
              "post_date": "11/10/2025 12:51:12",
              "content": "<p>You can find the rle_encode, metrics, and related functions in this notebook:\n<a href=\"https://www.kaggle.com/code/metric/recodai-f1/\" target=\"_blank\">https://www.kaggle.com/code/metric/recodai-f1/</a></p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3312227,
      "author_name": "sacuscreed",
      "author_url": "",
      "post_date": "11/06/2025 18:00:34",
      "content": "<blockquote>\n  <p>combined_mask_resized = np.logical_or(combined_mask_resized, resized_mask &gt; 0.5)</p>\n</blockquote>\n<p>How you deal multi copy/paste forges? I'm not sure but I think if multiple objects have been copied/pasted (note not the same object multiple times) each one should have a different integer. This part uniforms them all to 1.</p>\n<p>From the metric:</p>\n<blockquote>\n  <h1>Calculate F1 scores for each pair of predicted and ground truth masks</h1>\n<pre><code>   (num_instances_pred):\n     j  (num_instances_gt):\n        pred_flat = pred_masks()\n        gt_flat = gt_masks()\n        f1_matrix = (pred_mask=pred_flat, gt_mask=gt_flat)\n</code></pre>\n</blockquote>\n<p>So yes. You have to submit a different mask for copied/pasted object. Not a single common one.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3312867,
      "author_name": "djamilabenchikh",
      "author_url": "",
      "post_date": "11/08/2025 06:02:09",
      "content": "<p>HI, after analyzing my results and visualizing several examples (see attached figure), I don’t think the issue comes from the inference code itself.\nThe RLE encoding and image resizing steps seem correct  the pipeline properly generates binary masks and saves them in the required format.</p>\n<p>However, the problem likely lies in the segmentation quality of the model outputs rather than the encoding logic.\nEven when using YOLO, DeepLab, or Mask R-CNN (with different confidence thresholds and augmentations), the predicted masks often fail to align with the ground truth, especially for subtle or small manipulations. These falsifications rely on texture and gradient inconsistencies rather than clear object boundaries, so standard detection models struggle to capture them.</p>\n<p>In other words, the RLE itself is fine, but the pixel-level masks are not discriminative enough, which leads to very low scores even if the inference logic works as expected.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F22379791%2F5d0ad179775c67524fd89d6458badf88%2FScreenshot%202025-11-08%20at%2000-51-44%20CNNDINOv2%20Hybrid.png?generation=1762581666047588&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3312089": "Hi, I have already made more than 70 submissions and still do not understand what the error is, I used yolo, deeplab, R-CNN and all approaches give a bad result, I do not believe that yolo with 3 different versions, augmentations, etc. could not segment correctly on conf=0.7+, can you please check the correctness of my inference because I took the rle_encode from the file metruc code, there is a feeling that I messed up and the correct version was earlier, which I removed\n\n```\ndef rle_encode(mask):\n    \"\"\"\n    Encode binary mask to RLE in the format required by the competition.\n    Returns a JSON string like \"[123,4,567,8]\"\n    \"\"\"\n    mask = mask.astype(bool)\n    flat = mask.T.flatten()\n    dots = np.where(flat)[0]\n    if len(dots) == 0:\n        return json.dumps([])\n    \n    run_lengths = []\n    prev = -2\n    for b in dots:\n        if b > prev + 1:\n            run_lengths.extend([b + 1, 0])\n        run_lengths[-1] += 1\n        prev = b\n    \n    run_lengths = [int(x) for x in run_lengths]\n    return json.dumps(run_lengths)\n\n#  Inference on test images\npredictions = {}\ntest_files = sorted(os.listdir(TEST_IMAGES_DIR))\n\nfor file in tqdm(test_files, desc=\"Inference\"):\n    case_id = os.path.splitext(file)[0]\n    img_path = os.path.join(TEST_IMAGES_DIR, file)\n    \n    # Uploading an image\n    image = Image.open(img_path).convert('RGB')\n    original_size = np.array(image).shape[:2]\n    \n    with torch.no_grad():\n        results = model(image, imgsz=512, verbose=False)\n\n    result = results[0]\n    masks = result.masks\n    boxes = result.boxes\n\n    if masks is None or len(masks) == 0:\n        predictions[case_id] = \"authentic\"\n        continue\n\n    # Confidence filtering\n    confs = boxes.conf.cpu().numpy()\n    mask_array = masks.data.cpu().numpy()\n\n    # Confidence threshold\n    CONF_THRESH = 0.67\n    valid = confs > CONF_THRESH\n\n    if not np.any(valid):\n        predictions[case_id] = \"authentic\"\n        continue\n\n    # Combining all valid masks\n    combined_mask_resized = np.zeros((original_size[0], original_size[1]), dtype=np.uint8)\n\n    for i in np.where(valid)[0]:\n        mask = mask_array[i]\n        # Resize the mask to the original size\n        resized_mask = cv2.resize(mask, (original_size[1], original_size[0]), interpolation=cv2.INTER_NEAREST)\n        combined_mask_resized = np.logical_or(combined_mask_resized, resized_mask > 0.5)\n\n    combined_mask_resized = combined_mask_resized.astype(np.uint8)\n\n    if combined_mask_resized.sum() == 0:\n        predictions[case_id] = \"authentic\"\n    else:\n        rle = rle_encode(combined_mask_resized)\n        predictions[case_id] = rle\n\n# Create submission\nsample_sub = pd.read_csv(SAMPLE_SUBMISSION_PATH)\nsubmission_rows = []\n\nfor _, row in sample_sub.iterrows():\n    case_id = str(row['case_id'])\n    annotation = predictions.get(case_id, \"authentic\")\n    submission_rows.append({'case_id': row['case_id'], 'annotation': annotation})\n\nsubmission = pd.DataFrame(submission_rows)\nsubmission.to_csv('submission.csv', index=False)\n```",
    "3312090": "The error may be related to the fact that the predicted mask=512px was a different size expected?",
    "3312115": "But you already resize the mask to the original size.",
    "3312171": "1) why do you write your own rle_encode function? Just use the one that the organizers gave.\n\n2) I see, maybe this is the error?\n\n```\ncombined_mask_resized = np.zeros((original_size[0], original_size[1]) # [0, 1]\n...\nresized_mask = cv2.resize(mask, (original_size[1], original_size[0]) # [1, 0]\n```",
    "3312227": ">combined_mask_resized = np.logical_or(combined_mask_resized, resized_mask > 0.5)\n\nHow you deal multi copy/paste forges? I'm not sure but I think if multiple objects have been copied/pasted (note not the same object multiple times) each one should have a different integer. This part uniforms them all to 1.\n\nFrom the metric:\n\n> # Calculate F1 scores for each pair of predicted and ground truth masks\n    for i in range(num_instances_pred):\n        for j in range(num_instances_gt):\n            pred_flat = pred_masks[i].flatten()\n            gt_flat = gt_masks[j].flatten()\n            f1_matrix[i, j] = calculate_f1_score(pred_mask=pred_flat, gt_mask=gt_flat)\n\nSo yes. You have to submit a different mask for copied/pasted object. Not a single common one.",
    "3312867": "HI, after analyzing my results and visualizing several examples (see attached figure), I don’t think the issue comes from the inference code itself.\nThe RLE encoding and image resizing steps seem correct  the pipeline properly generates binary masks and saves them in the required format.\n\nHowever, the problem likely lies in the segmentation quality of the model outputs rather than the encoding logic.\nEven when using YOLO, DeepLab, or Mask R-CNN (with different confidence thresholds and augmentations), the predicted masks often fail to align with the ground truth, especially for subtle or small manipulations. These falsifications rely on texture and gradient inconsistencies rather than clear object boundaries, so standard detection models struggle to capture them.\n\nIn other words, the RLE itself is fine, but the pixel-level masks are not discriminative enough, which leads to very low scores even if the inference logic works as expected.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F22379791%2F5d0ad179775c67524fd89d6458badf88%2FScreenshot%202025-11-08%20at%2000-51-44%20CNNDINOv2%20Hybrid.png?generation=1762581666047588&alt=media)",
    "3313110": "Where is the organizer code?, please tell me.",
    "3314970": "You can find the rle_encode, metrics, and related functions in this notebook:\n[https://www.kaggle.com/code/metric/recodai-f1/](https://www.kaggle.com/code/metric/recodai-f1/)"
  },
  "source": "meta"
}