OSCR

Outer retinal band segmentation in healthy subjects: comparative study between human grading and deep convolutional neural networks.

Code ↔ Paper

1 match between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 1 match
  1. [1] § Methods ↔ Autoencoder/train.py, lines 20 to 103 · score 0.58 · Deep learning, Adam, loss, Optimizer, CPU, trained · block oscr:b:HMSYTWAANJKG3-6 · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 106 lines · 3.8 KB · no license · 1 match

  1. # train_mae.py
  2. import os
  3. import yaml
  4. import torch
  5. import torch.nn as nn
  6. import torch.optim as optim
  7. from torch.utils.data import DataLoader
  8. from masked_autoencoder import MAESparK
  9. from Dataset import OCTMaskedDataset
  10. from visualize import save_recon_images
  11. from tqdm import tqdm
  12. import matplotlib.pyplot as plt
  13. def load_config(path):
  14. with open(path, "r") as f:
  15. return yaml.safe_load(f)
  16. def train():
  17. config = load_config("Deep_learning_approach\code\AE\config\config.yaml")
  18. # Device
  19. device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
  20. # Dataset
  21. dataset = OCTMaskedDataset(
  22. root_dir=config["data"]["path"],
  23. patch_size=config["model"]["patch_size"],
  24. masking_ratio=config["model"]["masking_ratio"]
  25. )
  26. dataloader = DataLoader(dataset, batch_size=config["train"]["batch_size"], shuffle=True, num_workers=4)
  27. # Model
  28. model = MAESparK(
  29. encoder_cfg=config["model"]["encoder_cfg"],
  30. input_size=config["model"]["input_size"],
  31. patch_size=config["model"]["patch_size"],
  32. embed_dim=config["model"]["embed_dim"],
  33. masking_ratio=config["model"]["masking_ratio"]
  34. ).to(device)
  35. # Optimizer
  36. optimizer = optim.AdamW(model.parameters(), lr=float(config["train"]["lr"]))
  37. criterion = nn.MSELoss()
  38. # Output dirs
  39. os.makedirs(config["train"]["output_dir"], exist_ok=True)
  40. os.makedirs(os.path.join(config["train"]["output_dir"], "recon"), exist_ok=True)
  41. loss_history = []
  42. # Training loop
  43. for epoch in range(config["train"]["epochs"]):
  44. model.train()
  45. epoch_loss = 0.0
  46. for images, masks in tqdm(dataloader, desc=f"Epoch {epoch+1}/{config['train']['epochs']}"):
  47. images, masks = images.to(device), masks.to(device)
  48. optimizer.zero_grad()
  49. outputs = model(images, masks)
  50. loss = criterion(outputs, images)
  51. loss.backward()
  52. optimizer.step()
  53. epoch_loss += loss.item()
  54. avg_loss = epoch_loss / len(dataloader)
  55. loss_history.append(avg_loss)
  56. print(f"Epoch {epoch+1} Loss: {avg_loss:.6f}")
  57. plt.figure()
  58. plt.plot(loss_history, label="Total Loss")
  59. plt.xlabel("Epoch")
  60. plt.ylabel("Loss")
  61. plt.title("Training Loss Curve")
  62. plt.legend()
  63. plt.grid(True)
  64. plt.savefig(os.path.join(config["train"]["output_dir"], "loss_curve.png"))
  65. plt.close()
  66. # Save checkpoint
  67. if (epoch + 1) % config["train"]["save_every"] == 0:
  68. ckpt_path = os.path.join(config["train"]["output_dir"], f"mae_epoch_{epoch+1}.pth")
  69. torch.save(model.state_dict(), ckpt_path)
  70. # Visualization
  71. if (epoch + 1) % config["train"]["viz_every"] == 0:
  72. print("Before concatenation:")
  73. print(f"images: {images.shape}, outputs: {outputs.shape}, masks: {masks.shape}")
  74. save_recon_images(images, outputs, masks, epoch + 1, config["train"]["output_dir"])
  75. # Plot first sample's patch mask
  76. patch_h = config["model"]["input_size"] // config["model"]["patch_size"]
  77. patch_w = patch_h # assuming square images
  78. mask_sample = masks[0].cpu().numpy().reshape(patch_h, patch_w)
  79. plt.figure(figsize=(4, 4))
  80. plt.imshow(mask_sample, cmap="gray")
  81. plt.title(f"Mask (Epoch {epoch + 1})")
  82. plt.axis("off")
  83. mask_path = os.path.join(config["train"]["output_dir"], f"mask_epoch_{epoch + 1}.png")
  84. plt.savefig(mask_path)
  85. plt.close()
  86. print(f"[✓] Saved mask visualization to: {mask_path}")
  87. if __name__ == "__main__":
  88. train()

