{
  "id": 697621,
  "title": "4th Place Solution",
  "url": "/competitions/recodai-luc-scientific-image-forgery-detection/discussion/697621",
  "author_name": "Nivratti",
  "post_date": "2026-05-06T18:08:33.103000",
  "votes": 5,
  "comment_count": 0,
  "views": 0,
  "content": "<h2>Overview</h2>\n<p>Scientific figures come in different types, simple single-panel images and compound multi-panel figures. Many images in this competition were <strong>compound figures</strong> containing multiple panels -- microscopy images, gel blots, graphs, labels, and annotations arranged together.</p>\n<p>Our approach: first understand the <strong>structure</strong> of the figure, then run reuse detection at the <strong>panel level</strong>. This kept the matching focused on actual scientific content rather than figure layout, labels, or borders.</p>\n<p>Our solution focused on <strong>inter-panel reuse detection</strong> , comparing panels against each other within the same figure. We also planned <strong>intra-panel copy-move detection</strong> (forgery within a single panel), but this module was partially implemented and not completed in time for the final submission.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3460252%2F999f9fc8a0b32bfc93a6e3490803859d%2Fsifd-inference-pipeline.png?generation=1778090730128978&amp;alt=media\" alt=\"\"></p>\n<p><strong>Figure 1.</strong> Inference pipeline. Panel detection runs first, then a figure type decision determines whether matching is needed. Compound multi-panel figures go through the full pipeline. All other figure types are predicted as authentic without running matching.</p>\n<hr>\n<h2>Code</h2>\n<p>Code: <a href=\"https://github.com/Nivratti/recodai-luc-sifd-4th-place-solution\" target=\"_blank\">https://github.com/Nivratti/recodai-luc-sifd-4th-place-solution</a></p>\n<p>The repository contains a cleaned and easier to setup version of our final inference pipeline. The public version focuses on the approach used for the competition submission and avoids unrelated post-competition experiments.</p>\n<hr>\n<h2>Data</h2>\n<h3>External Data -- PubMed Central (PMC)</h3>\n<p>We downloaded millions of scientific figures from the <a href=\"https://www.ncbi.nlm.nih.gov/pmc/\" target=\"_blank\">PubMed Central (PMC)</a> Open Access subset for analysis purposes.</p>\n<p>Raw PMC packages were downloaded paper by paper, figures were extracted from each package, and the raw package was then deleted to keep disk usage manageable.</p>\n<p>After extraction, we ran the YOLOv5 panel detector on figures to split them into three buckets: figures containing at least one Blot or Microscopy panel, figures containing only other panel types such as Flow Cytometry or Graphs, and figures where no panels were detected. Keeping these buckets separate made it easier to browse and analyze the distribution of real-world scientific figure layouts, panel sizes, aspect ratios, and arrangement patterns.</p>\n<p>A subset of the downloaded PMC figures is publicly available on Kaggle:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/datasets/chatrapati/pmc-oa-biomed-figures-20251201-20251208-base\" target=\"_blank\">PMC OA Biomedical Figures — Dec 2025 (weekly)</a></li>\n<li><a href=\"https://www.kaggle.com/datasets/chatrapati/pmc-oa-biomed-figures-2025-nov-month-base\" target=\"_blank\">PMC OA Biomedical Figures — Nov 2025 (monthly)</a></li>\n</ul>\n<hr>\n<h2>Solution Details</h2>\n<h3>1. Panel Detection</h3>\n<p>After reviewing the test set image and the article links provided by the competition host, it was clear that this was not a simple image forgery detection problem. Scientific figures are compound images with multiple panels, each representing a different experiment or condition. We decided early on to build a panel-first approach.</p>\n<p>We used a <strong>YOLOv5</strong> panel detector (adapted from <a href=\"https://github.com/researchintegrity/panel-extractor\" target=\"_blank\">ResearchIntegrity/panel-extractor</a>) to locate panels inside each figure. The model classifies panels into four types:  <strong>Blots</strong>,  <strong>Microscopy</strong>,  <strong>Flow Cytometry</strong>, and  <strong>Graphs</strong> .</p>\n<p>After analyzing the dataset, we focused only on <strong>Blots</strong> and <strong>Microscopy</strong> panels. These were the panel types where forgery actually appeared in the competition data. Flow Cytometry and graph panels were skipped</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3460252%2Fdb38a03251e9ca6c4e0f1aa3df0ec91f%2Fpanel-detection-example.png?generation=1778090779416396&amp;alt=media\" alt=\"\"></p>\n<p><strong>Figure 2.</strong> Panel detection on two compound scientific figures. Red boxes show detected <strong>Blot</strong> panels (left), blue boxes show detected <strong>Microscopy</strong> panels (right), with confidence scores shown for each. These panel crops are used as the main units for pairwise reuse detection.</p>\n<hr>\n<h3>2. Figure Kind Classification</h3>\n<p>Before running any matching, we classified every figure into one of four types based on the panel detection output:</p>\n<table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Condition</th>\n<th>Action</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>COMPOUND_MULTI</code></td>\n<td>≥ 2 Blot/Micro panels detected</td>\n<td>Run full matching pipeline</td>\n</tr>\n<tr>\n<td><code>SIMPLE</code></td>\n<td>1 panel detected touching image edge</td>\n<td>Predict <code>authentic</code>, skip</td>\n</tr>\n<tr>\n<td><code>COMPOUND_SINGLE</code></td>\n<td>1 panel detected but not touching edge</td>\n<td>Predict <code>authentic</code>,&nbsp;skip</td>\n</tr>\n<tr>\n<td><code>UNKNOWN</code></td>\n<td>0 panels detected</td>\n<td>Predict <code>authentic</code>, skip</td>\n</tr>\n</tbody>\n</table>\n<p><br></p>\n<p>Only <code>COMPOUND_MULTI</code> figures went through the full pipeline. All other types were predicted as authentic.</p>\n<p>Intra-panel copy-move detection (forgery within a single panel) was planned for <code>COMPOUND_SINGLE</code> , <code>SIMPLE</code> and <code>UNKNOWN</code> figures. The module was partially implemented but not completed in time for the final submission, so these figures were predicted as authentic.</p>\n<hr>\n<h3>3. Candidate Pruning</h3>\n<p>For compound multi-panel figures, we extracted all detected panel crops. Comparing every possible panel pair is expensive. We added a three-level pruning step before running the keypoint matcher:</p>\n<p><strong>Level 1 -- Broad Grouping</strong>\nPanels were grouped by class (<code>blot</code>, <code>microscopy</code>, <code>other</code>). Matching was only performed within groups</p>\n<p><strong>Level 2 -- Geometry Filter</strong>\nPairs were rejected if aspect ratios or areas were too different to be copies.</p>\n<p><strong>Level 3 -- CBIR Shortlisting</strong>\nAll panels were embedded using ResNet-50. For each panel, only the top-K most similar panels proceeded to keypoint matching. We used <code>cbir_topk=3</code> for the final submission.</p>\n<hr>\n<h3>4. Inter-panel reuse detection</h3>\n<p>For each candidate panel pair, we ran keypoint-based matching to detect reused regions. The matcher is based on the <a href=\"https://github.com/researchintegrity/copy-move-detection-keypoint\" target=\"_blank\">ResearchIntegrity/copy-move-detection-keypoint</a> project, extended with a Python API for pairwise cross-image matching and feature caching.</p>\n<p><strong>Feature Extraction</strong>\nWe used RootSIFT, which applies Hellinger normalization to SIFT descriptors. This improves matching quality for images with similar local textures, which is common in gel blots. Panels smaller than 300px on any side were upscaled before extraction to ensure enough keypoints.</p>\n<p><strong>Flip Detection</strong>\nFeatures were extracted from both the original and horizontally mirrored panel. If the flipped match produced a larger shared region, that result was used instead.</p>\n<p><strong>Geometric Verification</strong>\nMatched keypoints were verified using MAGSAC++, which is more robust than standard RANSAC against outliers, important for panels with repeated or noisy textures.</p>\n<p><strong>Match Decision</strong>\nA pair was declared a match if it had ≥ 20 geometrically verified inlier keypoints. Shared area was estimated via convex hull over the matched keypoints.</p>\n<hr>\n<h3>5. Mask projection back to the original image Coordinates</h3>\n<p>The reuse detector produced masks in panel-crop coordinates. The competition required masks in original image coordinates.</p>\n<p>For every matched crop mask, we projected it back to the full figure using the detected panel bounding box. This was a small but critical implementation detail, a reused region detected correctly at crop level will still score poorly if the final mask is misaligned in the original image.</p>\n<hr>\n<h3>6. Mask filtering and submission format</h3>\n<p>After grouping and projection, we applied a final filtering step before encoding the submission.</p>\n<p>We removed masks smaller than 10 pixels, merged strongly overlapping masks, and dropped anything outside the image boundary. If no valid mask remained after filtering, the figure was submitted as <code>authentic</code>.</p>\n<p>Otherwise, the remaining instance masks were RLE encoded into the competition submission format.</p>\n<hr>\n<h3>What Worked</h3>\n<p><strong>Panel-first approach</strong>\nProcessing figures at the panel level was the most important decision. Detecting panels first kept the matching focused on actual scientific content and avoided false matches from labels, borders, and figure layout.</p>\n<p><strong>Skipping figures that didn't need matching</strong>\nWe only ran the full pipeline on compound multi-panel figures. Simple, single-panel, and unknown figures were predicted as authentic without running any matching, as module to handle that figure types was not fully implemented. This significantly reduced false positives.</p>\n<p><strong>Three-level candidate pruning</strong>\nGrouping panels by class, filtering geometrically incompatible pairs, and using CBIR to shortlist similar candidates before keypoint matching reduced computation.</p>\n<p><strong>MAGSAC++ for geometric verification</strong>\nMAGSAC++ was more robust than standard RANSAC for panels with repeated or noisy textures, which is common in gel blots.</p>\n<p><strong>Connected component grouping</strong>\nGrouping matched pairs into connected components avoided duplicate instance masks when the same reused content appeared across multiple panels.</p>\n<p><strong>Modular architecture</strong>\nKeeping panel detection, keypoint matching, and CBIR as separate installable packages made it easy to benchmark and swap each component independently.</p>\n<hr>\n<h2>What Did Not Work</h2>\n<h3>Direct full-image forgery detection</h3>\n<p>Directly running general image forgery detection models on the full image did not work well.</p>\n<h3>Reducing image size too much during reuse detection</h3>\n<p>We tried reducing the maximum side length of panel images in reuse detection.</p>\n<p>It reduced accuracy when the image size became too small. Keypoint-based matching depends on local visual details, and aggressive resizing can remove small structures that are useful for matching.</p>\n<p>Because of this, we avoided resizing too aggressively in the reuse detection step.</p>\n<h3>Treating all images the same</h3>\n<p>Using the same pipeline for every image was less reliable. The figure type decision step helped us avoid unnecessary predictions.</p>\n<h3>Aggressive post-processing</h3>\n<p>Aggressive mask filtering or merging was risky.</p>\n<p>If filtering was too strong, it could remove useful small masks. If merging was too aggressive, it will combine separate reused regions into one incorrect instance.</p>\n<hr>\n<h2>What Was Not Finished</h2>\n<p>Several things were planned but not fully completed before the submission deadline.</p>\n<h3>1. Intra-Panel Copy-Move Forgery Segmentation Model</h3>\n<p>A model to detect and segment copy-move forgery within a single panel image.</p>\n<h3>2. Image Matching Models</h3>\n<p>We explored <a href=\"https://github.com/gmberton/vismatch\" target=\"_blank\">VisMatch</a> to evaluate multiple matchers including MatchAnything-RoMa, MatchAnything-EfficientLoFTR, and others.</p>\n<h3>3. Improved CV-Based Inter-Panel Reuse Detection</h3>\n<h3>4. Panel Annotation Segmentation Model</h3>\n<p>A model to segment annotation elements inside panels — text labels, arrows, scale bars, callouts, and bounding boxes etc.. The purpose was to pass the resulting annotation mask as context to the intra-panel forgery segmnetation model, allowing it to focus on actual scientific content rather than figure annotations.</p>\n<hr>\n<h3>Thanks and Acknowledgements</h3>\n<p>Thanks to Recod.ai, LUC, and the competition organizers for hosting this interesting and challenging competition.</p>\n<p>This solution builds on two open source projects by <a href=\"https://github.com/researchintegrity\" target=\"_blank\">ResearchIntegrity</a>:</p>\n<ul>\n<li><a href=\"https://github.com/researchintegrity/panel-extractor\" target=\"_blank\">panel-extractor</a> — used as the base for panel detection</li>\n<li><a href=\"https://github.com/researchintegrity/copy-move-detection-keypoint\" target=\"_blank\">copy-move-detection-keypoint</a> — used as the base for keypoint matching</li>\n</ul>\n<p>Thanks to the Kaggle community for useful discussions.</p>",
  "messages": [
    {
      "id": 3454207,
      "postDate": "2026-05-06T18:08:33.103Z",
      "content": "<h2>Overview</h2>\n<p>Scientific figures come in different types, simple single-panel images and compound multi-panel figures. Many images in this competition were <strong>compound figures</strong> containing multiple panels -- microscopy images, gel blots, graphs, labels, and annotations arranged together.</p>\n<p>Our approach: first understand the <strong>structure</strong> of the figure, then run reuse detection at the <strong>panel level</strong>. This kept the matching focused on actual scientific content rather than figure layout, labels, or borders.</p>\n<p>Our solution focused on <strong>inter-panel reuse detection</strong> , comparing panels against each other within the same figure. We also planned <strong>intra-panel copy-move detection</strong> (forgery within a single panel), but this module was partially implemented and not completed in time for the final submission.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3460252%2F999f9fc8a0b32bfc93a6e3490803859d%2Fsifd-inference-pipeline.png?generation=1778090730128978&amp;alt=media\" alt=\"\"></p>\n<p><strong>Figure 1.</strong> Inference pipeline. Panel detection runs first, then a figure type decision determines whether matching is needed. Compound multi-panel figures go through the full pipeline. All other figure types are predicted as authentic without running matching.</p>\n<hr>\n<h2>Code</h2>\n<p>Code: <a href=\"https://github.com/Nivratti/recodai-luc-sifd-4th-place-solution\" target=\"_blank\">https://github.com/Nivratti/recodai-luc-sifd-4th-place-solution</a></p>\n<p>The repository contains a cleaned and easier to setup version of our final inference pipeline. The public version focuses on the approach used for the competition submission and avoids unrelated post-competition experiments.</p>\n<hr>\n<h2>Data</h2>\n<h3>External Data -- PubMed Central (PMC)</h3>\n<p>We downloaded millions of scientific figures from the <a href=\"https://www.ncbi.nlm.nih.gov/pmc/\" target=\"_blank\">PubMed Central (PMC)</a> Open Access subset for analysis purposes.</p>\n<p>Raw PMC packages were downloaded paper by paper, figures were extracted from each package, and the raw package was then deleted to keep disk usage manageable.</p>\n<p>After extraction, we ran the YOLOv5 panel detector on figures to split them into three buckets: figures containing at least one Blot or Microscopy panel, figures containing only other panel types such as Flow Cytometry or Graphs, and figures where no panels were detected. Keeping these buckets separate made it easier to browse and analyze the distribution of real-world scientific figure layouts, panel sizes, aspect ratios, and arrangement patterns.</p>\n<p>A subset of the downloaded PMC figures is publicly available on Kaggle:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/datasets/chatrapati/pmc-oa-biomed-figures-20251201-20251208-base\" target=\"_blank\">PMC OA Biomedical Figures — Dec 2025 (weekly)</a></li>\n<li><a href=\"https://www.kaggle.com/datasets/chatrapati/pmc-oa-biomed-figures-2025-nov-month-base\" target=\"_blank\">PMC OA Biomedical Figures — Nov 2025 (monthly)</a></li>\n</ul>\n<hr>\n<h2>Solution Details</h2>\n<h3>1. Panel Detection</h3>\n<p>After reviewing the test set image and the article links provided by the competition host, it was clear that this was not a simple image forgery detection problem. Scientific figures are compound images with multiple panels, each representing a different experiment or condition. We decided early on to build a panel-first approach.</p>\n<p>We used a <strong>YOLOv5</strong> panel detector (adapted from <a href=\"https://github.com/researchintegrity/panel-extractor\" target=\"_blank\">ResearchIntegrity/panel-extractor</a>) to locate panels inside each figure. The model classifies panels into four types:  <strong>Blots</strong>,  <strong>Microscopy</strong>,  <strong>Flow Cytometry</strong>, and  <strong>Graphs</strong> .</p>\n<p>After analyzing the dataset, we focused only on <strong>Blots</strong> and <strong>Microscopy</strong> panels. These were the panel types where forgery actually appeared in the competition data. Flow Cytometry and graph panels were skipped</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3460252%2Fdb38a03251e9ca6c4e0f1aa3df0ec91f%2Fpanel-detection-example.png?generation=1778090779416396&amp;alt=media\" alt=\"\"></p>\n<p><strong>Figure 2.</strong> Panel detection on two compound scientific figures. Red boxes show detected <strong>Blot</strong> panels (left), blue boxes show detected <strong>Microscopy</strong> panels (right), with confidence scores shown for each. These panel crops are used as the main units for pairwise reuse detection.</p>\n<hr>\n<h3>2. Figure Kind Classification</h3>\n<p>Before running any matching, we classified every figure into one of four types based on the panel detection output:</p>\n<table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Condition</th>\n<th>Action</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>COMPOUND_MULTI</code></td>\n<td>≥ 2 Blot/Micro panels detected</td>\n<td>Run full matching pipeline</td>\n</tr>\n<tr>\n<td><code>SIMPLE</code></td>\n<td>1 panel detected touching image edge</td>\n<td>Predict <code>authentic</code>, skip</td>\n</tr>\n<tr>\n<td><code>COMPOUND_SINGLE</code></td>\n<td>1 panel detected but not touching edge</td>\n<td>Predict <code>authentic</code>,&nbsp;skip</td>\n</tr>\n<tr>\n<td><code>UNKNOWN</code></td>\n<td>0 panels detected</td>\n<td>Predict <code>authentic</code>, skip</td>\n</tr>\n</tbody>\n</table>\n<p><br></p>\n<p>Only <code>COMPOUND_MULTI</code> figures went through the full pipeline. All other types were predicted as authentic.</p>\n<p>Intra-panel copy-move detection (forgery within a single panel) was planned for <code>COMPOUND_SINGLE</code> , <code>SIMPLE</code> and <code>UNKNOWN</code> figures. The module was partially implemented but not completed in time for the final submission, so these figures were predicted as authentic.</p>\n<hr>\n<h3>3. Candidate Pruning</h3>\n<p>For compound multi-panel figures, we extracted all detected panel crops. Comparing every possible panel pair is expensive. We added a three-level pruning step before running the keypoint matcher:</p>\n<p><strong>Level 1 -- Broad Grouping</strong>\nPanels were grouped by class (<code>blot</code>, <code>microscopy</code>, <code>other</code>). Matching was only performed within groups</p>\n<p><strong>Level 2 -- Geometry Filter</strong>\nPairs were rejected if aspect ratios or areas were too different to be copies.</p>\n<p><strong>Level 3 -- CBIR Shortlisting</strong>\nAll panels were embedded using ResNet-50. For each panel, only the top-K most similar panels proceeded to keypoint matching. We used <code>cbir_topk=3</code> for the final submission.</p>\n<hr>\n<h3>4. Inter-panel reuse detection</h3>\n<p>For each candidate panel pair, we ran keypoint-based matching to detect reused regions. The matcher is based on the <a href=\"https://github.com/researchintegrity/copy-move-detection-keypoint\" target=\"_blank\">ResearchIntegrity/copy-move-detection-keypoint</a> project, extended with a Python API for pairwise cross-image matching and feature caching.</p>\n<p><strong>Feature Extraction</strong>\nWe used RootSIFT, which applies Hellinger normalization to SIFT descriptors. This improves matching quality for images with similar local textures, which is common in gel blots. Panels smaller than 300px on any side were upscaled before extraction to ensure enough keypoints.</p>\n<p><strong>Flip Detection</strong>\nFeatures were extracted from both the original and horizontally mirrored panel. If the flipped match produced a larger shared region, that result was used instead.</p>\n<p><strong>Geometric Verification</strong>\nMatched keypoints were verified using MAGSAC++, which is more robust than standard RANSAC against outliers, important for panels with repeated or noisy textures.</p>\n<p><strong>Match Decision</strong>\nA pair was declared a match if it had ≥ 20 geometrically verified inlier keypoints. Shared area was estimated via convex hull over the matched keypoints.</p>\n<hr>\n<h3>5. Mask projection back to the original image Coordinates</h3>\n<p>The reuse detector produced masks in panel-crop coordinates. The competition required masks in original image coordinates.</p>\n<p>For every matched crop mask, we projected it back to the full figure using the detected panel bounding box. This was a small but critical implementation detail, a reused region detected correctly at crop level will still score poorly if the final mask is misaligned in the original image.</p>\n<hr>\n<h3>6. Mask filtering and submission format</h3>\n<p>After grouping and projection, we applied a final filtering step before encoding the submission.</p>\n<p>We removed masks smaller than 10 pixels, merged strongly overlapping masks, and dropped anything outside the image boundary. If no valid mask remained after filtering, the figure was submitted as <code>authentic</code>.</p>\n<p>Otherwise, the remaining instance masks were RLE encoded into the competition submission format.</p>\n<hr>\n<h3>What Worked</h3>\n<p><strong>Panel-first approach</strong>\nProcessing figures at the panel level was the most important decision. Detecting panels first kept the matching focused on actual scientific content and avoided false matches from labels, borders, and figure layout.</p>\n<p><strong>Skipping figures that didn't need matching</strong>\nWe only ran the full pipeline on compound multi-panel figures. Simple, single-panel, and unknown figures were predicted as authentic without running any matching, as module to handle that figure types was not fully implemented. This significantly reduced false positives.</p>\n<p><strong>Three-level candidate pruning</strong>\nGrouping panels by class, filtering geometrically incompatible pairs, and using CBIR to shortlist similar candidates before keypoint matching reduced computation.</p>\n<p><strong>MAGSAC++ for geometric verification</strong>\nMAGSAC++ was more robust than standard RANSAC for panels with repeated or noisy textures, which is common in gel blots.</p>\n<p><strong>Connected component grouping</strong>\nGrouping matched pairs into connected components avoided duplicate instance masks when the same reused content appeared across multiple panels.</p>\n<p><strong>Modular architecture</strong>\nKeeping panel detection, keypoint matching, and CBIR as separate installable packages made it easy to benchmark and swap each component independently.</p>\n<hr>\n<h2>What Did Not Work</h2>\n<h3>Direct full-image forgery detection</h3>\n<p>Directly running general image forgery detection models on the full image did not work well.</p>\n<h3>Reducing image size too much during reuse detection</h3>\n<p>We tried reducing the maximum side length of panel images in reuse detection.</p>\n<p>It reduced accuracy when the image size became too small. Keypoint-based matching depends on local visual details, and aggressive resizing can remove small structures that are useful for matching.</p>\n<p>Because of this, we avoided resizing too aggressively in the reuse detection step.</p>\n<h3>Treating all images the same</h3>\n<p>Using the same pipeline for every image was less reliable. The figure type decision step helped us avoid unnecessary predictions.</p>\n<h3>Aggressive post-processing</h3>\n<p>Aggressive mask filtering or merging was risky.</p>\n<p>If filtering was too strong, it could remove useful small masks. If merging was too aggressive, it will combine separate reused regions into one incorrect instance.</p>\n<hr>\n<h2>What Was Not Finished</h2>\n<p>Several things were planned but not fully completed before the submission deadline.</p>\n<h3>1. Intra-Panel Copy-Move Forgery Segmentation Model</h3>\n<p>A model to detect and segment copy-move forgery within a single panel image.</p>\n<h3>2. Image Matching Models</h3>\n<p>We explored <a href=\"https://github.com/gmberton/vismatch\" target=\"_blank\">VisMatch</a> to evaluate multiple matchers including MatchAnything-RoMa, MatchAnything-EfficientLoFTR, and others.</p>\n<h3>3. Improved CV-Based Inter-Panel Reuse Detection</h3>\n<h3>4. Panel Annotation Segmentation Model</h3>\n<p>A model to segment annotation elements inside panels — text labels, arrows, scale bars, callouts, and bounding boxes etc.. The purpose was to pass the resulting annotation mask as context to the intra-panel forgery segmnetation model, allowing it to focus on actual scientific content rather than figure annotations.</p>\n<hr>\n<h3>Thanks and Acknowledgements</h3>\n<p>Thanks to Recod.ai, LUC, and the competition organizers for hosting this interesting and challenging competition.</p>\n<p>This solution builds on two open source projects by <a href=\"https://github.com/researchintegrity\" target=\"_blank\">ResearchIntegrity</a>:</p>\n<ul>\n<li><a href=\"https://github.com/researchintegrity/panel-extractor\" target=\"_blank\">panel-extractor</a> — used as the base for panel detection</li>\n<li><a href=\"https://github.com/researchintegrity/copy-move-detection-keypoint\" target=\"_blank\">copy-move-detection-keypoint</a> — used as the base for keypoint matching</li>\n</ul>\n<p>Thanks to the Kaggle community for useful discussions.</p>",
      "rawMarkdown": "## Overview\n\nScientific figures come in different types, simple single-panel images and compound multi-panel figures. Many images in this competition were **compound figures** containing multiple panels -- microscopy images, gel blots, graphs, labels, and annotations arranged together.\n\nOur approach: first understand the **structure** of the figure, then run reuse detection at the **panel level**. This kept the matching focused on actual scientific content rather than figure layout, labels, or borders.\n\nOur solution focused on **inter-panel reuse detection** , comparing panels against each other within the same figure. We also planned **intra-panel copy-move detection** (forgery within a single panel), but this module was partially implemented and not completed in time for the final submission.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3460252%2F999f9fc8a0b32bfc93a6e3490803859d%2Fsifd-inference-pipeline.png?generation=1778090730128978&alt=media)\n\n**Figure 1.** Inference pipeline. Panel detection runs first, then a figure type decision determines whether matching is needed. Compound multi-panel figures go through the full pipeline. All other figure types are predicted as authentic without running matching.\n\n---\n\n## Code\n\nCode: [https://github.com/Nivratti/recodai-luc-sifd-4th-place-solution](https://github.com/Nivratti/recodai-luc-sifd-4th-place-solution)\n\nThe repository contains a cleaned and easier to setup version of our final inference pipeline. The public version focuses on the approach used for the competition submission and avoids unrelated post-competition experiments.\n\n---\n\n## Data\n\n### External Data -- PubMed Central (PMC)\n\nWe downloaded millions of scientific figures from the [PubMed Central (PMC)](https://www.ncbi.nlm.nih.gov/pmc/) Open Access subset for analysis purposes.\n\nRaw PMC packages were downloaded paper by paper, figures were extracted from each package, and the raw package was then deleted to keep disk usage manageable.\n\nAfter extraction, we ran the YOLOv5 panel detector on figures to split them into three buckets: figures containing at least one Blot or Microscopy panel, figures containing only other panel types such as Flow Cytometry or Graphs, and figures where no panels were detected. Keeping these buckets separate made it easier to browse and analyze the distribution of real-world scientific figure layouts, panel sizes, aspect ratios, and arrangement patterns.\n\nA subset of the downloaded PMC figures is publicly available on Kaggle:\n\n- [PMC OA Biomedical Figures — Dec 2025 (weekly)](https://www.kaggle.com/datasets/chatrapati/pmc-oa-biomed-figures-20251201-20251208-base)\n- [PMC OA Biomedical Figures — Nov 2025 (monthly)](https://www.kaggle.com/datasets/chatrapati/pmc-oa-biomed-figures-2025-nov-month-base)\n\n---\n\n## Solution Details\n\n### 1. Panel Detection\n\nAfter reviewing the test set image and the article links provided by the competition host, it was clear that this was not a simple image forgery detection problem. Scientific figures are compound images with multiple panels, each representing a different experiment or condition. We decided early on to build a panel-first approach.\n\nWe used a **YOLOv5** panel detector (adapted from [ResearchIntegrity/panel-extractor](https://github.com/researchintegrity/panel-extractor)) to locate panels inside each figure. The model classifies panels into four types:  **Blots**,  **Microscopy**,  **Flow Cytometry**, and  **Graphs** .\n\nAfter analyzing the dataset, we focused only on **Blots** and **Microscopy** panels. These were the panel types where forgery actually appeared in the competition data. Flow Cytometry and graph panels were skipped\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3460252%2Fdb38a03251e9ca6c4e0f1aa3df0ec91f%2Fpanel-detection-example.png?generation=1778090779416396&alt=media)\n\n**Figure 2.** Panel detection on two compound scientific figures. Red boxes show detected **Blot** panels (left), blue boxes show detected **Microscopy** panels (right), with confidence scores shown for each. These panel crops are used as the main units for pairwise reuse detection.\n\n---\n\n### 2. Figure Kind Classification\n\nBefore running any matching, we classified every figure into one of four types based on the panel detection output:\n\n| Type                | Condition                              | Action                       |\n| ------------------- | -------------------------------------- | ---------------------------- |\n| `COMPOUND_MULTI`  | ≥ 2 Blot/Micro panels detected        | Run full matching pipeline   |\n| `SIMPLE`          | 1 panel detected touching image edge   | Predict `authentic`, skip  |\n| `COMPOUND_SINGLE` | 1 panel detected but not touching edge | Predict `authentic`, skip |\n| `UNKNOWN`         | 0 panels detected                      | Predict `authentic`, skip  |\n\n<br>\n\nOnly `COMPOUND_MULTI` figures went through the full pipeline. All other types were predicted as authentic.\n\nIntra-panel copy-move detection (forgery within a single panel) was planned for `COMPOUND_SINGLE` , `SIMPLE` and `UNKNOWN` figures. The module was partially implemented but not completed in time for the final submission, so these figures were predicted as authentic.\n\n---\n\n### 3. Candidate Pruning\n\nFor compound multi-panel figures, we extracted all detected panel crops. Comparing every possible panel pair is expensive. We added a three-level pruning step before running the keypoint matcher:\n\n**Level 1 -- Broad Grouping**\nPanels were grouped by class (`blot`, `microscopy`, `other`). Matching was only performed within groups\n\n**Level 2 -- Geometry Filter**\nPairs were rejected if aspect ratios or areas were too different to be copies.\n\n**Level 3 -- CBIR Shortlisting**\nAll panels were embedded using ResNet-50. For each panel, only the top-K most similar panels proceeded to keypoint matching. We used `cbir_topk=3` for the final submission.\n\n---\n\n### 4. Inter-panel reuse detection\n\nFor each candidate panel pair, we ran keypoint-based matching to detect reused regions. The matcher is based on the [ResearchIntegrity/copy-move-detection-keypoint](https://github.com/researchintegrity/copy-move-detection-keypoint) project, extended with a Python API for pairwise cross-image matching and feature caching.\n\n**Feature Extraction**\nWe used RootSIFT, which applies Hellinger normalization to SIFT descriptors. This improves matching quality for images with similar local textures, which is common in gel blots. Panels smaller than 300px on any side were upscaled before extraction to ensure enough keypoints.\n\n**Flip Detection**\nFeatures were extracted from both the original and horizontally mirrored panel. If the flipped match produced a larger shared region, that result was used instead.\n\n**Geometric Verification**\nMatched keypoints were verified using MAGSAC++, which is more robust than standard RANSAC against outliers, important for panels with repeated or noisy textures.\n\n**Match Decision**\nA pair was declared a match if it had ≥ 20 geometrically verified inlier keypoints. Shared area was estimated via convex hull over the matched keypoints.\n\n---\n\n### 5. Mask projection back to the original image Coordinates\n\nThe reuse detector produced masks in panel-crop coordinates. The competition required masks in original image coordinates.\n\nFor every matched crop mask, we projected it back to the full figure using the detected panel bounding box. This was a small but critical implementation detail, a reused region detected correctly at crop level will still score poorly if the final mask is misaligned in the original image.\n\n---\n\n### 6. Mask filtering and submission format\n\nAfter grouping and projection, we applied a final filtering step before encoding the submission.\n\nWe removed masks smaller than 10 pixels, merged strongly overlapping masks, and dropped anything outside the image boundary. If no valid mask remained after filtering, the figure was submitted as `authentic`.\n\nOtherwise, the remaining instance masks were RLE encoded into the competition submission format.\n\n---\n\n### What Worked\n\n**Panel-first approach**\nProcessing figures at the panel level was the most important decision. Detecting panels first kept the matching focused on actual scientific content and avoided false matches from labels, borders, and figure layout.\n\n**Skipping figures that didn't need matching**\nWe only ran the full pipeline on compound multi-panel figures. Simple, single-panel, and unknown figures were predicted as authentic without running any matching, as module to handle that figure types was not fully implemented. This significantly reduced false positives.\n\n**Three-level candidate pruning**\nGrouping panels by class, filtering geometrically incompatible pairs, and using CBIR to shortlist similar candidates before keypoint matching reduced computation.\n\n**MAGSAC++ for geometric verification**\nMAGSAC++ was more robust than standard RANSAC for panels with repeated or noisy textures, which is common in gel blots.\n\n**Connected component grouping**\nGrouping matched pairs into connected components avoided duplicate instance masks when the same reused content appeared across multiple panels.\n\n**Modular architecture**\nKeeping panel detection, keypoint matching, and CBIR as separate installable packages made it easy to benchmark and swap each component independently.\n\n---\n\n## What Did Not Work\n\n### Direct full-image forgery detection\n\nDirectly running general image forgery detection models on the full image did not work well.\n\n### Reducing image size too much during reuse detection\n\nWe tried reducing the maximum side length of panel images in reuse detection.\n\nIt reduced accuracy when the image size became too small. Keypoint-based matching depends on local visual details, and aggressive resizing can remove small structures that are useful for matching.\n\nBecause of this, we avoided resizing too aggressively in the reuse detection step.\n\n### Treating all images the same\n\nUsing the same pipeline for every image was less reliable. The figure type decision step helped us avoid unnecessary predictions.\n\n### Aggressive post-processing\n\nAggressive mask filtering or merging was risky.\n\nIf filtering was too strong, it could remove useful small masks. If merging was too aggressive, it will combine separate reused regions into one incorrect instance.\n\n---\n\n## What Was Not Finished\n\nSeveral things were planned but not fully completed before the submission deadline.\n\n### 1. Intra-Panel Copy-Move Forgery Segmentation Model\nA model to detect and segment copy-move forgery within a single panel image.\n\n### 2. Image Matching Models\n\nWe explored [VisMatch](https://github.com/gmberton/vismatch) to evaluate multiple matchers including MatchAnything-RoMa, MatchAnything-EfficientLoFTR, and others.\n\n### 3. Improved CV-Based Inter-Panel Reuse Detection\n\n### 4. Panel Annotation Segmentation Model\n\nA model to segment annotation elements inside panels — text labels, arrows, scale bars, callouts, and bounding boxes etc.. The purpose was to pass the resulting annotation mask as context to the intra-panel forgery segmnetation model, allowing it to focus on actual scientific content rather than figure annotations.\n\n---\n\n### Thanks and Acknowledgements\n\nThanks to Recod.ai, LUC, and the competition organizers for hosting this interesting and challenging competition.\n\nThis solution builds on two open source projects by [ResearchIntegrity](https://github.com/researchintegrity):\n\n* [panel-extractor](https://github.com/researchintegrity/panel-extractor) — used as the base for panel detection\n* [copy-move-detection-keypoint](https://github.com/researchintegrity/copy-move-detection-keypoint) — used as the base for keypoint matching\n\nThanks to the Kaggle community for useful discussions.\n\n",
      "votes": 5
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "3454207": "## Overview\n\nScientific figures come in different types, simple single-panel images and compound multi-panel figures. Many images in this competition were **compound figures** containing multiple panels -- microscopy images, gel blots, graphs, labels, and annotations arranged together.\n\nOur approach: first understand the **structure** of the figure, then run reuse detection at the **panel level**. This kept the matching focused on actual scientific content rather than figure layout, labels, or borders.\n\nOur solution focused on **inter-panel reuse detection** , comparing panels against each other within the same figure. We also planned **intra-panel copy-move detection** (forgery within a single panel), but this module was partially implemented and not completed in time for the final submission.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3460252%2F999f9fc8a0b32bfc93a6e3490803859d%2Fsifd-inference-pipeline.png?generation=1778090730128978&alt=media)\n\n**Figure 1.** Inference pipeline. Panel detection runs first, then a figure type decision determines whether matching is needed. Compound multi-panel figures go through the full pipeline. All other figure types are predicted as authentic without running matching.\n\n---\n\n## Code\n\nCode: [https://github.com/Nivratti/recodai-luc-sifd-4th-place-solution](https://github.com/Nivratti/recodai-luc-sifd-4th-place-solution)\n\nThe repository contains a cleaned and easier to setup version of our final inference pipeline. The public version focuses on the approach used for the competition submission and avoids unrelated post-competition experiments.\n\n---\n\n## Data\n\n### External Data -- PubMed Central (PMC)\n\nWe downloaded millions of scientific figures from the [PubMed Central (PMC)](https://www.ncbi.nlm.nih.gov/pmc/) Open Access subset for analysis purposes.\n\nRaw PMC packages were downloaded paper by paper, figures were extracted from each package, and the raw package was then deleted to keep disk usage manageable.\n\nAfter extraction, we ran the YOLOv5 panel detector on figures to split them into three buckets: figures containing at least one Blot or Microscopy panel, figures containing only other panel types such as Flow Cytometry or Graphs, and figures where no panels were detected. Keeping these buckets separate made it easier to browse and analyze the distribution of real-world scientific figure layouts, panel sizes, aspect ratios, and arrangement patterns.\n\nA subset of the downloaded PMC figures is publicly available on Kaggle:\n\n- [PMC OA Biomedical Figures — Dec 2025 (weekly)](https://www.kaggle.com/datasets/chatrapati/pmc-oa-biomed-figures-20251201-20251208-base)\n- [PMC OA Biomedical Figures — Nov 2025 (monthly)](https://www.kaggle.com/datasets/chatrapati/pmc-oa-biomed-figures-2025-nov-month-base)\n\n---\n\n## Solution Details\n\n### 1. Panel Detection\n\nAfter reviewing the test set image and the article links provided by the competition host, it was clear that this was not a simple image forgery detection problem. Scientific figures are compound images with multiple panels, each representing a different experiment or condition. We decided early on to build a panel-first approach.\n\nWe used a **YOLOv5** panel detector (adapted from [ResearchIntegrity/panel-extractor](https://github.com/researchintegrity/panel-extractor)) to locate panels inside each figure. The model classifies panels into four types:  **Blots**,  **Microscopy**,  **Flow Cytometry**, and  **Graphs** .\n\nAfter analyzing the dataset, we focused only on **Blots** and **Microscopy** panels. These were the panel types where forgery actually appeared in the competition data. Flow Cytometry and graph panels were skipped\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F3460252%2Fdb38a03251e9ca6c4e0f1aa3df0ec91f%2Fpanel-detection-example.png?generation=1778090779416396&alt=media)\n\n**Figure 2.** Panel detection on two compound scientific figures. Red boxes show detected **Blot** panels (left), blue boxes show detected **Microscopy** panels (right), with confidence scores shown for each. These panel crops are used as the main units for pairwise reuse detection.\n\n---\n\n### 2. Figure Kind Classification\n\nBefore running any matching, we classified every figure into one of four types based on the panel detection output:\n\n| Type                | Condition                              | Action                       |\n| ------------------- | -------------------------------------- | ---------------------------- |\n| `COMPOUND_MULTI`  | ≥ 2 Blot/Micro panels detected        | Run full matching pipeline   |\n| `SIMPLE`          | 1 panel detected touching image edge   | Predict `authentic`, skip  |\n| `COMPOUND_SINGLE` | 1 panel detected but not touching edge | Predict `authentic`, skip |\n| `UNKNOWN`         | 0 panels detected                      | Predict `authentic`, skip  |\n\n<br>\n\nOnly `COMPOUND_MULTI` figures went through the full pipeline. All other types were predicted as authentic.\n\nIntra-panel copy-move detection (forgery within a single panel) was planned for `COMPOUND_SINGLE` , `SIMPLE` and `UNKNOWN` figures. The module was partially implemented but not completed in time for the final submission, so these figures were predicted as authentic.\n\n---\n\n### 3. Candidate Pruning\n\nFor compound multi-panel figures, we extracted all detected panel crops. Comparing every possible panel pair is expensive. We added a three-level pruning step before running the keypoint matcher:\n\n**Level 1 -- Broad Grouping**\nPanels were grouped by class (`blot`, `microscopy`, `other`). Matching was only performed within groups\n\n**Level 2 -- Geometry Filter**\nPairs were rejected if aspect ratios or areas were too different to be copies.\n\n**Level 3 -- CBIR Shortlisting**\nAll panels were embedded using ResNet-50. For each panel, only the top-K most similar panels proceeded to keypoint matching. We used `cbir_topk=3` for the final submission.\n\n---\n\n### 4. Inter-panel reuse detection\n\nFor each candidate panel pair, we ran keypoint-based matching to detect reused regions. The matcher is based on the [ResearchIntegrity/copy-move-detection-keypoint](https://github.com/researchintegrity/copy-move-detection-keypoint) project, extended with a Python API for pairwise cross-image matching and feature caching.\n\n**Feature Extraction**\nWe used RootSIFT, which applies Hellinger normalization to SIFT descriptors. This improves matching quality for images with similar local textures, which is common in gel blots. Panels smaller than 300px on any side were upscaled before extraction to ensure enough keypoints.\n\n**Flip Detection**\nFeatures were extracted from both the original and horizontally mirrored panel. If the flipped match produced a larger shared region, that result was used instead.\n\n**Geometric Verification**\nMatched keypoints were verified using MAGSAC++, which is more robust than standard RANSAC against outliers, important for panels with repeated or noisy textures.\n\n**Match Decision**\nA pair was declared a match if it had ≥ 20 geometrically verified inlier keypoints. Shared area was estimated via convex hull over the matched keypoints.\n\n---\n\n### 5. Mask projection back to the original image Coordinates\n\nThe reuse detector produced masks in panel-crop coordinates. The competition required masks in original image coordinates.\n\nFor every matched crop mask, we projected it back to the full figure using the detected panel bounding box. This was a small but critical implementation detail, a reused region detected correctly at crop level will still score poorly if the final mask is misaligned in the original image.\n\n---\n\n### 6. Mask filtering and submission format\n\nAfter grouping and projection, we applied a final filtering step before encoding the submission.\n\nWe removed masks smaller than 10 pixels, merged strongly overlapping masks, and dropped anything outside the image boundary. If no valid mask remained after filtering, the figure was submitted as `authentic`.\n\nOtherwise, the remaining instance masks were RLE encoded into the competition submission format.\n\n---\n\n### What Worked\n\n**Panel-first approach**\nProcessing figures at the panel level was the most important decision. Detecting panels first kept the matching focused on actual scientific content and avoided false matches from labels, borders, and figure layout.\n\n**Skipping figures that didn't need matching**\nWe only ran the full pipeline on compound multi-panel figures. Simple, single-panel, and unknown figures were predicted as authentic without running any matching, as module to handle that figure types was not fully implemented. This significantly reduced false positives.\n\n**Three-level candidate pruning**\nGrouping panels by class, filtering geometrically incompatible pairs, and using CBIR to shortlist similar candidates before keypoint matching reduced computation.\n\n**MAGSAC++ for geometric verification**\nMAGSAC++ was more robust than standard RANSAC for panels with repeated or noisy textures, which is common in gel blots.\n\n**Connected component grouping**\nGrouping matched pairs into connected components avoided duplicate instance masks when the same reused content appeared across multiple panels.\n\n**Modular architecture**\nKeeping panel detection, keypoint matching, and CBIR as separate installable packages made it easy to benchmark and swap each component independently.\n\n---\n\n## What Did Not Work\n\n### Direct full-image forgery detection\n\nDirectly running general image forgery detection models on the full image did not work well.\n\n### Reducing image size too much during reuse detection\n\nWe tried reducing the maximum side length of panel images in reuse detection.\n\nIt reduced accuracy when the image size became too small. Keypoint-based matching depends on local visual details, and aggressive resizing can remove small structures that are useful for matching.\n\nBecause of this, we avoided resizing too aggressively in the reuse detection step.\n\n### Treating all images the same\n\nUsing the same pipeline for every image was less reliable. The figure type decision step helped us avoid unnecessary predictions.\n\n### Aggressive post-processing\n\nAggressive mask filtering or merging was risky.\n\nIf filtering was too strong, it could remove useful small masks. If merging was too aggressive, it will combine separate reused regions into one incorrect instance.\n\n---\n\n## What Was Not Finished\n\nSeveral things were planned but not fully completed before the submission deadline.\n\n### 1. Intra-Panel Copy-Move Forgery Segmentation Model\nA model to detect and segment copy-move forgery within a single panel image.\n\n### 2. Image Matching Models\n\nWe explored [VisMatch](https://github.com/gmberton/vismatch) to evaluate multiple matchers including MatchAnything-RoMa, MatchAnything-EfficientLoFTR, and others.\n\n### 3. Improved CV-Based Inter-Panel Reuse Detection\n\n### 4. Panel Annotation Segmentation Model\n\nA model to segment annotation elements inside panels — text labels, arrows, scale bars, callouts, and bounding boxes etc.. The purpose was to pass the resulting annotation mask as context to the intra-panel forgery segmnetation model, allowing it to focus on actual scientific content rather than figure annotations.\n\n---\n\n### Thanks and Acknowledgements\n\nThanks to Recod.ai, LUC, and the competition organizers for hosting this interesting and challenging competition.\n\nThis solution builds on two open source projects by [ResearchIntegrity](https://github.com/researchintegrity):\n\n* [panel-extractor](https://github.com/researchintegrity/panel-extractor) — used as the base for panel detection\n* [copy-move-detection-keypoint](https://github.com/researchintegrity/copy-move-detection-keypoint) — used as the base for keypoint matching\n\nThanks to the Kaggle community for useful discussions.\n\n"
  }
}