Outer retinal band segmentation in healthy subjects: comparative study between human grading and deep convolutional neural networks.
The 1 match
- [1] § Methods ↔ Autoencoder/train.py, lines 20–103 · score 0.58 · Deep learning, Adam, loss, Optimizer, CPU, trained
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: 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
- # train_mae.py
- import os
- import yaml
- import torch
- import torch.nn as nn
- import torch.optim as optim
- from torch.utils.data import DataLoader
- from masked_autoencoder import MAESparK
- from Dataset import OCTMaskedDataset
- from visualize import save_recon_images
- from tqdm import tqdm
- import matplotlib.pyplot as plt
- def load_config(path):
- with open(path, "r") as f:
- return yaml.safe_load(f)
- def train():
- config = load_config("Deep_learning_approach\code\AE\config\config.yaml")
- # Device
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
- # Dataset
- dataset = OCTMaskedDataset(
- root_dir=config["data"]["path"],
- patch_size=config["model"]["patch_size"],
- masking_ratio=config["model"]["masking_ratio"]
- )
- dataloader = DataLoader(dataset, batch_size=config["train"]["batch_size"], shuffle=True, num_workers=4)
- # Model
- model = MAESparK(
- encoder_cfg=config["model"]["encoder_cfg"],
- input_size=config["model"]["input_size"],
- patch_size=config["model"]["patch_size"],
- embed_dim=config["model"]["embed_dim"],
- masking_ratio=config["model"]["masking_ratio"]
- ).to(device)
- # Optimizer
- optimizer = optim.AdamW(model.parameters(), lr=float(config["train"]["lr"]))
- criterion = nn.MSELoss()
- # Output dirs
- os.makedirs(config["train"]["output_dir"], exist_ok=True)
- os.makedirs(os.path.join(config["train"]["output_dir"], "recon"), exist_ok=True)
- loss_history = []
- # Training loop
- for epoch in range(config["train"]["epochs"]):
- model.train()
- epoch_loss = 0.0
- for images, masks in tqdm(dataloader, desc=f"Epoch {epoch+1}/{config['train']['epochs']}"):
- images, masks = images.to(device), masks.to(device)
- optimizer.zero_grad()
- outputs = model(images, masks)
- loss = criterion(outputs, images)
- loss.backward()
- optimizer.step()
- epoch_loss += loss.item()
- avg_loss = epoch_loss / len(dataloader)
- loss_history.append(avg_loss)
- print(f"Epoch {epoch+1} Loss: {avg_loss:.6f}")
- plt.figure()
- plt.plot(loss_history, label="Total Loss")
- plt.xlabel("Epoch")
- plt.ylabel("Loss")
- plt.title("Training Loss Curve")
- plt.legend()
- plt.grid(True)
- plt.savefig(os.path.join(config["train"]["output_dir"], "loss_curve.png"))
- plt.close()
- # Save checkpoint
- if (epoch + 1) % config["train"]["save_every"] == 0:
- ckpt_path = os.path.join(config["train"]["output_dir"], f"mae_epoch_{epoch+1}.pth")
- torch.save(model.state_dict(), ckpt_path)
- # Visualization
- if (epoch + 1) % config["train"]["viz_every"] == 0:
- print("Before concatenation:")
- print(f"images: {images.shape}, outputs: {outputs.shape}, masks: {masks.shape}")
- save_recon_images(images, outputs, masks, epoch + 1, config["train"]["output_dir"])
- # Plot first sample's patch mask
- patch_h = config["model"]["input_size"] // config["model"]["patch_size"]
- patch_w = patch_h # assuming square images
- mask_sample = masks[0].cpu().numpy().reshape(patch_h, patch_w)
- plt.figure(figsize=(4, 4))
- plt.imshow(mask_sample, cmap="gray")
- plt.title(f"Mask (Epoch {epoch + 1})")
- plt.axis("off")
- mask_path = os.path.join(config["train"]["output_dir"], f"mask_epoch_{epoch + 1}.png")
- plt.savefig(mask_path)
- plt.close()
- print(f"[✓] Saved mask visualization to: {mask_path}")
- if __name__ == "__main__":
- train()
train.py at commit e74770a, no license · at the source
Overview
- ITI/LARSyS, Instituto Superior Técnico, Universidade de Lisboa, Lisbon, Portugal
- H&TRC - Health & Technology Research Center, ESTeSL - Lisbon School of Health, Polytechnic Institute of Lisbon, Lisbon, Portugal
- IRL - Instituto de Retina de Lisboa, Lisbon, Portugal
- Department of Ophthalmology, Hospitais da Universidade de Coimbra, Local Health Unit of Coimbra, Coimbra, Portugal
- Hospital Garcia de Orta, Almada-Seixal Local Health Unit, Almada, Portugal
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
e74770ad0c2267f83dd9312e3b1d2e2578bd5769, 28 November 2025Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
17 files
- Autoencoder/
Dataset.py , Python, 40 lines - Autoencoder/
__init__.py , Python, 1 line - Autoencoder/
masked_autoencoder.py , Python, 123 lines - Autoencoder/
train.py , Python, 106 lines, 1 match - evaluate_test.py, Python, 77 lines
- models/
UNET.py , Python, 57 lines - models/
__init__.py , Python, 25 lines - models/
drunet.py , Python, 83 lines - models/
resunet.py , Python, 67 lines - models/
segresnet.py , Python, 90 lines - models/
seuneter.py , Python, 80 lines - models/
seunter_2.py , Python, 78 lines - models/
unetpp.py , Python, 59 lines - models/
unetpp_decoder.py , Python, 42 lines - segment_eval.py, Python, 113 lines
- train_model.py, Python, 106 lines
- README.md, Text, 12 lines
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://
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/
url = {https://
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/
VL - 16
IS - 5
SP - 408
SN - 2223-4292
PB - AME Publications
DO - 10.21037/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.21037/
"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":
"volume": "16",
"issue": "5",
"page": "408",
"DOI": "10.21037/
"PMID": "42147957",
"PMCID": "PMC13178413",
"ISSN": "2223-4292",
"publisher": "AME Publications",
"URL": "https://
"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.3389/frai.2026.1841639 [code]
- Label tree semantic losses for rich multi-class medical image segmentation.Journal: Frontiers in artificial intelligenceIn common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, 1 reference
- [2] doi:10.1364/boe.600665 [code]
- NeuroSeg-MF: robust neuron segmentation in two-photon Ca&
lt;sup& gt;2+& lt;/ sup& gt; imaging using multi-feature fusion and detection-guided SAM. Journal: Biomedical optics expressIn common: OpenCV, Pillow, PyTorch, 3 other tools, methods / tools, 2 references - [3] doi:10.1038/s41598-026-61605-4 [code]
- Learning precise segmentation of neurofibrillary tangles from rapid manual point annotations.Journal: Scientific reportsIn common: PyTorch Lightning, OpenCV, Pillow, 4 other tools, methods / tools
- [4] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: PyTorch Lightning, OpenCV, Pillow, 4 other tools
- [5] doi:10.1007/s12021-026-09815-z [code]
- BasNet: Attention U-Net-Based Automated Axon Segmentation in Bielschowsky Silver-Stained Histology.Journal: NeuroinformaticsIn common: PyTorch Lightning, OpenCV, Pillow, 4 other tools
- [6] doi:10.1371/journal.pcbi.1014263 [code]
- MIRAGE: Robust multi-modal architectures translate fMRI-to-image models from vision to mental imagery.Journal: PLoS computational biologyIn common: PyTorch Lightning, OpenCV, Pillow, 4 other tools
- [7] doi:10.1162/imag.a.1207 [code]
- Investigating the temporal dynamics and modeling of mid-level feature representations in humans.Journal: Imaging neuroscience (Cambridge, Mass.)In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools
- [8] doi:10.1038/s41597-026-07077-7 [code]
- Everyday Activity Science and Engineering Table Setting Dataset.Journal: Scientific dataIn common: PyTorch Lightning, OpenCV, PyTorch, 3 other tools, other, methods / tools
- [9] doi:10.1162/imag.a.1326 [code]
- RAVEN: Robust, generalizable, multi-resolution structural MRI upsampling using autoencoders.Journal: Imaging neuroscience (Cambridge, Mass.)In common: PyTorch Lightning, OpenCV, Pillow, 4 other tools
- [10] doi:10.1016/j.isci.2026.116355 [code]
- Tera-MIND: Tera-scale mouse brain simulation via spatial mRNA-guided diffusion.Journal: iScienceIn common: PyTorch Lightning, OpenCV, Pillow, 4 other 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 16 scripts, and 1 match between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:5822720b4ee4dd41…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