train.py at commit e74770a, no license · at the source

Overview

  1. ITI/LARSyS, Instituto Superior Técnico, Universidade de Lisboa, Lisbon, Portugal
  2. H&TRC - Health & Technology Research Center, ESTeSL - Lisbon School of Health, Polytechnic Institute of Lisbon, Lisbon, Portugal
  3. IRL - Instituto de Retina de Lisboa, Lisbon, Portugal
  4. Department of Ophthalmology, Hospitais da Universidade de Coimbra, Local Health Unit of Coimbra, Coimbra, Portugal
  5. Hospital Garcia de Orta, Almada-Seixal Local Health Unit, Almada, Portugal
Journal: Quantitative imaging in medicine and surgery, volume 16, issue 5, article 408
Dates: received 1 October 2025; accepted 30 December 2025; published online 13 April 2026; in print 1 May 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.21037/qims-2025-aw-2093 · PMID 42147957 · PMCID PMC13178413 · OpenAlex W7155958315
Open access: diamond, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: other (modality), human (organism), healthy (population), methods / tools (subfield)
Methods: Connectivity, Statistics
Keywords: Optical coherence tomography (OCT), deep learning, automatic segmentation, intraclass correlation
Topic: Retinal Imaging and Analysis (Radiology, Nuclear Medicine and Imaging, Medicine), according to OpenAlex
Funding: Associação de Oftalmologistas para o Estudo da Retina (Bolsa para Investigação em Retina), Sociedade Portuguesa de Oftalmologia (Bolsa de Investigação Clinica 2023) and the Portuguese Recovery and Resilience Program (PRR) via IAPMEI/ANI/FCT (Agenda C64502239900000057)
Citations: not cited yet (Europe PMC); 63 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.

Joao-afonso11/OCT_segmentation

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: e74770ad0c2267f83dd9312e3b1d2e2578bd5769, 28 November 2025
Languages: Python (16)
Size: 19 files, 16 scripts
Software Heritage: not archived
Found in: the references
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: PyTorch (14 files), Matplotlib (3 files), NumPy (3 files), Pillow (3 files), PyTorch Lightning (1 file), OpenCV (1 file), pandas (1 file)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
17 files

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 16 scripts, each with its path and the digest of its content;
  • 1 match between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • no repository, dataset or request procedure was recognized in it

Read it in the paper: doi.org/10.21037/qims-2025-aw-2093.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 4 keywords, 1 funder, 53 references.

Cite

This paper

Afonso, J. D., Camacho, P., Pereira, B., Marques, J. P., Lopes, D. S., & Cabral, D. (2026). Outer retinal band segmentation in healthy subjects: comparative study between human grading and deep convolutional neural networks. Quantitative imaging in medicine and surgery, 16(5), 408. https://doi.org/10.21037/qims-2025-aw-2093

BibTeX

