Practical overview
When it fits
Use Selfreformer when a research workflow needs the SelfReformer implementation for training or evaluating salient-object predictions, and the documented Python, PyTorch and GPU requirements fit the available environment.
Who it is for
- Computer-vision researchers studying salient object detection.
- Practitioners who want to reproduce the SelfReformer research implementation.
- Researchers comparing saliency models or adapting this network for experiments.
Documented uses
- Train the model on a salient-object-detection dataset.
- Test a pretrained checkpoint on a benchmark dataset.
- Save saliency prediction maps for subsequent evaluation.
- Organize datasets and benchmark folders in the layout used by the repository.
Requirements & limits
The implementation is a public GitHub repository marked BSD-3-Clause.
- The documented environment specifies Ubuntu 18.04, Python 3.8.3, Torch 1.8.2+cu111, Torchvision 0.9.2+cu111 and Kornia.
- Git LFS is needed for large files; the README also provides a Google Drive download if the LFS file cannot be obtained.
- The default training batch size of 16 is stated to require 24 GB of GPU RAM; reducing batch size is suggested for smaller hardware.
- The README says training currently supports a single GPU.
- Evaluation metrics use separate tools referenced by the repository, including code from BASNet and F3Net.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare datasets for SelfReformer training or evaluation
Organize image and mask files in the directory structure described for the model.
Before you start
- A dataset with image files and corresponding mask files.
- For training, a dataset folder placed under
dataset/. - For evaluation, benchmark datasets placed under
dataset/benchmark/.
Steps
Create a folder for each dataset.
Inside each dataset folder, create
ImagesandMasksfolders.Place image files such as
.jpgfiles inImagesand mask files such as.pngfiles inMasks.Put training datasets under
dataset/and evaluation datasets underdataset/benchmark/.
Expected outcome
The dataset follows the folder layout expected by the repository's documented training and evaluation workflow.
Guide limitations
- This guide covers dataset organization only; it does not verify dataset contents or run training or evaluation.
Set up the Swin backbone files
Place the released Swin backbone in the repository location specified by the README.
Before you start
- A copy of the SelfReformer repository.
- The Swin backbone file available through the README's linked download.
Steps
Obtain the Swin backbone from the link in the repository README.
Place the backbone under the
model/pretrainfolder.
Expected outcome
The Swin backbone file is located in the directory specified by the project instructions.
Guide limitations
- The README does not provide further steps here for running or evaluating the Swin variant.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- BarCodeReader/SelfReformer · Official homepage title · retained in its source language

