Learning to perceive objects by prediction
Abstract
The representation of objects is the building block of higher-level concepts.
Infants develop the notion of objects without supervision.
The prediction error of future sensory input is likely the major teaching signal for infants.
Inspired by this, we propose a new framework to extract object-centric representation from single 2D images by learning to predict future scenes in the presence of moving objects.
We treat objects as latent causes of which the function for an agent is to facilitate efﬁcient prediction of the coherent motion of their parts in visual input.
Distinct from previous object-centric models, our model learns to explicitly infer objects’ locations in a 3D environment in addition to segmenting objects.
Further, the network learns a latent code space where objects with the same geometric shape and texture/color frequently group together.
The model requires no supervision or pre-training of any part of the network.
We created a new synthetic dataset with more complex textures on objects and background and found several previous models not based on predictive learning overly rely on clustering colors and lose speciﬁcity in object segmentation.
Our work demonstrates a new approach for learning symbolic representation grounded in sensation and action.
Introduction
Visual scenes are composed of various objects in front of backgrounds.
Discovering objects from 2D images and inferring their 3D locations is crucial for planning actions in robotics (Devin et al., 2018; Wang et al., 2019) and this can potentially provide better abstraction of the environment for reinforcement learning (RL), e g. Veerapaneni et al.
The appearance and spatial arrangement of objects, together with the lighting and the viewing angle, determine the 2D images formed on the retina or a camera.
Therefore, objects are latent causes of 2D images, and discovering object is a process of inferring latent causes (Kersten et al., 2004).
The predominant approach in computer vision for identifying and localizing objects rely on supervised learning to infer bounding boxes (Ren et al., 2015;
Redmon et al., 2016) or pixel-level segmentation of objects (Chen et al., 2017).
However, the supervised approach requires expensive human labeling.
It is also difﬁcult to label every possible category of objects.
Therefore, an increasing interest has developed recently to build unsupervised or self-supervised models to infer objects from images, such as MONet (Burgess et al., 2019), IODINE (Greff et al., 2019) slot-attention (Locatello et al., 2020), GENESIS (Engelcke et al., 2019, 2021), C-SWM (Kipf et al., 2019) and mulMON (Nanbo et al., 2020).
Our work also focuses on the same unsupervised object-centric representation learning (OCRL) problem, but offers a new learning objective and architecture to overcome the limitation of existing works in segmenting more complex scenes and explicitly represents objects’ 3D locations.
The majority of the existing OCRL works are demonstrated on relatively simple scenes with objects of pure colors and background lacking complex textures.
As recently pointed out, the success of several recent models based on a variational auto-encoder (VAE) architecture (Kingma & Welling, 2013; Rezende et al., 2014) depends on a reconstruction bottleneck that needs to be intricately balanced (Engelcke et al., 2020).
To evaluate how such models perform on scenes with more complex surface textures, we created a new dataset of indoor scenes with diverse texture patterns on the objects and background.
We found that several existing unsupervised OCRL models overly rely on clustering pixels based on their colors.
A challenge in our dataset and in real-world perception is that sharp boundaries between different colors exist both at contours of objects and within the surface of the same object.
A model essentially has to implicitly learn a prior knowledge of which types of boundaries are more likely to be real object contours.
The reconstruction loss in existing works appears to be insufﬁcient for learning this prior.
To tackle this challenge, we draw our inspiration from development psychology and neuroscience.
Infants understand the concept of object as early as 8 months, before they can associate objects with names (Piaget & Cook, 1952; Flavell, 1963).
The fact that infants are surprised when object are hidden indicates that they have already learned to segment discrete objects from the scene and that their brains constantly make prediction and check for deviation from expected outcome.
As the brain lacks direct external supervision for object segmentation, the most likely learning signal is from the error of this prediction.
In the brain, a copy of the motor command (efference copy) is sent from the motor cortex simultaneously to the sensory cortex, which is hypothesized to facilitate prediction of changes in sensory input due to self-generated motion (Feinberg, 1978).
What remains to be predicted are changes in visual input due to the motion of external objects.
Therefore, we hypothesize that one functional purpose of grouping pixels into object is to allow the prediction of the motion of the constituting pixels in a coherent way by tracking very few parameters (e.g., the location, pose, and speed of an object).
Driven by this hypothesis, our contribution in this paper is: (1) we combine predictive learning and explicitly 3D motion prediction to learn 3D aware object-centric representation; (2) we found several previous models overly rely on clustering colors to segment objects; (3) although our model leverages image prediction as learning objective, the architecture generalize the ability of object segmentation and spatial localization to single-frame images.
Method 2.1 Problem formulation and Network architecture
We consider each scene to have k distinct objects and a background.
At any moment t , based on an object’s 3D location and pose relative to the observer (camera), a 2D image is rendered on the camera.
Our goal is to train a neural network f obj that infers properties of objects given only a single image
I ( t ) as the sole input without external supervision.
The network would sequentially output a set of view-invariant vectors representing the identity of each object and a vector for each pixel denoting its probability of belonging to any of the K objects or the background which acts as our segmentation mask.
Alongside, the network estimates the location and a vector describing the probabilistic distribution of each object’s pose (yaw) relative to the observer.
Our hypothesis is that the notion of object emerges to meet the need of efﬁciently predicting the future fates of all parts of an object.
With the (to be learned) ability to infer an object’s pose and location from each frame, the object’s speed of translation and rotation can be estimated from consecutive frames.
We can further predict optical ﬂow of each pixel based on object’s speed, inferred depth, and pixel position relative to the object’s center.
The pixel-segmentation of an object essentially prescribes which pixels should move together with the object.
With the predicted optical ﬂow, one can further predict part of the next image by warping the current image.
The parts of the next image unpredictable by warping include surfaces of objects or the background that are currently occluded but will become visible, and the region of a scene newly entering the view due to self- or object-motion.
These portions can only be predicted based on the learned statistics of the appearance of objects and background, which we call "imagination".
We show that with the information of self-motion, knowledge of geometry (rule of rigid-body motion) and the assumption of smooth object movement (speed and rotation does not change in the next frame), the object representations captured by function f obj and depth perception can be learned without supervision.
We name our model Object Perception by Predictive LEarning (OPPLE) network.
Our model hasnetworks as displayed in Figure 1.
Depth Perception Network is a standard U-Net for predicting the depth for each input image.
Object Extraction Network is a modiﬁed U-Net, in which the output of the encoder is repeatedly read by an LSTM to predict object location and pose distribution as well as a view-invariant object representation code.
This view invariant representation is then decoded to generate a probabilistic mask over each image.
Object-based Imagination network is also a modiﬁed U-Net which takes an image and its estimated depth weighted by the mask output of the
Object Extraction Network as input along with the observer’s and object’s motions to predict
the
RGB values and depth for the regions that were occluded by an object before but should be visible to the observer after the observer and objects’ motion from time t to t
+ 1 .
Please note that imagination here does not indicate creating appearance entirely from scratch but predicting occluded parts based on visible parts.
More detailed formulation and the pseudocode of the algorithm is provided in the appendix.
To train these three networks jointly, we optimize the loss function between the RGB values of the predicted and actual image for time point t + 1 , with the predicted image produced by warping the image at time t based on the predicted optical ﬂow and the imagined image in the occluded regions.
We also calculate loss between the inferred depth by the depth prediction network and the predicted depth by the same warping approach for the image in log scale.
Additional spatial regularization includes the distance between the predicted and inferred object location and the KL divergence between the predicted and inferred pose for objects.
More details for the loss function and network architecture are provided in the appendix.
[Figure]
[Figure]
segmentation MONet
[Figure] Slot-attention- [Figure]
Our model (OPPLE)
Results
After training the networks, we evaluate them on 4000 test images from the same distribution.
We compare different models mainly on their segmentation performance.
Additionally, we demonstrate the ability unique to our model: inferring locations of objects in 3D space and the depth of the scene.
3.1 Object segmentation comparison
Following prior works (Greff et al., 2019; Engelcke et al., 2019, 2021), we evaluated segmentation with the Adjusted Rand Index of foreground objects (ARI-fg).
In addition, for each image, we matched ground-true objects and background with each of the segmented class by ranking their
Intersection over Union (IoU) and quantiﬁed the average IoU over all foreground objects.
[Table]
Our model outperforms most compared models in ARIfg and is only second to a bigger slot-attention network in IoU.
It is shown qualitatively in Figure 2 and quantitatively in Table 3.1, MONet and GENESIS appear to heavily rely on color to group pixels into the same masks.
Slot-attention performs well in segmenting objects but still treats patterns of ceiling as additional objects potentially due to bias on clustering colors.
Even though some of these models almost fully designate pixels of an object to a mask, the masks lack speciﬁcity in by including pixels with similar colors from other objects or background.
Patterns on the backgrounds are often treated as objects as well.
The reason of such drawbacks awaits further investigation but we postulate there may be fundamental limitation in the approach that learns purely from static discrete images.
Patches in the background with coherent color offer room to compress information similarly as objects with coherent colors do, and their shapes re-occur across images just as other objects.
This may incentivize the networks to treat them as objects.
Our model is able to learn object-speciﬁc masks because these masks are used to predict optical ﬂow speciﬁc to each object.
A wrong segmentation would generate large prediction error even if the motion of an object is estimated correctly.
Such prediction error forces the masks to be concentrated on object surface.
They emerge ﬁrst at object boundaries where the prediction error is the largest and gradually grow inwards during training.
[Figure]
[-IoU 
-]
[Figure]
OPPLE)
MONetslot-attention-
[Figure]
B
C
E
F
G null distribution observation
[Figure]
GENESIS D
Figure 3A-D further compares the distribution of IoU across models.
Most models have IoU < 0.
for about 1/4 of objects.
Only OPPLE and slot attention show bi-modal distributions while other models’ IoU are more skewed towards 0.
Figure 3G plots each object’s distance and size on the picture with colors corresponding to their IoUs in our model.
Objects with poor segmentation (blue dots) are mostly far away from the camera and occupy few pixels.
This is reasonable because motion of farther objects causes less shift on the images and thus provide weaker teaching signal for the network to attribute their pixels as distinct from the background.
3.2 Object localization
One quantity inferred by the Object Extraction Network is each object’s location relative to the camera, represented as the bearing angle and distance in polar coordinate relative to the camera.
Figure 3E-F plot the true and inferred angles and distance, color coded by objects’ IoUs.
For objects well segmented (red dots), their angles are estimated with high accuracy (concentrated on the diagonal in
E).
Distance estimation is negatively biased for farther objects, potentially because the regularization term on the distance between the predicted and inferred object location at frame t + 1 favors shorter distance when estimation is noisy.
Poorly localized objects are mainly those with poor segmentation (blue dots).
Note that the ability to explicitly infer object’s location is not available in other models compared.
3.3 Meaningful latent code
Because a subset of the latent code (10 dimensions) was used to calculate object matching scores between frames in order to soft-match objects, this should force the object embedding z to be similar for the same objects.
We explored the geometry of the latent code by examining whether the nearest neighbours of each of the object in the test data with IoU > 0.5 are more likely to have the same property as themselves.
772 out of 3244 objects’ nearest neighbour had the same shape (out of 11 shapes) and 660 objects’ nearest neighbour had the same color or texture (out of 15).
These numbers are 28 to 29 times the standard deviation away from the means of the distribution expected if the nearest neighbour were random (Figure 3H).
This suggests the latent code reﬂects meaningful features of objects.
However, texture and shape are not the only factors determining latent code, as we found the variance of code of all objects with the same shape and texture to still be big.
3.4 Performance on depth perception
We demonstrate a few example images and the inferred depth.
Our network can capture the global 3D structure of the scene, although details on object surfaces are still missing.
Because background occurs in every training sample, the network appears to bias the depth estimation on objects towards the depth of the walls behind, as is also shown in the scatter plot.
[Figure]
Discussion
We provide a new approach to learn object-centric representation that includes explicit spatial localization of objects, object segmentation from image, automatic matching the same objects across scenes based on a learned latent code and depth perception as a by-product.
All of the information extracted by our networks are learned without supervision and no pre-training on other tasks is involved.
The only additional information required is that of observer’s self-motion, which is available both in the brain as efference copy and accessible in vehicles (although likely inaccurate).
The work demonstrates that the notion of object can emerge as a necessary common latent cause of the pixels belonging to the object for the purpose of efﬁciently explaining away the pixels’ coherent movement across frames.
This illustrates the possibility of learning rich embodied information of object, one step toward linking neural networks with symbolic representation in general.
We expect future works to develop self-supervised learning models for natural categories beyond simple object identity, building on our work.
Limitation: in our experiment, object spatial location is inferred more easily than object pose (which we have not fully investigated), thus the predicted warping relies more on object translation than rotation.
As almost all existing object-centric representation works, we focus on rigid bodies and simple environment.
Future works need to explore how to learn object representation for deformable objects, objects with more complex shapes and lighting conditions, and more cluttered environment, towards more realistic application.
Potential negative societal impact : as AI agents acquire more abilities that human beings have, including common knowledge of objects, there can be potential risk of misusing the technology for inhumane practice.
The current capability of the model is still far from that stage but caution needs to be taken to regulate the usage of future development based on our work.
A Appendix A.1 Pseudo code of the OPPLE framework
Initialize: Network parameters θ
Require: images I ( t − 1) , I ( t )
∈
R w × h × 3 , self-motion v ( t − 1) obs , ω ( t − 1) obs , v ( t ) obs , ω ( t ) obs
Ensure: prediction I (cid:48) ( t +1) , segmentation π ( t − 1) 1: K +1 , π ( t ) 1: K +1 , objects’ codes z ( t − 1) 1: K , z ( t ) 1: K , objects’ locations and poses ˆ x ( t − 1) 1: K , p ( t − 1) φ 1: K , ˆ x ( t ) 1: K , p ( t ) φ 1: K for τ = { t − 1 , t } do scene code e ( τ ) ← U-NetEncoder f θ ( I ( τ ) )
object code z ( τ ) 1: K , location ˆ x ( τ ) 1: K , pose p ( τ ) φ 1: K ← LSTM f θ ( e ( τ ) ) background code
z K +1 =depth D ( τ ) ← h
θ ( I ( τ ) ) segmentation mask π
( τ ) 1: K +1 ← Softmax (U-NetDecoder
f θ ( I ( τ ) , z ( τ ) 1: K ) , 0) end for object matching scores r kl ← RBF ( z ( t ) k , z ( t − 1) l ) , k, l ∈ 1 : K +for k ← 1 to K do object motion ˆ v 1: K , ω 1: K ← r k,l , ˆ x ( t ) k , ˆ x ( t − 1) l , p ( t ) φ k , p ( t − 1) φ l , l = 1 : K +onject-speciﬁc optical ﬂow k ← ˆ v 1: K , ω 1: K , v obs , ω obs , D ( t ) end for
I (cid:48)
( t +1) warp ← Warp ( I ( t ) , optical ﬂow 1: K +1 )
I
[Table]
ﬁnal image prediction: I (cid:48)
( t +1) ← I (cid:48)
( t +1) warp , I (cid:48)
( t +1) imagine , warping weights update parameters: θ ← θ − γ ∇ θ [ | I (cid:48)
( t +1) − I ( t +1) | 2 + regularization loss ]
A.2 Problem formulation
We denote a scene as a set of distinct objects and a background S =
{ O 1 , O 2 , . . .
, O K , B } , where K is the number of objects in scene.
At any moment t , we denote two state variables, the location and pose of each object relative to the perspective of an observer (camera), as x ( t ) 1: K and φ ( t ) 1: K , where x ( t ) k is the 3-d coordinate of the k -th object and φ ( t ) k is its yaw angle from a canonical pose, as viewed from the reference frame of the camera (for simplicity, we do not consider pitch and roll and leave the generalization to 3D pose to future works).
At time t , given the location of the camera o ( t ) ∈ Rand its facing direction α ( t ) , S renders a 2D image on the camera as I ( t ) ∈
R w × h × 3 , where w × h is the size of the image.
Our goal is to train a neural network that infers properties of objects given only a single image
I ( t ) as the sole input without external supervision:
[Equation]
Here, z ( t ) 1: K is a set of view-invariant vectors representing the identity of each object k .
“Viewinvariant” is loosely deﬁned as | z ( t )
k − z
( t +∆ t ) k | < | z ( t )
k − z ( t ) l | for k (cid:54) =
l and ∆ t > 0 in most cases, i.e., the vector codes are more similar for the same object across views than they are different across objects.
π ( t ) 1: K +1 ∈ R ( K +1) × w × h are the probabilities that each pixel belongs to any of the objects or the background ( (cid:80)
k
π kij = 1 for any pixel at i, j ), which achieve object segmentation.
To localize objects, ˆ x ( t ) 1: K are the estimated locations of each object relative to the observer and p ( t ) φ 1: K are the estimated probability distributions of the poses of each object.
Each p ( t ) φ k ∈ R b is a probability distribution over b equally-spaced bins of yaw angles in (0 , 2 π ) .
A.3 Network architecture
The ﬂow of information in networks is displayed in Figure 1.
Object Extraction Network.
We build the Object Extraction Network f θ obj by modiﬁcation of a
U-Net (Ronneberger et al., 2015).
A basic U-Net is composed of a convolutional encoder and a transposed convolutional decoder, while each encoder layer sends a skip connection to the corresponding decoder layer, so that both global and local information can be combined in the decoder.
Inside our f θ obj , an image I ( t +1)
ﬁrst passes through the encoder.
Additional Atrous spatial pyramid pooling layer (Chen et al., 2017) is inserted between the middle two convolutional layers of the encoder to expand the receptive ﬁeld.
The top layer of the encoder outputs a feature vector e t capturing the global information of the scene.
An LSTM further repeatedly reads in e ( t ) and sequentially outputs one vector for an object at a time.
Each vector is then mapped through a one-layer fully connected network to predict object code z ( t ) k , object location ˆ x ( t ) k and object pose probability p φ ( t ) k , k = 1 , 2 , · · · , K .
The location prediction is represented by polar angle and distance from the object and both are restricted to the range of possible value within the virtual environment by passing a scalar prediction through a logistic function and scaled and shifted to the corresponding ranges.
The probability p φ ( t ) k of the pose falling in each bin is represented as log p φ ( t ) k for numerical stability.
Each object code vector z ( t ) k is then independently fed through the decoder with shared skip connections from the encoder.
The decoder outputs one channel for each pixel, representing an un-normalized log likelihood that the pixel belongs to the object k .
The unnormalized logit maps for all objects are concatenated with a map of all zero for the background, and compete through a softmax function pixel-wise to output the probabilistic segmentation map π ( t ) k .
Depth perception network.
We use a standard U-Net for depth perception function h θ depth that processes images I ( t ) and output a single-channel depth map D ( t ) .
Object-based imagination network.
We build the imagination network g θ imag also with a modiﬁed
U-Net.
The input is concatenated image I ( t ) and log of depth log ( D ( t ) ) inferred by the depth perception network, both multiplied pixel-wise by one probabilistic mask π ( t ) k corresponding to each inferred object and the background.
The output of the encoder network is concatenated with a vector composed of the observer’s moving velocity v ( t ) obs and rotational speed ω ( t ) obs , and the estimated object location ˆ x ( t ) k , velocity ˆ v ( t ) k and rotational speed ˆ ω ( t ) k inferred by the Object Extraction Netowrk, before entering the decoder.
The decoder outputs ﬁve channels for each pixel: three for predicting the RGB colors, one for depth and one for the probability of the pixel belonging to any object k or background and is used to weight the predicted color and depth for the ﬁnal "imagination".
A.4 Learning object representation by predicting the future A.4.1 Prediction by warping
We ﬁrst describe the prediction of part of the next image by warping the current image.
Here we consider only rigid objects and the fates of all visible pixel belonging to an object.
With depth D ( t ) ∈ R w × h
= h θ
( I ( t ) ) of all pixel in a view inferred by the Depth Perception network based on visual features in the image I ( t ) , the 3D location of a pixel at any coordinate ( i, j ) in the image, where | i | ≤ w − 1 2 , | j | ≤ h − 12 , can be determined given the focal length d of the camera (in the unit of pixel size) as ˆ m ( t ) ( i,j ) =
D ( t ) ( i,j ) √ i 2 + j 2 + d 2 · [ i, d, j ] .
Here, we take the coordinate of the center of an image as (0,0).
On the other hand, with ˆ x ( t ) k and ˆ x ( t − 1) k , the current and previous locations of the object k that the pixel ( i, j ) belongs to that are inferred from I ( t ) and
I ( t − 1) respectively, we can estimate the instantaneous velocity of the object ˆ v ( t ) k
= ˆ x ( t ) k − ˆ x ( t − 1) k
(after correcting for camera motion).
Similarly, with the inferred the current and previous pose probabilities of the object, p ( t ) φ k and p ( t − 1) φ k , we can obtain the likelihood of its angular velocity p ( φ ( t ) k , φ ( t − 1) k | ω ( t ) k
=
[Equation]
∝
[Equation] [Equation]
[Equation] [Equation]
[Equation] [Equation]
= γ 2 ) .
By additionally imposing a prior distribution (we use Von Mises distribution) over ω ( t ) k that favors slow rotation, we can obtain the posterior distribution of the object’s angular velocity p ( ω ( t ) k | φ ( t ) k , φ ( t − 1) k ) , and eventually the posterior distribution of the object’s next pose p ( φ ( t +1) k | φ ( t ) k , φ ( t − 1) k ) .
Assuming a pixel ( i, j ) belongs to object k , using the estimated motion information ˆ v ( t ) k and p ( ω ( t ) k | φ ( t ) k , φ ( t − 1) k ) of the object, together with the current location and pose of the object and the current 3D location ˆ m ( t ) ( i,j ) of the pixel, we can predict the 3D location m (cid:48)
( t +1) k, ( i,j ) of the pixel at the next moment as m (cid:48)
( t +1) k, ( i,j ) =
M ( t ) −
ω obs
[ M ( t )
ˆ ω k
( ˆ m ( t ) ( i,j ) − ˆ x ( t ) k )
+ ˆ x ( t ) k
+ ˆ v ( t ) k − v ( t ) obs ] , where M ( t ) − ω obs and M ( t )
ˆ ω k are rotational matrices due to the rotation of the observer and the object, respectively, and v ( t ) obs is the velocity of the observer (relative to its own reference frame at t ).
In this way, assuming objects move smoothly most of the time, if the self motion information is known, the 3D location of each visible pixel can be predicted.
If a pixel belongs to the background, ω K +1 = 0 and v K +
=
( K + 1 is the background’s index).
Given the predicted 3D location, the target coordinate ( i (cid:48) , j (cid:48) )
( t +1) k of the pixel on the image and its new depth D (cid:48) k
( i, j ) ( t +1) can be calculated.
This prediction of pixel movement allows predicting the image I (cid:48) ( t +1) and depth D (cid:48) ( t +1) by weighting the colors and depth of pixels predicted to land near each pixel on the discrete grid of the next frame, as explained below.
Because the object attribution of each pixel is not known but is inferred by f obj ( I ( t ) ) , it is represented for every pixel as a probability of belonging to each object and the background π ( t ) k , k = 1 , 2 , · · · , K + 1 .
Therefore, the predicted motion of each pixel should be described as a probability distribution over K + 1 discrete target locations p ( x (cid:48)
( t +1)
( i,j ) )
= (cid:80) K
+1 k
=1 π ( t ) kij · δ ( x (cid:48) ( t +1) k, ( i,j ) ) , i.e., pixel ( i, j ) has a probability of π ( t ) kij to move to location x (cid:48)
( t +1) k, ( i,j ) at the next time point, for k = 1 , 2 , · · · , K + 1 .
With such probabilistic prediction of pixel movement for all visible pixel ( i, j ) ( t ) , we can partially predict the colors of the next image at the pixel grids where some original pixels from the current view will land nearby by weighting their contribution:
[Equation] [Equation]
otherwise (2)
We deﬁne the weight of the contribution from any source pixel ( i, j ) to a target pixel ( p, q ) as w
[Equation]
The ﬁrst term incorporates the uncertainty of which object a pixel belongs to.
The second term e − β · D (cid:48) ( t +1) k
( i,j ) resolves the issue of occlusion when multiple pixels are predicted to move close to the same pixel grid by down-weighting the pixels predicted to land farther from the camera.
This last two terms mean that only the source pixels predicted to land within a square of of 2 × 2 pixels centered at any target location ( p, q ) will contribute to the color I (cid:48) ( t +1) Warp ( p, q ) .
The depth map D (cid:48) ( t +1)
Warp can be predicted by the same weighting scheme after replacing I ( t ) ( i, j ) with each predicted depth
D (cid:48)
( t +1) k
( i, j ) assuming the pixel belongs to object k .
A.4.2 Imagination
For the regions not fully predictable by warping current image with equation (2), i.e., for ( p, q ) where (cid:80) k,i,j w k ( i, j, p, q ) < 1 , we learn a function g that “imagines” the appearance I (cid:48)
( t +1)
k
Imag ∈ R w × h ×and the pixel-wise depth D (cid:48) ( t +1)
k
Imag ∈ R w × h of the object or background k in the next frame, and the predicted probabilities that each pixel in the next frame belongs to each object or the background π (cid:48)
( t +1)
k
Imag ∈ R w × h .
The function takes as input portion of the current image corresponding to each object I ( t ) (cid:12) π ( t ) k and the inferred depth D ( t ) (cid:12) π ( t ) k , both extracted by element-wise multiplying with the probabilistic segmentation mask π ( t ) k , the information of the camera’s self motion, and the location and motion of that object:
[Equation]
obs )
[Equation] [Equation]
The “imagination” speciﬁc for each object and the background can then be merged using the weights prescribed by π (cid:48)
( t +1) 1: K Imag : I (cid:48) ( t +1)
Imag = (cid:80) k
I (cid:48)
( t +1)
k
Imag (cid:12) π (cid:48) ( t +1) k
Imag , and D (cid:48) ( t +1)
Imag = (cid:80) k D (cid:48)
( t +1)
k
Imag (cid:12) π (cid:48) ( t +1) k
Imag .
A.4.3 Combining warping and imagination
The ﬁnal predicted image or depth map are weighted average of the prediction made by warping the current image or predicted depth map and the corresponding predictions by imagination:
[Equation]
Here, W Warp ∈ R w × h with each element W Warp ( p, q ) = max { (cid:80) k,i,j w ( i, j, p, q ) , 1 } .
The intuition is that imagination is only needed when there is not sufﬁcient contribution for predicting a pixel by warping.
The same weighting applies for generating the ﬁnal predicted depth D (cid:48)
( t +1) .
In addition to the image, the states of the objects can also be predicted.
The location of object k at t + 1 can be predicted as x (cid:48)
( t +1) k
= M
[Equation]
ˆ x
[Equation]
t ) k
+ ˆ v
[Equation]
) k − v ( t ) obs ) .
Its new pose probability can be predicted by p (cid:48)
( t +1) ( φ
[Equation]
=
[Equation]
p
[Equation]
) for
[Equation]
2 equal to each ﬁxed yaw angle bin.
To obtain p (cid:48) ( t +1) ( φ k ) instead of p (cid:48) ( t +1)
( φ k + ω obs ) at the same set of bins, the vector p (cid:48)
( t +1) ( φ k + ω obs ) can be shifted by multiplication with a pre-computed matrix composed of a bank of shifted Von Mises distributions to “move” the probability mess on the angle bins.
There is one important issue of object-centric representation when making prediction for future images: in order to predict the spatial state of each object at t +1 based on the views at t and t − 1 , the network needs to match the representation of an object at t from the representation of the same object at t − 1 .
As the dimensions of features (e.g., shape, surface texture, size, etc.) grows, the number of possible objects grows exponentially.
Therefore, we cannot simply match object representations based on the order by which an LSTM extracts objects, as this requires learning a consistent order over enormous amount of objects.
Instead, we take a soft-matching approach: we take a subset of the features in z ( t ) k extracted by f as an identity code for each object.
For object k at time t , we calculate the distance between its identity code and those of all objects and the background at t − 1 , and pass the distances through a radial basis function to serve as a matching score r kl indicating how closely the object k matches each of the previous objects.
The scores are used to weight all the estimated translational and rotational speeds for object k each assuming a different object l were the true object k at t − 1 .
We additionally set the identity code of the background to be z K +1 = 0 , and its predicted motion to be zero.
A.4.4 Learning objective
Above, we have explained how the next image input I (cid:48)
( t +1) , the depth map D (cid:48)
( t +1) and the spatial states of each object, x (cid:48) ( t +1) k and p (cid:48) ( t +1)
φ k can be predicted based on object-centric representation extracted by a function f from the current and previous images I ( t ) i and I ( t − 1)
i , the depth D (cid:48) ( t ) extracted by a function h , combined with the prediction from object-based imagination function g that are all to be learned.
Among the three prediction targets, only the ground truth of visual input
I ( t +1) is available, while the other can only be inferred by f and h from I ( t +1) .
Therefore, for the prediction targets other than I ( t +1) , we use the self-consistent loss between the predicted value based on t and t − 1 and the inferred value based on t + 1 as additional regularization terms to constrain the functions f and g .
To learn the functions f , g and h , we approximate them with deep neural networks with parameters θ and optimize θ to minimize the following loss function:
[Equation]
Here,
L image =
[Equation]
, I
[Equation]
t
[Equation]
1 ) is the image prediction error.
[Equation]
MSE
[Equation]
log
[Equation]
t +1) ) , log( ˆ D ( t +1) )) is the error between the predicted and inferred depth.
L spatial =
[Equation]
) is the self-consistent loss on spatial information prediction.
The ﬁrst term is the error between inferred and predicted location of each object, while the calculation of the predicted location incorporates soft matching between objects in consecutive frames.
The second term is the negative term of contrastive loss, which prevents the network from reaching a local minimum where all objects are inferred at the same location relative to the camera.
The third term penalizes the discrepancy between the inferred object location and the average location of pixels in its segmentation mask.
The last term is the KL-divergence between the predicted and inferred pose for each object at t + 1 .
L map =
ReLu (10 − 4 − π 1:K ) + π k · π l , for k (cid:54) =
l avoids loss of gradient when some pixels are assigned zero probability to some objects and discourages overlap between maps of different objects.
A.5 Training details
For training we used mini-batches of 24 triplets and trained the networks over the dataset forepochs.
For testing we used 4000 images.
We trained our algorithm on one Nvidia RTX with 24GB VRAM.
We selected learning rate of 3e-4 and regularization parameters λ spatial = 1 . 0 , λ depth = 0 .
1 and L map = 0 .
005 after incremental iteration over a small set of values in log scale.
A.6 Dataset details
We procedurally generated dataset composed of 306445 triplets of images captured by a virtual camera with ﬁeld of view of 90 degrees in a square room, using the software Unity.
The camera translates horizontally and pans with random small steps between consecutive frames to facilitate the learning of depth perception.
3 objects with random shape, size, surface color or textures are spawned at random locations in the room and each move with a randomly selected constant velocity and panning speed.
The translation and panning of the the camera is known to the networks.
No other ground truth information is provided.
The ﬁrst two frames serve as data and the last frame serve as the prediction target at t
+ 1 .
An important difference between this dataset and other commonly used synthetic datasets for OCRL is that more complex and diverse textures are used on both the objects and the background.
A.7 Object segmentaiton comparison setup
To compare our work with the states-of-art models of unsupervised object-centric representation learning, we trained MONet (Burgess et al., 2019), slot-attention (Locatello et al., 2020) and GENESIS(Engelcke et al., 2021) on the same dataset.
To address the concern that the original conﬁgurations of the models are not optimized for more difﬁcult dataset, we trained variants of some of the models with large network size.
For MONet, we tested channel numbers of [32, 64, 128, 128] (MONet-128) and [32, 64, 128, 256, 256] (MONet-128-bigger) for the hidden layers of encoder of the component
VAE in addition to [32, 32, 64, 64] of the original paper and adjusted decoder layers sizes accordingly, and increased the base channel from 64 to 128 for the attention network.
For slot attention, we tested both the original conﬁguration and a variant which increased the number of features in the attention component from 64 to 128 (slot-attention-128).
Slot numbers were chosen as 4 except for GENESIS.
We adapted the following implementations of other models in our comparison:
MONET: https://github.com/stelzner/monet 2.
Genesis: https://github.com/applied-ai-lab/genesis 3.
Slot Attention: https://github.com/evelinehong/slot-attention-pytorch/