Reprojection R-CNN: A Fast and Accurate Object Detector for 360° Images
Pengyu Zhao Ansheng You Yuanxing Zhang Jiaying Liu Kaigui Bian Yunhai Tong
cs.CV

 





Reprojection R-CNN: A Fast and Accurate Object Detector for 360^∘ Images
    Pengyu Zhao

Peking University

pengyuzhao@pku.edu.cn 





Ansheng You

Peking University

youansheng@pku.edu.cn 
Yuanxing Zhang

Peking University

longo@pku.edu.cn 
Jiaying Liu

Peking University

liujiaying@pku.edu.cn 
Kaigui Bian

Peking University

bkg@pku.edu.cn 
Yunhai Tong

Peking University

yhtong@pku.edu.cn 

    Received: date / Accepted: date
======================================================================================================================================================================================================================================================================================================================================










360^∘ images are usually represented in either equirectangular projection (ERP) or multiple perspective projections.


Different from the flat 2D images, the detection task is challenging for 360^∘ images due to the distortion of ERP and the inefficiency of perspective projections.
However, existing methods mostly focus on one of the above representations instead of both, leading to limited detection performance.

Moreover, the lack of appropriate bounding-box annotations as well as the annotated datasets further increases the difficulties of the detection task.
In this paper, we present a standard object detection framework for 360^∘ images.
Specifically, we adapt the terminologies of the traditional object detection task to the omnidirectional scenarios, and propose a novel two-stage object detector, i.e., Reprojection R-CNN by combining both ERP and perspective projection.


Owing to the omnidirectional field-of-view of ERP, Reprojection R-CNN first generates coarse region proposals efficiently by a distortion-aware spherical region proposal network.
Then, it leverages the distortion-free perspective projection and refines the proposed regions by a novel reprojection network.
We construct two novel synthetic datasets for training and evaluation.
Experiments reveal that Reprojection R-CNN outperforms the previous state-of-the-art methods on the mAP metric.
In addition, the proposed detector could run at 178ms per image in the panoramic datasets, which implies its practicability in real-world applications.





§ INTRODUCTION







During the past few years, virtual reality techniques have developed rapidly owing to the development of 360^∘ cameras with omnidirectional vision.
The omnidirectional images and videos provide immersive experiences to users, allowing them to receive more detailed information, thereby improving the quality of experiences <cit.>.
360^∘ cameras also play important roles in scenarios which require wide-range field-of-view (FoV) such as self-driving systems <cit.> and gaming <cit.>.  

Object detection is a significant computer vision task that deals with detecting semantic objects in images and videos. 
Recent advances based on convolutional neural network (CNN) <cit.> have achieved remarkable improvements in 2D images.


However, object detection in 360^∘ images (spherical images) is still challenging due to two main reasons, as described below and shown in Figure <ref>. 



Dilemma between Distortion Reduction and Efficiency. 
Spherical images are typically represented by equirectangular projection (ERP) <cit.> or multiple perspective projections.
Regarding ERP, the coordinates are proportional to latitude and longitude of points on the sphere.
Thus, due to the uneven spatial resolution, ERP suffers from distortions by various latitudes, especially in the polar regions.
Moreover, an object may locate at the borders of ERP and thus be cut into two separate regions, leading to the misinterpretation of two different objects.
Although variants of novel convolutions <cit.> are proposed to resolve the distortion problem of ERP, it is still difficult to detect and bound objects in ERP images directly. 
Some researchers resort to perspective projection <cit.>, which projects a partial area of the sphere onto a focal plane with little distortion.
However, since we cannot know the exact position of the objects in advance, we need to propose a large number of candidate areas to cover all the objects on the sphere, which is very time-consuming.






Lack of Appropriate Annotations. 


Unlike image classification task, additional information is required in object detection task to locate objects, i.e., bounding boxes.

However, the regular bounding boxes <cit.> do not apply to 360^∘ images because the rectangular area in the ERP corresponds to the twisted region on the sphere.
Recent works <cit.> utilize projection-based annotations that represent the bounding box by the latitude/longitude coordinates of the tangent plane with the object, as well as the width and height of the object on the tangent plane. 




However, 

