---
title: "Instance Segmentation by Jointly Optimizing Spatial Embeddings"
description: "How learned pixel offsets, adaptive clustering regions, and seed maps produce accurate instance masks at real-time speed on Cityscapes."
canonical: "https://research.elamur.ai/free/en/papers/neven-2019-instance-segmentation-jointly-optimizing-spatial/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/neven-2019-instance-segmentation-jointly-optimizing-spatial/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2019](https://md.research.elamur.ai/free/en/papers/2019/) / Instance Segmentation by Jointly Optimizing Spatial Embeddings and Clustering Bandwidth

# Instance Segmentation by Jointly Optimizing Spatial Embeddings and Clustering Bandwidth

Paper · 2019 · Davy Neven, Bert De Brabandere, Marc Proesmans et al.

**Authors:** Davy Neven, Bert De Brabandere, Marc Proesmans and [Luc Van Gool](https://md.research.elamur.ai/free/en/authors/luc-van-gool/) · **Year:** 2019 · **Venue:** IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**258** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2955671438) · [IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings](https://openalex.org/S4210176548) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/1906.11109)
- [DOI 10.1109/cvpr.2019.00904](https://doi.org/10.1109/cvpr.2019.00904)
- [arXiv 1906.11109](https://arxiv.org/abs/1906.11109)
- [OpenAlex](https://openalex.org/W2955671438)

Citations: OpenAlex, 2026-10-14.

## Deep dive: Instance Segmentation by Jointly Optimizing Spatial Embeddings and Clustering Bandwidth

How learned pixel offsets, adaptive clustering regions, and seed maps produce accurate instance masks at real-time speed on Cityscapes. · about 35 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Instance segmentation asks a computer to identify individual objects and mark exactly which image pixels belong to each one. Recognizing that an image contains people and cars is insufficient: the system must separate neighboring people, distinguish overlapping vehicles, and preserve the outlines of each object. The paper studies how to do this accurately without making inference too slow for applications such as autonomous driving. Its central proposal is to train pixel grouping and the size of the grouping region together, rather than learning pixel representations first and choosing a clustering rule afterward.

The method gives each pixel an offset vector, which moves its image coordinate toward a location associated with its object. The resulting location is called a spatial embedding. Pixels from the same object should arrive in a shared neighborhood, while pixels from other objects should remain outside it. The important change is that this neighborhood has a learned, object-specific size. A large object can receive a broader acceptance region; a small object can receive a narrower one. A Gaussian function turns an embedding’s distance from the object center into a membership score, and a loss connected to intersection-over-union trains the offsets and the region size jointly. Intersection-over-union measures how closely a predicted mask agrees with the correct mask by comparing their shared area with their combined area.

Finding useful centers is a separate part of the design. The network predicts a seed map for each semantic category, with high scores at pixels whose embeddings lie near their object’s center. At inference, the method selects a strong seed, takes its embedding as a center, retrieves the predicted clustering width at that pixel, and gathers the embeddings accepted by the resulting Gaussian. It then removes the assigned pixels from consideration and continues. This produces individual masks without first generating bounding-box proposals. The network uses ERFNet as its base, with a shared encoder and separate decoders for geometric outputs and seed scores.

On the Cityscapes test set, training with the fine annotations alone yields 27.6 AP, compared with 26.2 for Mask R-CNN and 31.8 for PANet under the same broad training-data category. The method therefore occupies second place among the fine-only systems compared in the paper. Its reported execution rate is 11fps at 2048x1024 resolution, with 65ms for the network’s forward computation and 26ms for clustering. The validation experiments support the importance of learning the clustering width: under ground-truth-assisted object sampling, the reported comparison is 28 AP with a fixed width against 38.7 AP with a learnable one. Further comparisons favor a learnable attraction center and an elliptical grouping region. These findings establish a strong accuracy–speed combination on Cityscapes, while leaving open how well the design transfers to other datasets, architectures, and operating conditions.

### Ideas worth borrowing

Learn the acceptance region. A representation is useful only through the rule that turns it into a decision. Here, the network learns both where pixels should move and how far from a center they may land while still belonging to an object. That coupling lets the acceptance region reflect the difficulty and scale of the instance. The reusable idea is to bring a downstream tolerance into training whenever a later stage groups predictions by distance. It could guide other grouping systems in which a fixed threshold treats small, tightly packed groups and large, dispersed groups poorly. The paper’s evidence concerns image instances, so applying the same principle elsewhere would require a new task-specific objective and evaluation.

Optimize the recovered object. Exact regression to an object center is a convenient intermediate target, but the desired output is a correct mask. The proposed loss evaluates a differentiable membership map and uses a surrogate for the mask-overlap objective. This gives the system freedom to tolerate imperfect offsets when they still produce the right grouping. The general lesson is to distinguish a useful computational route from the actual criterion of success. In another structured prediction problem, an intermediate coordinate, score, or representation need not be individually exact if the final decision is correct. The difficult part is constructing a training signal that preserves this freedom without allowing unrelated outputs to collapse together.

Predict which outputs are dependable. The seed map does more than identify foreground pixels. Its target reflects whether a pixel’s embedding is close enough to the object center to serve as a good clustering anchor. This is a task-specific notion of reliability: a pixel may belong to an object while being a poor choice for initializing its cluster. The same distinction can help systems that must choose representatives from many local predictions. Rather than treating all candidates equally, a separate output can estimate which candidates are useful for the next operation. The estimate should be trained against the property that operation actually needs.

Match training aggregation to inference sampling. During training, an object’s Gaussian width is obtained by averaging the width predictions across its pixels. At inference, that average is unavailable because the object mask has not yet been recovered. The system instead reads the width at the selected seed. A smoothness term encourages the individual predictions to agree with the training-time average. This is a broadly useful design check: when training can aggregate over known groups but deployment must inspect a local representative, the local and aggregate quantities need an explicit reason to match. Otherwise, a well-behaved training statistic may conceal unreliable individual predictions.

Separate geometry from object discovery when testing. The ablations use correct object locations and semantic categories to reduce interference from detection and classification errors. This makes the comparisons more informative about the grouping loss itself. The resulting score is deliberately different from the complete system’s benchmark score. Similar diagnostic evaluations can help in any pipeline where an early error prevents a later component from being assessed fairly. They work best when paired with ordinary end-to-end results, so that component quality and practical performance remain visible as distinct questions.

Spend training effort on relevant scale. The training procedure begins with object-centered crops and later uses larger crops so that large objects can be represented more fully. This addresses two practical concerns at once: background-only regions consume computation, and a small crop can hide the complete extent of an object. The transferable idea is to inspect whether the sampling procedure exposes the structures the output must recover. A curriculum based on available context can be useful when local examples are efficient to learn from but incomplete for the final task. The paper demonstrates this procedure as part of its implementation, without isolating how much of the final score comes from the crop schedule.

### How Mova uses it

The connection to Mova, a small transparent language system implemented in Rust, is methodological rather than an established implementation dependency. The paper develops an image segmentation system, and its experiments do not evaluate language processing. There is no basis for saying that Mova already contains its Gaussian grouping loss, spatial offsets, or seed-map machinery. The useful question is which design principles could be translated into explicit, inspectable components for [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/).

The most direct possibility concerns grouping decisions. A language system may need to collect several mentions, observations, or candidate analyses into a common group. The segmentation paper shows why it can be restrictive to choose a universal distance threshold before learning what groups look like. If Mova were to use a numerical grouping component, it could investigate whether each proposed group needs its own acceptance width. The implementation could expose the representative, the distance calculation, the chosen width, and the resulting membership decisions. That would make the decision trace understandable, although interpretability alone would not establish that the grouping was linguistically correct.

This analogy has a strict boundary. Image coordinates provide a concrete spatial reference: an offset starts at a pixel and ends at an embedding location. Language does not automatically supply an equivalent geometry. A sentence position, an embedding coordinate, and a linguistic relation are different things. Before adapting this method, Mova would need a justified representation in which distance predicts the intended grouping relationship. The paper supplies no evidence that moving textual items toward a shared point would solve that problem. Its contribution is a way to learn assignment tolerances once an appropriate representation and supervision are available.

A more modest borrowing would be to separate membership from suitability as a representative. In the segmentation system, a pixel can belong to an object without being a good seed. A language component could likewise distinguish whether a candidate belongs in a group from whether it is a useful anchor for explaining or extending that group. For example, a proposed application to [coreference resolution](https://md.research.elamur.ai/free/en/concepts/coreference-resolution/) could examine representative mentions separately from membership decisions. This remains an engineering idea, not a result established by the paper. The training target would have to express what makes a representative useful in that linguistic setting.

The training–inference consistency check is especially compatible with a transparent implementation. If a component is trained using an aggregate over a known group but later makes decisions from a single selected element, Mova could record and test that mismatch explicitly. The segmentation method addresses it by making local bandwidth predictions agree within an instance. An analogous language component might need a different consistency rule, but the underlying audit question is concrete: does the quantity inspected during execution have the same meaning as the quantity optimized during learning?

The paper also suggests an evaluation habit Mova could adopt without importing the architecture. A grouping component can be tested with correct upstream labels before being tested inside the complete pipeline. For language tasks, that means distinguishing errors caused by incorrect candidates from errors caused by the operation that groups or selects them. Such a diagnostic should retain its own label and should not replace ordinary task evaluation. The authors’ separation between ground-truth-assisted grouping scores and complete Cityscapes results is valuable precisely because it prevents a component experiment from being mistaken for deployment performance.

For Mova, then, the credible applications are explicit adaptive tolerances, representative-quality scores, consistency checks, and carefully separated evaluations. None requires claiming that a vision method has already solved a language problem. Each would become a concrete use only after an implementation, a suitable linguistic objective, and evidence that the added mechanism improves the relevant task.

### The problem and its context

#### From object categories to individual masks

A semantic segmentation system assigns a category to each pixel. If several neighboring people all receive the person label, that category map can be correct while leaving their individual boundaries unresolved. Instance segmentation adds the requirement that each object receive its own mask. The output must therefore answer both what kind of thing occupies a pixel and which particular object it belongs to.

Bounding boxes solve a less detailed localization problem. A rectangular box can indicate where an object lies, but it does not follow the object’s silhouette. The paper motivates masks through applications that need more precise object extents, including robotics, autonomous driving, and photo editing or analysis. These applications also impose different practical pressures. A carefully outlined mask is valuable, but a system intended to process changing scenes must produce it quickly enough to remain useful.

The authors frame their contribution around an apparent tradeoff in the methods they review. Proposal-based systems achieve strong accuracy but incur a speed cost and produce masks at a fixed, relatively low resolution. Proposal-free systems can generate dense masks at high resolution and frequently run faster, yet their accuracy has generally lagged. The research problem is to improve the second family without giving up the execution characteristics that make it attractive.

#### Detect an object, then segment it

The proposal-based lineage discussed in the paper builds on [Faster R-CNN](https://md.research.elamur.ai/free/en/papers/ren-2015-faster-r-cnn-towards-real/). In that pattern, object detection supplies candidate regions, and a subsequent operation determines which pixels within each candidate belong to the object. Earlier approaches refined detector outputs into masks. Mask R-CNN and PANet simplify or extend this structure by incorporating mask prediction into the detection network.

This arrangement gives each candidate object a dedicated place in the computation. It avoids having to discover every instance solely by grouping dense pixel outputs. According to the paper, these methods were the strongest performers on popular instance segmentation benchmarks. Their practical drawback is that the predicted object masks are small: the related-work discussion describes a resolution of 32x32 pixels. The authors connect that limited detail to applications where precise outlines matter.

The speed objection is equally central. An accurate system that processes images too slowly cannot satisfy the intended real-time setting. The paper’s argument does not require proposal-based segmentation to be intrinsically incapable of speed improvements. It concerns the accuracy and execution behavior of the systems against which the authors compare. The proposed alternative is intended to change that observed tradeoff.

#### Group pixels without object proposals

Proposal-free methods begin with dense image predictions and recover individual objects through relationships among pixels. One route learns an embedding for every pixel. A successful embedding makes pixels from the same object similar and pixels from different objects distinguishable. Clustering then converts those representations into object assignments.

The authors describe a difficulty with using fully convolutional networks for this purpose: their spatial invariance does not naturally provide everything an instance embedding needs. Two image regions can look similar while belonging to separate objects. The related work therefore includes approaches that introduce coordinate maps or semi-convolutional operations. Those additions make location available more directly, addressing a mismatch between appearance-based computation and the need to distinguish instances.

The paper follows a particularly simple spatial construction. A pixel predicts a relative displacement towards its object’s center. Adding that displacement to its original coordinate yields an absolute location. Pixels need not acquire arbitrary identifiers; they can be grouped because their displaced positions gather together. The authors attribute the center-pointing approach to earlier work by Kendall and colleagues, with inspiration from Liang and colleagues.

This is also where the remaining problem becomes clear. Learning a displacement is only part of an instance segmentation system. At inference, the system still needs to find centers and decide which embeddings belong around them. If the loss trains offsets independently of those decisions, success on the regression objective may not translate into the best masks.

#### Why exact center regression is restrictive

A straightforward objective tells every object pixel to predict the displacement to the object’s centroid. The centroid is the average coordinate of the pixels in that object. The same target location applies to pixels throughout the instance, even though their distances from it differ.

The paper argues that distant pixels make this demand troublesome. An edge pixel on a large object must predict a longer and potentially more difficult displacement than a nearby interior pixel. More fundamentally, the final task does not require every embedding to land on exactly the same coordinate. It requires the correct pixels to be assigned to the same object. A region around the center can therefore be sufficient.

A fixed acceptance region introduces another difficulty. It must be narrow enough to keep neighboring small instances separate. Once that narrow width has been selected, large objects inherit the same demanding tolerance. A setting chosen to avoid merging small objects can make it harder to retain pixels from a large one. The authors’ response is to let the training objective choose an instance-specific region.

The relationship to uncertainty estimation is suggestive but limited. The paper connects its relaxed loss to earlier work, including [What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision?](https://md.research.elamur.ai/free/en/papers/kendall-2017-uncertainties-need-bayesian-deep-learning/), where learned uncertainty affects training. Here, the learned quantity also becomes part of the inference rule. The bandwidth determines which pixels enter the recovered mask. That operational role is essential to the contribution: the tolerance is an output used to construct the final answer.

### The method, step by step

The method combines dense prediction with an explicit grouping procedure. During training, known instance masks define the groups whose embeddings and bandwidths should work together. During inference, predicted seed scores replace that ground-truth knowledge by identifying promising centers. The same Gaussian membership rule connects the learning objective to the recovered masks.

From image pixels to separate object masks The steps in order.

#### Represent a pixel by where it points

The paper writes the collection of image coordinates as a set.

```
𝒳 = {x₀, x₁, x₂, …, x_N}
```

Here, 𝒳 is the pixel-coordinate set, and each xᵢ is a coordinate vector with horizontal and vertical components. The index i identifies a pixel, while N serves as the pixel-count notation in this part of the formulation.

The desired result is a collection of instance groups.

```
𝒮 = {S₀, S₁, …, S_K}
```

The symbol 𝒮 denotes the set of instances. Each Sₖ contains the pixels associated with object k, and K indexes the instances under consideration. A semantic category is also needed in the complete task, but this notation isolates the grouping question.

For a known instance, its geometric centroid is the average position of its pixels.

```
Cₖ = (1 / |Sₖ|) ∑_{x ∈ Sₖ} x
```

Cₖ is the centroid of instance Sₖ, x ranges over that instance’s pixel coordinates, and |Sₖ| is the number of pixels in it. This uses the instance cardinality to make the averaging operation explicit. A centroid describes the whole mask geometrically; it is not chosen by inspecting which pixel looks most representative.

The network predicts an offset at every pixel, then adds that offset to the original location.

```
eᵢ = xᵢ + oᵢ
```

The spatial embedding eᵢ is the displaced coordinate. The original coordinate is xᵢ, and oᵢ is the predicted offset vector. An embedding is therefore still a location in a spatial coordinate system, rather than an unrestricted feature vector.

This construction supplies a useful separation between local prediction and global assignment. The network predicts a relative movement at each pixel. The clustering procedure examines where those movements end. Pixels that began far apart can become neighbors in embedding space if they belong to the same object.

#### Understand the regression baseline

The conventional supervised target is the displacement from the pixel to its instance centroid.

```
ôᵢ = Cₖ − xᵢ, for xᵢ ∈ Sₖ
```

The symbol ôᵢ is the target offset, Cₖ is the correct object centroid, and xᵢ is the pixel’s original coordinate. Membership in Sₖ identifies which centroid supplies the target.

A regression loss penalizes disagreement between the predicted and target offsets.

```
ℒ_regr = ∑_{i=1}^{n} ‖oᵢ − ôᵢ‖
```

ℒ_regr is the regression objective, n is the number of pixel terms included, and the norm measures the discrepancy between the predicted vector oᵢ and target vector ôᵢ. The summation adds those discrepancies over the supervised pixels.

Once offsets have been predicted, a conventional assignment can select the nearest estimated centroid.

```
eᵢ ∈ Sₖ : k = argmin_{C ∈ 𝒞} ‖eᵢ − C‖
```

The set 𝒞 contains the candidate centroids. The expression chooses the center C with minimum distance from embedding eᵢ, and k identifies the corresponding instance. The difficulty is that estimating 𝒞 and making this assignment happen after the regression output has been learned.

The authors regard that separation as a weakness. The loss encourages accurate vectors, but it does not directly evaluate the mask obtained after center discovery and assignment. The proposed method changes the training question from whether a vector is exact to whether the resulting membership decision is correct.

#### Replace an exact destination with a tolerated neighborhood

A hinge-style objective illustrates how a region can enter the loss.

```
ℒ_hinge = ∑_{k=1}^{K} ∑_{eᵢ ∈ Sₖ} max(‖eᵢ − Cₖ‖ − δ, 0)
```

ℒ_hinge is the hinge objective, Cₖ is the centroid for instance k, and δ is the fixed tolerance around it. The outer sum covers instances, and the inner sum covers their embeddings. The maximum operation makes the contribution zero when an embedding already lies inside the tolerated distance.

At inference, that same tolerance can define membership.

```
eᵢ ∈ Sₖ ⇔ ‖eᵢ − Cₖ‖ < δ
```

The double implication states that embedding eᵢ is assigned to Sₖ exactly when its distance from center Cₖ is smaller than δ. Unlike nearest-center assignment, this rule can reject an embedding that lies too far from a center.

This formulation exposes the scale problem. A single δ must work for nearby small objects as well as large ones. Increasing it makes grouping more forgiving but risks combining distinct instances. Decreasing it helps separation but demands more precise offsets. The paper therefore replaces the fixed tolerance with a learned bandwidth for every object.

#### Turn embedding distance into membership

The core mapping is a Gaussian centered on the instance.

```
φₖ(eᵢ) = exp(−‖eᵢ − Cₖ‖² / (2σₖ²))
```

φₖ is the membership-scoring function for example k. Its input eᵢ is a spatial embedding, Cₖ is the instance center, and σₖ controls the width of the Gaussian. The exponential operation converts squared distance into a score that decreases as the embedding moves away from the center.

A wider Gaussian accepts embeddings over a broader neighborhood. A narrower Gaussian makes the score decline more quickly with distance. The method assigns a pixel to the instance when its score exceeds 0.5. That threshold translates the continuous membership map into a binary mask.

For a scalar bandwidth, the corresponding acceptance radius is explicit.

```
margin = √(−2σₖ² ln 0.5)
```

The margin is the distance from Cₖ at which the Gaussian reaches the membership threshold. σₖ is the instance bandwidth, ln denotes the natural logarithm, and 0.5 is the threshold used by the assignment rule. The expression shows why learning σₖ also learns the clustering radius.

The network does not initially output a single width for each known object. It produces a width value at every pixel, and training obtains an instance-level value by averaging.

```
σₖ = (1 / |Sₖ|) ∑_{σᵢ ∈ Sₖ} σᵢ
```

σᵢ is the predicted bandwidth at a pixel belonging to Sₖ. The object-level bandwidth σₖ is their mean, and |Sₖ| is the size of that instance. Ground-truth membership makes this aggregation possible during training.

For each object, the Gaussian generates a foreground-versus-background map over the image. The correct mask supplies the target: pixels of that instance should be accepted, while everything else should be rejected. Crucially, the negative group includes other objects. A bandwidth cannot improve its own instance’s mask merely by becoming large enough to gather unrelated pixels without penalty.

#### Train for overlap rather than exact offsets

The authors use the Lovasz-hinge loss to train these membership maps. They describe it as a piecewise-linear convex surrogate for Jaccard loss, the loss associated with intersection-over-union. The intent is to align optimization with the quality of each recovered instance mask.

This choice changes what the network is asked to learn. Neither the offset vectors nor the bandwidths receive exact target values in the main grouping loss. Instead, their joint effect on foreground and background membership is evaluated. Gradients pass through the Gaussian and into both outputs.

A pixel does not have to reach the centroid precisely. It has to reach a location accepted by its own object’s region and rejected by the inappropriate regions. Likewise, a bandwidth is not trained to match a predetermined function of object size. It is trained to help recover the correct mask.

The authors also connect the overlap-oriented loss to foreground–background imbalance. An instance may occupy only part of the image, so treating all pixel decisions through an ordinary classification objective raises a question about the relative influence of foreground and background. The paper’s stated advantage is that its chosen surrogate targets overlap directly without requiring a separate correction for that imbalance.

This is still an optimization through a surrogate. The final binary mask is produced by thresholding and sequential clustering, whereas learning proceeds through a continuous Gaussian map and the Lovasz-hinge objective. The important connection is that the training map already expresses instance membership under the same kind of distance-and-bandwidth rule used during inference.

#### Let the acceptance region stretch

A scalar bandwidth creates a circular acceptance region in embedding space. The paper extends it by giving the horizontal and vertical axes separate bandwidths.

```
φₖ(eᵢ) = exp(−(eᵢₓ − Cₖₓ)² / (2σₖₓ²) − (eᵢᵧ − Cₖᵧ)² / (2σₖᵧ²))
```

The subscripts x and y identify horizontal and vertical components. Thus eᵢₓ and eᵢᵧ are the embedding coordinates, Cₖₓ and Cₖᵧ are the center coordinates, and σₖₓ and σₖᵧ control the acceptance width along each axis. The Gaussian now produces an elliptical rather than circular threshold region.

This extension matters when the useful tolerance differs by direction. An elongated object may permit a larger spread of embeddings along one axis while requiring a tight grouping along the other. The authors mention pedestrians and trains as motivating examples. The network needs separate bandwidth outputs for the axes to express that distinction.

The ellipse belongs to the embedding space. It is not an elliptical mask drawn over the image object. The final image mask still consists of whichever original pixels have embeddings that pass the membership test. This distinction explains how a simple acceptance region can recover objects whose visible outlines are not themselves circular or elliptical.

#### Let the attraction center move

The geometric centroid is a reasonable center, but the method can also define the center through the embeddings themselves.

```
φₖ(eᵢ) = exp(−‖eᵢ − (1 / |Sₖ|) ∑_{eⱼ ∈ Sₖ} eⱼ‖² / (2σₖ²))
```

Here, the center inside the norm is the average of embeddings eⱼ belonging to instance Sₖ. The index j ranges over the instance’s pixels, |Sₖ| gives their count, and σₖ remains the Gaussian bandwidth. The function φₖ evaluates how close eᵢ lies to that learned mean.

The network can influence this center because changing the embeddings changes their average. This gives the system freedom to find a convenient attraction location instead of requiring agreement around the mask’s geometric centroid.

That freedom is useful only in combination with the membership objective. The purpose is not to make the center meaningful as a separately interpreted physical point. Its role is to organize embeddings so that the resulting instance mask is correct. The validation comparisons test whether that extra flexibility helps.

#### Learn which pixel can supply a center

At inference, the correct masks are unknown, so their centroids and embedding means cannot be computed directly. The seed map provides a practical alternative. It predicts which individual pixels have embeddings close to the center of their instance.

For foreground pixels, the target is the Gaussian score already used by the grouping objective. For background pixels, the target is zero.

```
ℒ_seed = (1 / N) ∑ᵢᴺ [𝟙_{sᵢ ∈ Sₖ} ‖sᵢ − φₖ(eᵢ)‖² + 𝟙_{sᵢ ∈ bg} ‖sᵢ − 0‖²]
```

ℒ_seed is the seed regression loss, sᵢ is the predicted seed score at pixel i, and N is the number of pixels included. The indicator 𝟙 selects the appropriate foreground or background term; bg denotes background. The membership notation identifies the instance or background associated with the pixel supplying sᵢ.

For this loss, φₖ(eᵢ) is treated as a fixed target value. Gradients update the seed prediction, instead of passing through the Gaussian target into the embedding outputs. The seed branch learns to estimate the usefulness of an embedding produced by the geometric branch.

This explains a potentially surprising visual pattern. An object border can receive a low seed score even though it should remain part of the mask. Its embedding may be less reliable as a center estimate. Seediness is therefore not simply a second name for foreground membership.

The network predicts a distinct seed map for each semantic category. This allows center selection to supply category information alongside object localization. The method repeats its clustering procedure separately for these category-specific maps.

#### Recover masks through sequential clustering

For a chosen class, inference begins with the highest remaining seed score. The embedding at that pixel becomes the estimated center, and the bandwidth prediction at the same location becomes the estimated clustering width.

```
eᵢ ∈ Sₖ ⇔ exp(−‖eᵢ − Ĉₖ‖² / (2σ̂ₖ²)) > 0.5
```

Ĉₖ is the center obtained from the selected seed’s embedding, and σ̂ₖ is the bandwidth read at that seed location. The expression assigns pixel i to Sₖ when its embedding eᵢ passes the Gaussian threshold. The hats distinguish these inference estimates from the quantities formed using known training instances.

After a cluster is recovered, its pixels are masked out in the seed map. The procedure then chooses another available seed and repeats, continuing until the seeds have been masked. It performs this process for each semantic class.

The sequential procedure makes seed quality important. A center and bandwidth are not merely descriptive outputs; they determine a grouping operation that changes which seeds remain available. The method therefore needs the selected pixel’s local bandwidth to be representative of the object-level width learned during training.

The smoothness loss addresses that requirement.

```
ℒ_smooth = (1 / |Sₖ|) ∑_{σᵢ ∈ Sₖ} ‖σᵢ − σₖ‖²
```

ℒ_smooth penalizes disagreement between each pixel bandwidth σᵢ and the instance average σₖ. The average is taken over Sₖ, whose size is |Sₖ|. Encouraging agreement makes it more reasonable to substitute the selected seed’s width for the training-time aggregate.

The roles of the losses are consequently distinct. The overlap objective determines useful grouping geometry, the seed objective learns where to initialize grouping, and the smoothness objective helps local bandwidth sampling behave consistently with training.

#### Build the prediction network

The implementation uses ERFNet, an encoder–decoder architecture chosen for fast dense segmentation. Its encoder is shared, while separate decoders produce geometric outputs and semantic seed maps. The geometric decoder predicts offsets and bandwidth values. It has 3 output channels with scalar bandwidths or 4 when separate axis bandwidths are used.

The offsets pass through a tanh activation, restricting their values to [-1,1]. Bandwidths must remain positive, so the implementation uses an exponential transformation. The paper describes the network as effectively predicting the following transformed quantity.

```
log(1 / (2σ²))
```

Here, σ is a bandwidth and log is the logarithmic parameterization used for its transformed output. The reciprocal expression links the predicted quantity to the scale term inside the Gaussian exponent. This representation keeps the effective bandwidth positive.

Coordinates are normalized with the image’s aspect ratio preserved in the numerical scale. For Cityscapes images of 2048x1024 pixels, horizontal coordinates occupy [0,2], while vertical coordinates occupy [0,1]. Adjacent positions differ by 1/1024 in either direction. With offsets limited to [-1,1], a pixel can point up to 1024 pixels away from its starting position.

These details are part of the geometry, not incidental formatting choices. The bandwidth, offset, and distance calculations all operate in this coordinate system. Preserving the same coordinate increment horizontally and vertically prevents the image’s different dimensions from silently imposing different spatial scales.

#### Train with object-centered crops, then larger context

Training begins with 500x500 crops centered on objects from the original 2048x1024 training images. The authors use this stage to avoid spending excessive computation on image regions containing only background. It runs for 200 epochs with a batch-size of 12.

The network is then fine-tuned on 1024x1024 crops for another 50 epochs, using a batch-size of 2. The stated purpose is to improve treatment of large objects that could not fit fully inside the earlier crops. Batch normalization statistics remain fixed during this stage.

Optimization uses Adam with polynomial learning-rate decay.

```
(1 − epoch / max_epoch)^0.9
```

The variable epoch is the current training epoch, max_epoch is the stage’s maximum epoch count, and 0.9 is the decay exponent. The expression supplies the schedule factor that reduces the learning rate as training progresses.

The initial learning rate is 5e-4 during the first stage and 5e-5 during fine-tuning. Random horizontal mirroring supplements random cropping as augmentation. The reported training duration is roughly 24 hours using two NVIDIA 1080 Ti GPUs.

The authors also announce an official code release through the SpatialEmbeddings repository. The paper’s methodological account, however, is already organized around the quantities needed to understand the implementation: offsets, positive bandwidths, category-specific seeds, instance-level overlap training, and sequential recovery of masks.

### Experiments and results

#### What the benchmark measures

The experiments use Cityscapes, an urban-scene dataset whose combination of object-size variation and changing scene layout makes instance grouping difficult. The dataset contains 5,000 finely annotated images at 2048 by 1024 pixels. Those annotations include semantic categories and individual object identities. It also includes 20,000 coarsely annotated images with semantic annotations.

The instance segmentation task covers 8 semantic classes. Its main metric is average precision, abbreviated AP, evaluated over object regions and averaged across categories. The paper also names AP₅₀%, which uses an overlap of 50 %, together with AP₁₀₀ₘ and AP₅₀ₘ, which restrict attention to objects within the corresponding distances. The principal numerical comparisons discussed in the paper are AP and category-level AP.

Training data are an essential part of the [evaluation and benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/) discussion. The proposed system uses only the fine training set. Some competing systems also use the coarse set or COCO. The authors emphasize that trucks, buses, and trains are underrepresented in the fine annotations, so additional training sources can affect those categories differently from the common ones.

This makes the evaluation more informative than a single leaderboard ordering. A complete comparison needs to identify whether scores reflect the same annotation resources. The paper therefore discusses fine-only competitors separately, while also examining category-level results from systems trained with additional data.

#### Overall accuracy with fine-only training

The main test-set result is 27.6 AP. In the comparison restricted to fine-only training, this places the method above Mask R-CNN and below PANet. The authors describe it as second place within that group.

Cityscapes test AP with fine-only training The proposed method exceeds Mask R-CNN while PANet achieves the highest AP in this comparison.

**The numbers**

| System or setting | AP |
| --- | --- |
| Mask R-CNN | 26.2 |
| Spatial embeddings with learned bandwidth (this paper) | 27.6 |
| PANet | 31.8 |

The ranking matters because the paper’s contribution is not a claim to the highest available segmentation accuracy under every condition. Its case depends on obtaining a strong score together with fast execution and dense masks. PANet remains ahead on the overall accuracy metric in this fine-only comparison.

At category level, the proposed method improves on the fine-only Mask R-CNN results reported for person, rider, and car. The person comparison is 34.5 against 30.5, the rider comparison is 26.1 against 23.7, and the car comparison is 52.4 against 46.9. These are category-specific Cityscapes test results, rather than alternative overall AP scores.

That breakdown helps explain why an overall average can conceal different strengths. The method’s performance on these categories is stronger than its overall ranking alone might suggest. At the same time, favorable results for selected categories do not establish an advantage for every object type.

#### Comparisons involving additional training data

The authors also discuss GMIS, which uses both fine and coarse annotations. It has the same overall AP as the proposed method, but the category pattern differs. In the reported comparison, GMIS performs better on truck, bus, and train and worse on the other categories. The paper attributes this pattern to the additional coarse training data and the scarcity of those categories in the fine set.

That attribution is plausible within the dataset description, but it is not a controlled retraining experiment. The systems differ in more than the availability of coarse annotations. The safe conclusion is that the overall tie hides a category distribution consistent with the authors’ training-data explanation.

The comparison with Mask R-CNN trained on fine annotations plus COCO is explicitly treated with caution. On person, the proposed system obtains 34.5 against 34.8; on rider, it obtains 26.1 against 27.0. On car, its 52.4 exceeds 49.1, and on bicycle, its 18.9 exceeds 18.7.

These results show that fine-only training does not prevent the method from being competitive on those categories. They do not remove the training-data mismatch or justify a general claim that the proposed architecture makes extra annotations unnecessary. The paper uses them to illustrate specific strengths, especially for people and vehicles, rather than to establish an equal-resource overall ranking.

#### Speed alongside accuracy

The reported timing comparison uses images at 2048x1024 resolution and is described as approximate. Mask R-CNN combines strong AP with slow execution, while Discriminative loss and Box2Pix trade accuracy for faster processing. The proposed system is intended to occupy a more favorable position between those extremes.

Approximate Cityscapes execution rates at 2048x1024 The proposed system combines the fastest reported rate in this comparison with its strong test AP.

**The numbers**

| System or setting | fps |
| --- | --- |
| Mask R-CNN | 1 |
| Discriminative loss | 5 |
| Box2Pix | 10.9 |
| Spatial embeddings with learned bandwidth (this paper) | 11 |

The associated test accuracies provide necessary context for that speed chart. Discriminative loss is reported at 17.5 AP, and Box2Pix at 13.1 AP. The proposed system’s result therefore concerns its joint operating point: it retains a substantially stronger segmentation score while running at a comparable practical rate to the faster baseline.

The internal timing breakdown assigns 65ms to the network’s forward pass at 2MP resolution and 26ms to clustering. Reporting both parts matters because the dense prediction network is not the entire instance segmentation algorithm. Center selection and mask recovery remain necessary operations, and their cost belongs in the execution picture.

The authors call this real-time performance and present the system as the first proposal-free approach in their comparison to maintain high accuracy at that speed. The evidence is the Cityscapes implementation and its reported timing. It should not be expanded into a guarantee for any image size, hardware platform, or application latency requirement.

#### Qualitative evidence

The visual examples compare input images, annotations, and predicted instance masks. The authors highlight small-object detection and point out cases where predictions appear to identify correct objects absent from the annotations. This supports their qualitative impression that the system can recover fine instance detail.

Such examples have a different evidential role from the benchmark metric. They can reveal useful behavior, annotation ambiguities, or specific failure mechanisms. They do not supply a measured rate of missed annotations, nor do they establish that extra predictions are generally correct. The main quantitative claim remains the scored Cityscapes test result.

### What the ablations show

#### Isolate grouping from detection and classification

The ablations evaluate the Cityscapes validation set with ground-truth assistance. Correct annotations are used to locate objects and assign their categories, reducing the influence of mistakes in seed-based detection and semantic classification. The paper marks the resulting scores as AP_gt.

This setup asks a narrower question than the complete benchmark: given privileged information about the objects, how well does the embedding-and-bandwidth mechanism recover their masks? It is a useful diagnostic because a poor seed map could otherwise obscure an improved grouping objective. Equally, a strong seed map could disguise weaknesses in the grouping geometry.

The assisted scores should therefore remain separate from ordinary test AP. They describe the behavior of the instance component under favorable upstream conditions. The full system still needs to find good centers and categories for itself.

#### Learning the width is the main controlled contrast

The fixed-width baseline uses a margin of 20 pixels. The rationale is to retain the ability to distinguish small nearby instances. The learnable version gives each object its own bandwidth instead of requiring every instance to satisfy that same tolerance.

Cityscapes validation AP with ground-truth-assisted sampling Learning an instance-specific bandwidth improves grouping over the fixed-margin setting.

**The numbers**

| System or setting | AP_gt |
| --- | --- |
| Fixed bandwidth | 28 |
| Learned instance bandwidth (this paper) | 38.7 |

This is the clearest numerical evidence for the paper’s central mechanism. Under the assisted setup, adaptive bandwidths produce better instance recovery than the selected fixed margin. Because object discovery and category assignment are supplied, the result is more directly about grouping than about detection.

The authors also report that the contrast is less pronounced for categories containing relatively more small instances. That pattern matches the motivation: a narrow fixed region is chosen with small objects in mind, so its disadvantages should become clearer when larger objects need more forgiving offsets.

The result does not prove that every possible fixed margin would perform equally poorly. The experiment evaluates the stated fixed setting against the learned alternative. Its broader importance lies in supporting the proposed solution to the competing demands of small-object separation and large-object tolerance.

#### Moving the attraction center helps

Another comparison replaces the geometric centroid with the mean of the instance’s learned embeddings. The authors test this choice with both scalar and axis-specific bandwidths. In each case, the learnable attraction center produces a higher AP score, and the discussion describes improvement across categories.

This supports the idea that a useful grouping center need not be tied to the object’s average image coordinate. The network can organize its displaced pixels around a location better suited to the mask objective. The center is part of the representation’s internal geometry, so giving it freedom can help even when the desired image mask stays unchanged.

The paper’s discussion does not attach a recoverable numerical score to every setting in this comparison. The supported account is therefore directional: the learned center is better in the reported tests, under the same ground-truth-assisted evaluation framework. Assigning an effect size would go beyond the stated evidence.

#### Elliptical regions help elongated instances

The scalar-bandwidth comparison tests whether a circular tolerance is sufficient. With separate horizontal and vertical bandwidths, the threshold region can stretch along one axis while remaining narrow along the other.

The reported outcome favors the elliptical form. This is consistent with the motivation that a circular region can be constrained by the shorter dimension of an elongated instance. Axis-specific widths allow more freedom without requiring the same expansion in every direction.

Again, the result concerns a region in embedding space. It does not mean that pedestrian masks are approximated by ellipses. The flexible region changes how accurately the pixels must converge after their learned offsets. The final visible outline still follows the set of accepted original pixels.

#### Learned width tracks object size

The authors plot learned margin against object size and report a positive association. Larger objects tend to receive larger margins, in line with the method’s motivation. This analysis matters because the bandwidth output has no direct target specifying the correct width for an object.

The pattern indicates that mask-based training discovers a scale-related behavior by itself. It supports the interpretation that the network uses bandwidth to relax grouping where a broader region is helpful.

The plot is evidence of association rather than a complete causal explanation. Object size need not be the only factor affecting the learned width, and the analysis does not establish a fixed rule mapping size to bandwidth. It shows that the learned quantity behaves in a way consistent with the proposed mechanism.

Taken together, the ablations favor adaptive width, a flexible attraction center, and axis-specific tolerance. They give the loss design a more convincing basis than the final benchmark score alone. They do not independently measure every implementation choice, such as the crop curriculum, seed architecture, or contribution of the smoothness term.

### Limitations

#### Limits the authors explicitly identify

The authors emphasize uneven category representation in the fine training set. Trucks, buses, and trains occur much less often than some other classes, which they expect to hurt performance on those categories. This limits how an overall score should be read: the system’s strengths on common people and vehicle categories coexist with data scarcity elsewhere.

They also warn against treating comparisons across training resources as equivalent. A competitor trained with coarse annotations or COCO has access to information unavailable to the proposed fine-only system. Category-level comparisons can still be informative, but they do not create an equal-data experiment.

The fixed-margin problem is itself an explicit limitation of the alternative the authors investigate. A width selected to separate small instances can be restrictive for large ones. The adaptive method addresses that conflict, but the paper’s explanation should not be mistaken for proof that all fixed-threshold grouping methods must fail. Its direct evidence is tied to the chosen formulation and setting.

The timing results are presented as approximate. The paper gives a useful execution profile, including clustering, but its reported frame rate is a measurement for the evaluated implementation. The authors’ real-time claim belongs with that context.

#### Limits visible in the experimental scope

The empirical study centers on Cityscapes. It demonstrates behavior in urban scenes with the task’s semantic categories and annotation structure. There is no cross-dataset experiment establishing that the same design, settings, or accuracy–speed balance transfers unchanged to other kinds of images.

That matters because the motivation mentions several application areas. Evidence on road scenes supports the autonomous-driving motivation more directly than the broader references to photo editing or robotics. The paper does not evaluate those other uses. High-resolution masks are a relevant capability, but usefulness in an application also depends on the errors that application can tolerate.

The architecture is another boundary. The method is paired with ERFNet to achieve fast dense prediction. The paper does not isolate how the loss behaves across a broad collection of network designs. It is reasonable to distinguish the conceptual contribution from the chosen backbone, but the measured speed and accuracy belong to their combination.

Training also includes several consequential implementation decisions: object-centered crops, later larger crops, fixed batch normalization statistics during fine-tuning, and a specific optimization schedule. These are documented, which helps interpretation. They are not all independently ablated, so the complete result cannot be attributed to the loss formulation alone.

#### A learned membership score is not a calibration result

The Gaussian output is used as a probability-like membership score. Its numerical behavior is defined by distance and bandwidth, and the system thresholds it to recover masks. The paper does not evaluate whether a given score corresponds to a matching empirical frequency of correct assignments.

This distinction is relevant to confidence-sensitive applications. A score that works well for ranking seeds or thresholding clusters need not be a calibrated estimate of correctness. The paper establishes usefulness for segmentation, instead of a general uncertainty guarantee.

The relationship to earlier uncertainty work is therefore conceptual. Learned tolerance can relax an otherwise rigid objective, and here that tolerance is used during inference. The experiments do not turn the bandwidth into a comprehensive account of uncertainty caused by ambiguous images, scarce data, or unfamiliar scenes.

#### The full system still depends on successful seeds

The ground-truth-assisted ablations deliberately remove some difficulties of object discovery. They show what the grouping mechanism can do when localization and category information are supplied. Ordinary inference must recover that information from the seed maps.

A bad seed can provide a poor center, and the accompanying local bandwidth must be suitable for the intended object. The smoothness term addresses one part of this dependency by aligning local width predictions with the object average. The paper does not provide a separate controlled measurement of how much that term improves complete-system behavior.

Sequential clustering also means that grouping decisions affect later opportunities to select seeds. The paper describes a straightforward procedure and reports its speed, but it does not establish that the selected order is always optimal or characterize every failure arising from it. The test score measures the practical aggregate outcome without fully decomposing those errors.

#### The Gaussian geometry has a specific form

The circular and elliptical variants provide useful flexibility, but they remain structured distance rules. The elliptical version gives separate scales to the horizontal and vertical directions. The paper does not investigate arbitrary acceptance shapes or demonstrate that its chosen geometry is optimal for every instance arrangement.

This should not be confused with a restriction to simple visible masks. Complex image outlines remain possible because the network transforms pixels before grouping them. The limitation concerns the form of the acceptance rule in embedding space and the burden placed on learned offsets to make that rule useful.

The coordinate normalization and bounded offsets also define the operating geometry. They are appropriate to the reported image dimensions and constrain how far a pixel can point. The paper documents these choices but does not test their consequences over a range of image formats or object scales beyond the benchmark setup.

#### The evidence supports a joint accuracy–speed claim

The proposed method does not lead the fine-only comparison on overall AP. PANet has the higher score. Its contribution is a stronger combination of accuracy, dense masks, and reported execution speed than the alternatives emphasized by the authors.

Similarly, the approximate timing comparison should not be read as a fully controlled hardware study. The paper supplies benchmark rates and an internal timing breakdown, instead of a comprehensive investigation of implementation efficiency across all competitors under identical conditions. The useful conclusion is that this implementation reaches the stated operating point.

The qualitative claim about finding objects missing from annotations has a similar boundary. Visual examples can make that possibility credible, but no quantified annotation audit is reported. Extra detections should not automatically be counted as evidence of superior accuracy.

These limits leave the main result intact. The paper demonstrates that learning the geometry of pixel assignment together with an object-specific acceptance width is effective in its evaluated setting. It does not establish universal superiority, calibrated uncertainty, or performance guarantees outside that setting.

### What came after

No later citing studies are identified here, so a documented sequence of follow-up systems cannot be established. It would be unjustified to attribute later architectural changes, benchmark gains, or applications to this paper without evidence connecting them.

The contribution nevertheless leaves a clear question for subsequent research: when a system groups learned representations, how much of the grouping rule should also be learned? This paper answers a specific version of that question by making bandwidth part of mask optimization and then using that bandwidth during inference.

Several possible extensions follow from the paper’s own unresolved boundaries. Adaptive grouping could be examined beyond Cityscapes, the loss could be compared across dense prediction architectures, and seed selection could be studied separately from mask recovery. More detailed controlled tests could also isolate the smoothness term and the training crop schedule. These are research directions suggested by the evidence, not reports of completed later work.

The lasting methodological point is the connection between representation and decision. Pixel offsets, acceptance widths, and representative selection are designed around the same desired object mask. The paper’s experiments show why that coordination can matter more than demanding exact intermediate predictions, while its evaluation keeps the distinction between component quality and complete-system performance visible.

## Cite

Cite as Davy Neven, Bert De Brabandere, Marc Proesmans and Luc Van Gool. 2019. Instance Segmentation by Jointly Optimizing Spatial Embeddings and Clustering Bandwidth. IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1109/cvpr.2019.00904](https://doi.org/10.1109/cvpr.2019.00904) · [arXiv 1906.11109](https://arxiv.org/abs/1906.11109)

```bibtex
@inproceedings{neven2019instance,
  title = {{Instance Segmentation by Jointly Optimizing Spatial Embeddings and Clustering Bandwidth}},
  author = {Davy Neven, Bert {De Brabandere}, Marc Proesmans and Luc {Van Gool}},
  booktitle = {IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings},
  year = {2019},
  doi = {10.1109/cvpr.2019.00904},
  eprint = {1906.11109},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/cvpr.2019.00904}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