@article{afonso2026outer,
author = {Afonso, João Duarte and Camacho, Pedro and Pereira, Bruno and Marques, João Pedro and Lopes, Daniel Simões and Cabral, Diogo},
title = {{Outer retinal band segmentation in healthy subjects: comparative study between human grading and deep convolutional neural networks}},
journal = {Quantitative imaging in medicine and surgery},
year = {2026},
month = apr,
volume = {16},
number = {5},
pages = {408},
publisher = {AME Publications},
issn = {2223-4292},
doi = {10.21037/qims-2025-aw-2093},
url = {https://doi.org/10.21037/qims-2025-aw-2093},
pmid = {42147957},
pmcid = {PMC13178413}
}

RIS

TY - JOUR
AU - Afonso, João Duarte
AU - Camacho, Pedro
AU - Pereira, Bruno
AU - Marques, João Pedro
AU - Lopes, Daniel Simões
AU - Cabral, Diogo
TI - Outer retinal band segmentation in healthy subjects: comparative study between human grading and deep convolutional neural networks
T2 - Quantitative imaging in medicine and surgery
J2 - Quant Imaging Med Surg
PY - 2026
DA - 2026/04/13
VL - 16
IS - 5
SP - 408
SN - 2223-4292
PB - AME Publications
DO - 10.21037/qims-2025-aw-2093
UR - https://doi.org/10.21037/qims-2025-aw-2093
LA - en
ER -

CSL-JSON

{
"id": "10.21037/qims-2025-aw-2093",
"type": "article-journal",
"title": "Outer retinal band segmentation in healthy subjects: comparative study between human grading and deep convolutional neural networks",
"container-title": "Quantitative imaging in medicine and surgery",
"author": [
{
"family": "Afonso",
"given": "João Duarte"
},
{
"family": "Camacho",
"given": "Pedro"
},
{
"family": "Pereira",
"given": "Bruno"
},
{
"family": "Marques",
"given": "João Pedro"
},
{
"family": "Lopes",
"given": "Daniel Simões"
},
{
"family": "Cabral",
"given": "Diogo"
}
],
"container-title-short": "Quant Imaging Med Surg",
"volume": "16",
"issue": "5",
"page": "408",
"DOI": "10.21037/qims-2025-aw-2093",
"PMID": "42147957",
"PMCID": "PMC13178413",
"ISSN": "2223-4292",
"publisher": "AME Publications",
"URL": "https://doi.org/10.21037/qims-2025-aw-2093",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
13
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41592-024-02318-2 [code]
Keypoint-MoSeq: parsing behavior by linking point tracking to pose dynamics.
Journal: Nature methods
In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, methods / tools, 1 reference
[2] doi:10.1021/jacsau.5c00289 [code]
HiCLR: Knowledge-Induced Hierarchical Contrastive Learning with Retrosynthesis Prediction Yields a Reaction Foundation Model.
Journal: JACS Au
In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, 1 reference
[3] doi:10.3389/frai.2026.1841639 [code]
Label tree semantic losses for rich multi-class medical image segmentation.
Journal: Frontiers in artificial intelligence
In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, 1 reference
[4] doi:10.1162/imag.a.1079 [code]
From fibers to cells: Fourier-based registration enables virtual Cresyl violet staining from 3D polarized light imaging.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, 1 reference
[5] doi:10.3390/life13040976
TranSegNet: Hybrid CNN-Vision Transformers Encoder for Retina Segmentation of Optical Coherence Tomography.
Journal: Life (Basel, Switzerland)
In common: other, methods / tools, 4 references
[6] doi:10.1364/boe.600665 [code]
NeuroSeg-MF: robust neuron segmentation in two-photon Ca<sup>2+</sup> imaging using multi-feature fusion and detection-guided SAM.
Journal: Biomedical optics express
In common: OpenCV, Pillow, PyTorch, 3 other tools, methods / tools, 2 references
[7] doi:10.1016/j.isci.2025.114141 [code]
Deep learning-enabled high-performance multiphoton fluorescence vascular imaging using clinically approved fluorescent probes.
Journal: iScience
In common: OpenCV, Pillow, PyTorch, 3 other tools, 2 references
[8] doi:10.1109/tnsre.2026.3688903 [code]
3-D Markerless Tracking of Speech Movements With Submillimeter Accuracy.
Journal: IEEE transactions on neural systems and rehabilitation engineering : a publication of the IEEE Engineering in Medicine and Biology Society
In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, other
[9] doi:10.1038/s41598-026-61605-4 [code]
Learning precise segmentation of neurofibrillary tangles from rapid manual point annotations.
Journal: Scientific reports
In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, methods / tools
[10] doi:10.1371/journal.pcbi.1013789 [code]
When predict can also explain: Few-shot prediction to select better neural latents.
Journal: PLoS computational biology
In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, methods / tools

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.21037/qims-2025-aw-2093.svg)](https://openscicode.org/badge/doi/10.21037/qims-2025-aw-2093)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.21037/qims-2025-aw-2093.svg
   :target: https://openscicode.org/badge/doi/10.21037/qims-2025-aw-2093
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.21037/qims-2025-aw-2093"><img src="https://openscicode.org/badge/doi/10.21037/qims-2025-aw-2093.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.