it is difficult to measure the intersection-over-union (IoU) between two bounding boxes on a sphere with different center points under this annotation. 
Besides, due to the lack of appropriate annotations, we do not have appropriately annotated datasets for 360^∘ object detection.





To address the above challenges, we introduce an unbiased annotation technique, i.e., spherical bounding box, for annotating objects in spherical images.



Based on the annotation, we propose a novel two-stage object detector, i.e., Reprojection R-CNN (Rep R-CNN), for reducing distortion and generating fast object detection in 360^∘ images.
In the first stage, Rep R-CNN generates coarse detection proposals efficiently from ERP by a novel region proposal network (RPN), i.e., spherical RPN (SphRPN).






In the second stage, Rep R-CNN utilizes the undistorted perspective projection and introduces reprojection network (RepNet) to identify precise locations of the objects.

In addition, a reprojection region of interest (RoI) pooling layer is applied to coordinate the two stages in Rep R-CNN.


We construct two novel datasets, i.e., VOC360 and COCO-Men, for training and evaluation.
Rep R-CNN outperforms all state-of-the-art methods on both datasets, leading to an improvement over the strongest baseline by at least 30%. 

Moreover, the proposed detector could run at about 178ms per frame on an NVIDIA Tesla V100 GPU, indicating that Rep R-CNN is practical in terms of both efficiency and accuracy. 








In summary, this paper makes the following contributions:

	
  * We introduce Rep R-CNN, a fast and accurate two-stage method for object detection in 360^∘ images, which takes advantage of both omnidirectional ERP and distortion-free perspective projection.
	
  * We adapt the terminologies of conventional object detection task to spherical images, and create two novel synthetic datasets of different scenarios annotated by the proposed spherical bounding box.
	
  * We compare Rep R-CNN with several state-of-the-art methods, and demonstrate improved performance on the object detection task of 360^∘ images.




§ RELATED WORK








CNNs on 360^∘ Vision: 










Recent advances in 360^∘ images 

resort to geometric information on the sphere.


Khasanova et al. <cit.> represent the ERP with a weighted graph, and apply the graph convolutional network to generate graph-based representations. 
Esteves et al. <cit.> propose SO(3) 3D rotation group for retrieval and classification tasks on spherical images.
On top of that, Cohen et al. <cit.> suggest transforming the domain space from Euclidean S2 space to a SO(3) representation to reduce the distortion, and encoding rotation equivariance in the network. 



Meanwhile, some works attempt to solve the distortion in the ERP directly.

Su et al. <cit.> transfer knowledge from a pre-trained CNN on perspective projections to a novel network on ERP. 


Other approaches <cit.>  refer to the idea of the deformable convolutional network <cit.>, and propose the distortion-aware spherical convolution, where the convolutional filter get distorted in the same way as the objects on the ERP. 




Though SphConv is simple and effective, due to the implicit interpolation, it could not eliminate the distortion as the network grows deeper.
To adjust the distortion from SphConv, we introduce a reprojection mechanism in Rep R-CNN, which significantly increases the detection accuracy. 









Object Detection in 2D Images: 
The promising modern object detectors are usually based on two-stage approaches.
The Region-based CNN (R-CNN) approach <cit.> attends to a set of candidate region proposals <cit.> in the first stage, and then uses a convolutional network to regress the bounding boxes and classify the objects in the second stage.
Fast R-CNN <cit.> extends R-CNN by extracting the proposals directly on feature maps using RoI pooling.
Faster R-CNN <cit.> further replaces the slow selective search with a fast region proposal network, achieving improvements on both speed and accuracy.
Numerous extensions have been proposed to this framework <cit.>.
Compared with two-stage approaches, the single-stage pipeline skips the object proposal stage and generates detection and classification directly, such as SSD <cit.> and YOLO <cit.>.
Though these single-stage pipelines attract interests owing to their fast speed, they lack the alignments of the proposals, which is important for 360^∘ object detection.
Hence, we adopt the two-stage method in this paper.





Object Detection in 360^∘ Images:
Object detection in spherical images is an emerging task in computer vision, and several efforts <cit.>  have been made to push forward this issue.


Su et al. <cit.> utilize the network distillation in the network.

