InSPyReNet, IS-Net and SelfReformer mask the object inside a box
InSPyReNet, IS-Net and SelfReformer are salient object segmentation models: given an image, or the area inside a bounding box, they return a mask of the object that stands out from its background. They are class-agnostic, so in Supervisely they turn existing box labels into masks without any training on your classes.

- Tasks
- Salient object segmentation
- Labels
- Bitmap masks from whole images or bounding boxes
- Apps
- Serve, Apply
Apps in the Supervisely Ecosystem
Every model in Supervisely comes as a Supervisely App: a module from the Ecosystem that plugs into the platform and runs on your own GPU, with no code to install. A Serve App puts the model behind the labeling tools, and where the model can be trained, a Train App fits it to your labeled project. All Apps work on the same projects, so you add a model, update it or swap it for another without changing anything else.
ServeServe InSPyReNetSwin-B InSPyReNet at HD or 384×384 resolution, for images and videos.
ServeServe IS-NetIS-Net trained on DIS5K for objects with complex contours, or your own weights.
ServeServe SelfReformerA transformer model trained on DUTS-TR that separates objects from the background.
ApplyApply Object Segmentor to Images ProjectTurns the bounding boxes of chosen classes into masks with a served segmentation model.
What salient object segmentation does
A salient object segmentation model separates the foreground from the background: it predicts one mask for the object that draws the eye. It has no list of classes and cannot say what the object is. That is why it pairs well with bounding boxes: a box says which object and which class, and the model, run on the area inside the box, says exactly which pixels belong to it.
All three models predict a soft mask with values from 0 to 255. Supervisely stores masks as one-bit bitmaps, so the app keeps the pixels above pixel_confidence_threshold and drops the rest. When the model runs on a box, bbox_padding widens the crop first, in pixels (100px) or percent (10%), so the model sees some context around the object.
Three models, three ideas
| Model | Idea | In the app |
|---|---|---|
| InSPyReNet | Builds the saliency map as an image pyramid, so a low- and a high-resolution pass of the same image can be blended for high-resolution output | Swin-B HD (longer side up to 1280 px) or Swin-B 384×384; images and videos |
| IS-Net | Intermediate supervision at the feature and mask level, trained on DIS5K, a dataset of highly detailed object masks | One DIS5K checkpoint or your own weights from Team Files; images |
| SelfReformer | A transformer branch learns the global context, and a refinement module fixes local details | One checkpoint trained on DUTS-TR; images and videos |
"Revisiting Image Pyramid Structure for High Resolution Salient Object Detection" (ACCV 2022) introduced InSPyReNet, the Inverse Saliency Pyramid Reconstruction Network, to predict high-resolution masks without high-resolution training data. The checkpoints in the app were trained on a long list of saliency datasets, from DUTS-TR and HRSOD to DIS5K. The app README notes that it can give near-perfect masks but uses more GPU memory than other models of this task: about 6 GB for an HD image in Swin-B HD mode. Swin-B HD suits large images but may return empty or wrong masks on small ones; Swin-B 384×384 always works at 384×384 pixels and needs less memory.
IS-Net comes from "Highly Accurate Dichotomous Image Segmentation" (ECCV 2022). Its authors collected DIS5K, 5,470 high-resolution images of camouflaged, salient and intricate objects with very fine labels, and proposed the HCE metric, which estimates how many clicks a person needs to correct a mask. It is the one to try for objects with complex contours.
SelfReformer uses a transformer to catch long-range context that convolutional encoders miss, upsamples its predictions with Pixel Shuffle to the size of the ground truth instead of shrinking the ground truth, and refines local details with a two-stage Context Refinement Module.
Serving the model and applying it
- Run Serve InSPyReNet, Serve IS-Net or Serve SelfReformer from the Ecosystem. The apps run on a GPU or a CPU.
- Select a pretrained model, or with IS-Net paste the path of your own checkpoint in Team Files, and press Serve.
- Connect another app to the running session and apply the model.
- One image at a time: in NN Image Labeling, click Apply model to image, or select a bounding box and click Apply model to ROI to segment only what the box holds. The threshold and padding can be changed on the inference tab of its settings.
- A whole project of boxes: Apply Object Segmentor to Images Project runs the model on every bounding box of the classes you choose, previews the result, and adds a mask of class
<box class>_maskfor each box, to a new project or to the same one. - Whole images or videos: Apply NN to Images Project and Apply NN to Videos Project (InSPyReNet and SelfReformer only) label every image or frame.
The defaults differ: InSPyReNet and SelfReformer pad boxes by 66% and keep pixels above 150, IS-Net pads by 100 px and keeps pixels above 200. Raise the threshold for tighter masks, lower it to keep thin parts.
Which model, and when to use another
Start with InSPyReNet if the GPU has the memory, IS-Net for objects with fine, complex outlines or for weights of your own, and SelfReformer as a second general-purpose model. Since none of them needs training, try two on the same boxes in Apply Object Segmentor and keep the better one.
A salient model gives one mask per box or per image, for whatever stands out. When a box holds several objects, or the wanted object is not the most visible one, use Segment Anything in the Smart Tool, which also takes positive and negative clicks; Apply Object Segmentor accepts the original SAM as well. When an edge is partly transparent, such as hair or glass, an alpha matte from Matte Anything keeps it. And when you need masks of known classes on new images, train an instance segmentation model such as Detectron2 or Ultralytics YOLO on the masks these models helped you make.
The three apps are serve-only: there is no training app for them in Supervisely.
Frequently asked questions.
What is salient object detection?
Salient object detection, also called salient object segmentation, is the task of separating the most noticeable object of an image from its background. The model returns a mask of the foreground and no class label, so it works on any kind of object without training.
How do I turn bounding boxes into masks in Supervisely?
Serve InSPyReNet, IS-Net or SelfReformer, then run Apply Object Segmentor to Images Project on the project. It segments the area inside each bounding box of the classes you choose and adds the mask as a `<box class>_mask` object. For a single image, select a box in NN Image Labeling and click Apply model to ROI.
InSPyReNet, IS-Net or SelfReformer: which is best?
The app README says InSPyReNet can give near-perfect masks but needs more GPU memory than the others, about 6 GB for an HD image in Swin-B HD mode. IS-Net was trained on DIS5K for highly detailed objects and accepts your own weights. SelfReformer is a single DUTS-TR checkpoint. InSPyReNet and SelfReformer also label videos.
Train and serve models on your own data.
Label a project in a free account, train a model on it from the browser and deploy it on your own GPU. Or book a demo to run Supervisely on your servers.