This approach applies regular CNN to a specific tangent plane with origin aligned to the object center to generate region proposals.
They construct a synthetic dataset by projecting objects in 2D images onto a sphere. 
Specifically, for each image in the dataset, they select a single bounding box in the image and project it onto the 180th meridian of the sphere with different polar angles.  


Yang et al. <cit.> exploit a perspective-projection based detector on a real-world dataset.
However, they annotate the objects with rectangular regions on ERP, which should have been distorted on the sphere.






Meanwhile, Coors et al. <cit.> attach the rendered 3D car images to the real-world omnidirectional images and create the synthetic FlyingCars dataset.

To solve the distortion in ERP, they utilize the spherical convolution, and apply it to a vanilla SSD.

Apparently, existing methods exploit various settings and examine their performance on synthetic datasets with different annotations.
This situation attributes to the lack of appropriate annotations as well as a standard method for 360^∘ object detection.


Thus, in this paper, we introduce a standardized framework to conform to real-world object detection in 360^∘ images, and create two novel datasets for 360^∘ object detection task.













§ REPROJECTION R-CNN

In this section, we first establish the new criteria of object detection in 360^∘ images.
Beyond that, we present an outline of the proposed two-stage Reprojection R-CNN algorithm, and then introduce the first stage, i.e., Spherical RPN, and the second stage, i.e., reprojection network, respectively.
In the end, we introduce the loss function and the implementation details of the proposed algorithm.






 §.§ Criteria in 360^∘ Object Detection


The existing bounding-box annotations are not suitable for the object detection task in spherical images.
Thus, we introduce several novel criteria for 360^∘ object detection in this subsection, including spherical bounding box, spherical anchor and spherical IoU.






Spherical Bounding Box:
In a real-world omnidirectional scene, if the user's viewpoint coincides with the center of the object, the object will appear with a regular shape centered on the viewpoint, which can be bounded by a spherical rectangle as shown in Figure <ref>.

Hence, we annotate each object i with a spherical bounding box, denoted as B^i with B^i=(B_θ^i, B_ϕ^i, B_fov_x^i, B_fov_y^i), where B_θ^i and B_ϕ^i represent the latitude/longitude coordinates of the object's center (viewpoint), and B_fov_x^i, B_fov_y^i represent the left-right/up-down field-of-view angles of the object's occupation. 
Meanwhile, we also exploit the spherical bounding-box regression to tailor the annotations by replacing the height and width in the conventional bounding-box regression with FoVs.





Spherical Anchor:

Since the proposed spherical bounding box delineates a spherical rectangle, the scales of the anchor boxes in RPN should be measured by FoV angles rather than pixel sizes. 
Therefore, we introduce the translation-invariant spherical anchors for 360^∘ images, which are represented by the left-right and up-down FoV angles at each sliding-window location (e.g., 30^∘× 60^∘).

Spherical IoU: 
Due to the pixel-wise integral on the sphere, the computation of actual IoU is time-consuming.
Moreover, the existing ERPIoU <cit.> is biased since the pixel size on the sphere varies with longitude, while it still requires the time-consuming pixel-wise calculation on ERP. 



Thus, we introduce a fast and efficient IoU metric based on the proposed spherical bounding box,

named as spherical IoU (SphIoU).
SphIoU approximately measures the similarity between the spherical bounding boxes, and could be calculated in parallel. 

Specifically, SphIoU assumes that the intersection between two spherical bounding boxes B^i and B^j form a spherical rectangle.
The FoV angles of the intersection can then be derived from the difference between the upper left and lower right corners of the spherical rectangle, which is similar to the normal IoU calculation, except that the angle is now represented by polar coordinates, and the width and height are determined by FoV angles.












































Meanwhile, the area of a spherical bounding box B with FoV angles of B_fov_x and B_fov_y on the unit ball can be calculated by:

    Area(B) = 2 B_fov_x sin( B_fov_y / 2).

Therefore, the SphIoU between B^i and B^j follows:

    SphIoU(B^i, B^j) = Area(B^i ∩ B^j)/Area(B^i) + Area(B^j) - Area(B^i ∩ B^j).


Note that the centers of B^i and B^j may appear in separate boundaries of ERP, and cause wrong gradient descent during training the object detection model. 
Hence, we add both B_ϕ^i and B_ϕ^j by 180^∘, and obtain a modified SphIoU. 
We take the maximum of the origin SphIoU and the modified SphIoU as the final outcome.

In another case
when the spherical bounding box covers one pole of the sphere, we cut the spherical bounding box into two sub-regions along the circle of longitude under the assumption that the spherical bounding box is always orthogonal to the latitude line.
We take the sum of the SphIoU between the sub-regions belonging to different spherical bounding boxes as the overall SphIoU.


A further discussion about the computation and approximation of SphIoU is given in the supplementary material.







 §.§ Overview of Reprojection R-CNN

Combining ERP and Perspective Projection:
We combine the advantages of two typical representations in spherical images, i.e., ERP and perspective projection, for 360^∘ object detection.
Though ERP introduces severe distortion in the image, the ERP-based methods could generate region proposals owing to its omnidirectional view.

Meanwhile, the perspective projection could eliminate the distortion in the ERP, but a large number of regions are required to cover all the objects in the image due to its limited field-of-view.



Unlike previous methods <cit.> adopting single representation in the object detection, we take advantage of both representations in the proposed Rep R-CNN, leading to a fast and accurate object detector for 360^∘ images. 






Reprojection R-CNN Architecture:
The overall architecture of Rep R-CNN is illustrated in Figure <ref>.
Rep R-CNN contains two stages, where the first stage is a spherical RPN, and the second stage is a reprojection network. 
The SphRPN could propose coarse object detections rapidly on the ERP, while RepNet could refine the proposed regions based on the perspective projections and generate precise spherical bounding boxes.





Specifically, SphRPN exploits SphConv in the backbone network, and extracts a distortion-aware feature map efficiently from ERP of size H_e × W_e.


A spatial window is slid over the extracted feature map, where at each location SphRPN predicts k spherical bounding boxes based on the corresponding spherical anchors, as well as the objectness score for each proposal.


To bridge SphRPN and RepNet, a reprojection RoI pooling layer is applied to transform the proposed regions to fixed-size perspective projections.
In particular, it expands the region proposals from SphRPN, reprojects the expansions to the tangent planes, and resizes the projected areas to a fixed size of H_p × W_p.

Then, RepNet takes the distortion-free projections as input and utilizes another backbone network to rectify the spherical bounding box of each projection, generating the final detections of the spherical image.




















 §.§ Spherical Region Proposal Network


The role of SphRPN is the same as that of vanilla RPN.
Given the ERP of a 360^∘ image, SphRPN generates the objectness score, and the offset of the spherical bounding box for each candidate region. 
The only difference is that SphRPN adopts the SphConv <cit.> in the CNN, and introduces the novel spherical anchors as regression reference.


Spherical Convolution:
The SphConv is designed to address the distortion in ERP. 
It adjusts the sampling locations of the convolutional filter by projecting a uniform convolutional filter on the tangent planes centered at the corresponding locations back to the ERP, as shown in Figure <ref>.



Formally, assume that the spherical input image is defined on polar coordinates, and the size of ERP is H_e × W_e.


For convenience, we use latitude and longitude, i.e., θ∈ [-90^∘, 90^∘] and ϕ∈ [-180^∘, 180^∘], to represent the points in ERP.

Let I_p[θ,ϕ] denote the tangent plane centered at (θ, ϕ) on the sphere,

where the coordinate system of I_p[θ,ϕ] takes the center as the origin and orients upright.
We only consider the 3 × 3 SphConv, since it is sufficient for the backbone network <cit.>. 

The sampling locations vary with latitudes to cope with the distortion.
To find the exact sampling locations, we resort to two-step projection transformations.
Specifically, we first sample the locations 

of a regular 3 × 3 convolutional filter located at the center of ERP, i.e., the coordinate (0,0), with pixel size Δ_θ = 180^∘ / H_e and Δ_ϕ = 360^∘ / W_e.
The sampling locations on I_p[0,0], i.e., (x_q,q', y_q,q'), with q,q' ∈{-1,0,1}, can be calculated via gnomonic projection <cit.>.


















Then, we could get the sampling locations of 3 × 3 SphConv corresponding to each location on ERP by the inverse gnomonic projection (f_θ and f_ϕ). 
In concrete, the sampling locations on the tangent planes are fixed, and for the SphConv located at (θ, ϕ), we have:

    f_θ(x_(q,q'),y_(q,q')) = asin(cosν sinθ + y_(q,q') sinν cosθ/ρ),


    f_ϕ(x_(q,q'),y_(q,q')) =    ϕ + atan(x_(q,q') sinν/ρ cosθ cosν - y_(q,q') sinθ sinν),


where ρ = √(x_(q,q')^2 + y_(q,q')^2) and ν = atan (ρ).  











 §.§ Reprojection Network


Though spherical convolution could reduce the distortion in ERP, the sampling locations of SphConv are biased when the network grows deeper <cit.> such that the region proposed by SphRPN would be distorted on the sphere.

Thus, we leverage the geometry of the spherical image and propose the reprojection network that takes the undistorted perspective projections as input.




Reprojection RoI Pooling:
Given the spherical bounding boxes proposed by SphRPN, reprojection RoI pooling layer generates the input of RepNet by transforming these spherical bounding boxes to fixed-length vectors.




Specifically, for each spherical bounding box B^i, since objects may be partially contained in B^i due to the biased sampling locations, reprojection RoI pooling expands the FoVs of the spherical bounding box by a factor r>1, yielding a larger spherical bounding box B_e^i=(B_θ^i, B_ϕ^i, rB_fov_x^i, rB_fov_y^i).
Then, the expanded spherical bounding box is reprojected to the tangent plane located at the predicted object center, i.e., I_p[B_θ^i, B_ϕ^i]. 

For each point (θ, ϕ) within the spherical bounding box B_e^i, the corresponding coordinates in tangent plane I_p[B_θ^i, B_ϕ^i] could be calculated by:

    f_x(θ, ϕ)    = cosθ sin(ϕ - B_ϕ^i)/sin B_θ^i  sinθ + cos B_θ^i  cosθ cos(ϕ - B_ϕ^i), 
    
    	f_y(θ, ϕ)    = cos B_θ^i  sinθ - sin B_θ^i  cosθ cos(ϕ - B_ϕ^i)/sin B_θ^i  sinθ + cos B_θ^i  cosθ cos(ϕ - B_ϕ^i).



Note that each spherical bounding box corresponds to a rectangular region in the tangent plane, while the shapes of the projected rectangular areas are various.
Thus, the reprojection RoI pooling exploits the RoI average pooling, which converts the projections into the patches with a fixed spatial extent of H_p × W_p (e.g. 224 × 224).






 §.§ Optimization

Loss Functions:
We minimize a similar multi-task loss in both SphRPN and RepNet as Faster R-CNN <cit.>.
Both networks have two sibling output layers <cit.>. 
Suppose that the concerned objects in the 360^∘ images belong to a number of K
categories. 
The first layer outputs the probability distribution over K+1 categories (including background) by a softmax function, and the second layer outputs spherical bounding-box regression offsets parameterized by <cit.> for each object class.
The loss function for the spherical bounding-box regression t and its objectness score p is defined as:

    L(p, t) = L_cls(p, p^*) + λ  [p^* ≥ 1] L_reg(t, t^*),

where p^* is the ground-truth label, and t^* is the associated spherical bounding-box regression target. 
The classification loss L_cls is the log loss for true class, while the regression loss L_reg is the smooth L_1 loss defined in <cit.>.
The Iverson bracket indicator function [p^* ≥ 1] is applied to disable the regression loss for background (labeled by 0).

SphRPN:
We set K=1 in SphRPN, indicating whether the proposed regions belong to the foreground or background. 
Here, the references for the bounding-box regression are the default spherical anchors, which are assigned to foreground objects using a SphIoU threshold of 0.7, and to the background if the SphIoU is less than 0.3. We sample 128 positive and negative anchors per image with a ratio of 1:1.
The balance parameter λ is set to 3 in all the experiments. 

RepNet:
Meanwhile, the number of categories K is task-dependent in RepNet, and the references of bounding-box regression are the spherical bounding boxes generated by SphRPN. 
The spherical bounding box is now considered positive if the SphIoU between the prediction and the ground-truth box achieves at least 0.5, and negative if the SphIoU is less than 0.3. 
Besides, we sample 128 RoIs per image with a ratio of 1:3 of positive to negative, and set λ=1 in RepNet. 




















 §.§ Implementation Details

Backbone:
We apply VGG-16 <cit.> as the backbone network for both stages. SphConv is adopted in the first stage, where conv5_3 is served as the final feature map.
Since SphConv only changes the sampling locations in the convolutional filter, we could simply transfer the parameters between two VGG networks.



Anchors: 
We use k=9 anchors in SphRPN.
Specifically, the anchors have three scales of (30^∘)^2, (60^∘)^2, and (90^∘)^2 with three aspect ratios of 1:1, 1:2, and 2:1.

Training:






We train Rep R-CNN in two steps. 
In the first step, we initialize SphRPN with the VGG-16 pre-trained on ImageNet dataset <cit.>, and fine-tune the network on specific 360^∘ datasets with ERPs of size 512 × 1024 as input.

In the second step, we adopt the regions proposed by SphRPN. 
The proposals are filtered by non-maximum suppression (NMS) with 0.7 threshold, reprojected to the tangent planes, and then resized to a fixed size of 224 × 224 
as the input of RepNet.
We use SphRPN to initialize RepNet by duplicating the weights of SphConv directly to the normal convolutional filters. 


We do not share weights in backbone networks as we find that it would degrade the performance of the proposed detector.
Thus, we do not utilize alternating training <cit.> in Rep R-CNN.

Both SphRPN and RepNet are trained on 4 GPUs for 20 epochs. 
The batch size is set to 16 for SphRPN and 128 for RepNet.
The learning rate is initially set to 0.001 and then decreased by a factor of 10 after training 15 epochs. 
We use a stochastic gradient descent (SGD) optimizer with a weight decay of 0.0005 and a momentum of 0.9.


Inference:
At test time, we propose the candidate regions based on the spherical anchors, and apply NMS with a threshold of 0.7 to reduce redundancy in SphRPN, which is the same as the training procedure.
After NMS, we use the top-n ranked proposed regions for the second-stage detection.
We transform the selected proposals to fixed-size projections by reprojection RoI pooling, and then run RepNet on those projections, yielding rectified spherical bounding boxes as the output.
After that, we drop the proposals with less than 0.1 confidence score and apply NMS with a threshold of 0.45 to generate the final detections.








§ EXPERIMENTS



 §.§ Experimental Setup

Datasets:
We evaluate the proposed Rep R-CNN on three datasets, including two novel synthetic datasets 
annotated by spherical bounding box and one real-world dataset without pre-labeled annotation.

VOC360: 
VOC360 is a synthetic dataset generated from PASCAL VOC 2007 and 2012 <cit.> with 20 categories.  
We crop the objects with random-sized background from images in the VOC datasets, and then project the cropped images to arbitrary points on the sphere.

Each image in VOC360 is attached by only one cropped image. 
VOC360 has 15000 training images, 1800 validation images, and 4955 test images.

COCO-Men: 

Referring to
the FlyingCars dataset <cit.>, we construct the novel COCO-Men dataset.
COCO-Men combines the real-world background 360^∘ images, and the segmented images of people cropped from COCO dataset <cit.>. 
Each image includes three to six people, and every pair of people has an overlapping of SphIoU of less than 0.1.


In total, the dataset comprises 4000 training images, 2000 validation images, and 1000 test images.

SUN360:
To demonstrate the capability of Rep R-CNN for real scenes, we use SUN360 dataset <cit.> which contains a large number of real-world 360^∘ images from the Internet.
In particular, we leverage the model trained on the VOC360 to examine the performance of Rep R-CNN on SUN360, regarding both accuracy and efficiency.

Baseline Methods:
We take the following state-of-the-art methods as baselines and compare the performance of Rep R-CNN with the baseline methods.

Note that all baseline methods are one-stage object detectors.


ERP-SSD <cit.>: 
We apply SSD directly to spherical images represented by ERP.

Multi-projection:

We select overlapping projection areas with equal intervals to cover the sphere, and then perform perspective projection on these areas.
The projections are then fed into a Fast R-CNN.


Sphere-SSD <cit.>:
The Sphere-SSD is constructed by replacing normal convolutions in ERP-SSD with SphConv.

SPHCNN <cit.>:



We add a 1 × 1 conv on top of the conv5_3 feature map <cit.> based on the author's implementation to generate spherical bounding-box regressions and classification scores for 

an actual 360^∘object detection.



S^2CNN <cit.>: 

Since S^2CNN is originally designed for classification, we adapt S^2CNN to object detection.

We use multiple perspective projections to represent the 360^∘ images.
Then, we feed the projections into the authors' implementation of S^2CNN, and concatenate the outputs of the network.
We propose regions on top of the combined feature map.
To avoid out-of-memory error, we scale down the input resolution to 64 × 64 suggested by authors.

Spherical CNN <cit.>:
We modify the authors' implementation in the same way as S^2CNN.
The input is again scaled down to 64 × 64 due to the memory limit.

For a fair comparison, the baseline methods are tuned by either implementation with recommended parameter settings or grid search for the best performance. 
In addition, the backbone networks are all the same VGG-16 except for S^2CNN and Spherical CNN. 
Please refer to supplementary material for additional details of datasets and baseline methods.

Performance Metric: 
For the performance measure of the 360^∘ object detection, we adopt the standard Average Precision (AP) for each individual object class, and report the mean Average Precision (mAP) for all classes <cit.>. 
A detection is considered to be correct when the IoU between the prediction and ground-truth exceeds 50%.
Here, we use the actual IoU calculated by the pixel-level integral on the sphere to ensure that the measurement is unbiased and fair to all comparison algorithms. 









































 §.§ Performance of Rep R-CNN

We compare the proposed Rep R-CNN with the baseline methods in both VOC360 and COCO-Men datasets.
The results are shown in Table <ref>.
Among the baseline methods, it is obvious that Multi-projection achieves relatively good performance but is time-consuming due to the large number of region proposals. 
Owing to the use of SphConv, Sphere-SSD exhibits competitive performance in both datasets with almost 3x speed faster than the Multi-projection method.
Besides, the other novel methods for 360^∘ images, i.e., SPHCNN, S^2CNN and Spherical CNN show less competitive performance than the above two methods in either speed or accuracy due to the memory constraints.


Regarding Rep R-CNN, 

it can be observed 
that the proposed detector adopts the rapid and relatively precise SphConv in the region proposal network, and then regresses the proposed regions with the accurate perspective-projection based method.
Therefore, Rep R-CNN can be regarded as a combination of Sphere-SSD and Multi-projection, which is both fast and accurate.
The results in VOC360 and COCO-Men convincingly demonstrate the effectiveness of the proposed method.

Specifically, Rep R-CNN achieves 71.88 mAP on the VOC360 dataset, exceeding the strongest baseline, i.e., SPHCNN, by over 45%; while the performance gain in the COCO-Men dataset is also at least 30% compared to the previous state-of-the-art Multi-projection method.
In addition, Rep R-CNN achieves the best performance with only 127ms per image on VOC360 dataset, which is faster than almost all the baseline methods. 



Moreover, to show the robustness of Rep R-CNN, we examine the mAP of the detection algorithms by varying the polar angle, and plot the polar angle/mAP curves of methods in Figure <ref> and <ref>.

Since the perspective-projection based methods are not affected by polar angle, we only consider the methods that take ERP as input.
We find that Rep R-CNN forms an upper envelope over all existing methods.
Furthermore, though the distortion in ERP varies with the polar angle, Rep R-CNN is only slightly affected, and exhibits competitive performance even if the objects are extremely distorted, i.e., near the poles.
Rep R-CNN outputs are visualized in Figure <ref>.
The result reveals that the proposed Rep R-CNN is robust to the various distortion and discontinuity in 360^∘ images.









 §.§ Ablation Experiments

We conduct several ablation studies to verify the design of Rep R-CNN.

Region Proposal Network:
The previous object detectors for 360^∘ images are all one-stage, and neglect the process of region proposal.
To demonstrate the necessity of RPN, we compare Rep R-CNN with Multi-projection,
because both methods utilize perspective projections as input and the only difference


is whether the projections are generated by RPN or by uniform sampling.
For a fair comparison, we 

generate about 200 projection areas for Multi-projection such that the proposals could cover all the objects on the sphere compactly.
As shown in Table <ref>, Multi-projection is inferior to Rep R-CNN, especially in the VOC360 dataset where the objects are small and difficult to locate.
Moreover, in order to get exact proposals, Multi-projection method always samples numerous candidate projections, leading to large time consumption.
Therefore, we could infer that a preceding region proposal process is crucial for the fast and accurate object detector in 360^∘ images.



Reprojection Technique:

We then consider the efficiency of reprojection technique. 
In this experiment, we take Sphere-SSD as the comparison since Sphere-SSD is a variant of SphRPN, which can be regarded as a Rep R-CNN without RepNet.


It can be observed from Table <ref> that the lack of RepNet leads to a substantial decline of more than 30% in mAP, indicating that the strength of Rep R-CNN is mainly attributed to the reprojection-based bounding-box relocation.
Moreover, we consider the mAP at different latitudes. 
As shown in Figure <ref> and <ref>, although Sphere-SSD fits the sampling locations of the convolutional kernel on the sphere, it still suffers from distortion in the polar regions.

In contrast, Rep R-CNN is capable of detecting and localizing the objects at any location, indicating that the reprojection technique could adjust the bias introduced by SphRPN.


 
Spherical Convolution:


In accordance with the result in <cit.>, we find that 

Sphere-SSD performs better than vanilla SSD in both datasets as shown in Table <ref>.
In this section, we investigate the effect of SphConv in the two-stage detector.
We replace SphConv with the normal convolution in RPN, and report the result of the modified Rep R-CNN as well as RPNs in Table <ref>. 

Similar to the previous outcomes, SphRPN outperforms the normal RPN in both datasets.
Though the second-stage relocation fills the gap between SphRPN and normal RPN,

this alternate still results in a mAP loss of nearly 14 points in VOC360 dataset and over 7 points in COCO-Men dataset, implying that the distortion-aware SphConv is crucial for the two-stage detector in 360^∘ images.
Besides, while the accuracy degrades, the proposed two-stage detector still largely surpasses the state-of-the-art methods with the normal convolution, which once again highlights that reprojection-based second stage is the core of the proposed Rep R-CNN.

To give a detailed explanation of SphConv, we plot the polar angle/mAP curves of SphRPN and the normal RPN in Figure <ref>.  
Though SphConv proposes coarse spherical bounding-box regressions, it is less impacted by the distortion near the poles.
In comparison, normal RPN fails to detect the objects apart from the equator or near the prime meridian, and thus leading to a drop in the accuracy.






Number of Region Proposals:

To balance the speed and accuracy, we compare a different number of region proposals during the inference time.
In Table <ref>, we observe that Rep R-CNN could achieve the best mAP with only 20 proposals in VOC360, and 50 proposals in COCO-Men dataset, which is much less than the Multi-projection with 200 proposals.
The result indicates that SphRPN can accurately generate the region of interests in the ERP while the second-stage RepNet can extract specific objects from the proposed regions.

Additionally, with 50 proposals, Rep R-CNN could run at 178ms per image on an NVIDIA Tesla V100 GPU, which means the proposed algorithm could be applied in VR and real-world omnidirectional video streaming.




 §.§ Rep R-CNN in Real-world Dataset

To verify that the proposed Rep R-CNN is also effective in real-world scenarios, we exploit the network trained on VOC360, and directly apply it to the real-world SUN360 dataset without fine-tuning.

As shown in Figure <ref>.c), consistent with the previous experiments, objects of various categories at different latitudes can be successfully detected by the proposed Rep R-CNN despite the distortion and discontinuity.
This result demonstrates that Rep R-CNN could perform well over the real-world scenarios.





Additional qualitative experiments of Rep R-CNN are provided in the supplementary material.




§ CONCLUSION


In this work, we present a standard framework to address the object detection for 360^∘ images, including novel spherical criteria and a two-stage object detector named Rep R-CNN.


Rep R-CNN combines the strength of both ERP and perspective projection, resulting in fast and accurate object detection in 360^∘ images.



We introduce two synthetic 360^∘ image datasets to examine the performance of Rep R-CNN.

Experimental results show that Rep R-CNN outperforms several state-of-the-art 360^∘ object detectors by at least 30% at high speed.
Ablation experiments also verify the efficiency and accuracy of Rep R-CNN.

In addition, the model can be transferred to the real-world dataset and remain good performance, indicating that Rep R-CNN is applicable to the real-world scenarios.




ieee



