RayNet: Real-time Scene Arbitrary-shape Text Detection with Multiple Rays

Chuang Yang, Mulin Chen, Qi Wang, Xuelong Li

Abstract

Detecting irregular-shaped text instances is the main challenge for text detection. Existing approaches can be roughly divided into top-down and bottom-up perspective methods. The former encodes text contours into unified units, which always fails to fit highly curved text contours. The latter represents text instances by a number of local units, where the complicated network and post-processing lead to slow detection speed. In this paper, to detect arbitrary-shaped text instances with high detection accuracy and speed simultaneously, we propose a Bidirectional Perspective strategy based Network (BiP-Net). Specifically, a new text representation strategy is proposed to represent text contours from a top-down perspective, which can fit highly curved text contours effectively. Moreover, a contour connecting (CC) algorithm is proposed to avoid the information loss of text contours by rebuilding interval contours from a bottom-up perspective. The experimental results on MSRA-TD500, CTW1500, and ICDAR2015 datasets demonstrate the superiority of BiP-Net against several state-of-the-art methods.

The Challenge of Arbitrary-Shaped Text

Detecting text in natural scenes is notoriously difficult because text often appears in non-linear formats—curving around logos, bending on clothing, or distorting due to perspective. Existing deep learning approaches generally fall into two categories, each with significant trade-offs:

  1. Top-down methods treat text as a single unified object. While fast, they struggle to accurately draw tight boundaries around highly curved or irregular text, often failing when a curve bends back on itself.
  2. Bottom-up methods detect tiny local units (like individual characters) and group them. While accurate for any shape, the complex post-processing required to stitch these parts together is computationally expensive, preventing real-time performance.

BiP-Net addresses this dilemma by combining the speed of top-down modeling with the precision of bottom-up refinement.

BiP-Net Architecture and Methodology

BiP-Net is a single-shot, anchor-free detector that utilizes a "Bidirectional Perspective" strategy. The architecture uses a standard ResNet + Feature Pyramid Network (FPN) backbone and splits into two specialized heads.

Overview of the BiP-Net architecture, showing the center point sampling and ray prediction modules.

Top-Down: Ray Clusters

Instead of predicting standard bounding boxes, BiP-Net represents text shapes using multiple "ray clusters." For a single text instance, the network predicts five center points. From each center point, eight "rays" (vectors) emit outward in evenly spaced directions to find the text boundary. This efficiently parameterizes the rough shape of the text without the rigidity of bounding boxes.

Bottom-Up: Contour Connecting (CC) Algorithm

To ensure highly curved text does not lose fidelity in the gaps between ray clusters, the authors introduce the CC algorithm. This lightweight bottom-up step takes the piecewise contour points generated by the rays, identifies interval points between adjacent clusters, and stitches them together. By generating piecewise contours top-down and only stitching intervals bottom-up, the model bypasses the massive computational overhead of traditional character-grouping methods.

Experimental Results

The model was evaluated on several standard scene text benchmarks, including MSRA-TD500 (multi-lingual), CTW1500 (highly curved text), and ICDAR2015 (multi-oriented text).

Quantitative comparison of BiP-Net against state-of-the-art methods on MSRA-TD500, CTW1500, and ICDAR2015.

BiP-Net achieves an exceptional trade-off between speed (FPS) and accuracy (F-measure):

  • MSRA-TD500: Achieved an 86.4% F-measure at 30.7 FPS, surpassing methods like CRAFT and SAE by more than 20 FPS while maintaining superior accuracy.
  • CTW1500: Achieved an 85.1% F-measure at 35.6 FPS. Compared to ContourNet (83.9% F-measure at 4.5 FPS), BiP-Net is nearly seven times faster.
  • ICDAR2015: Achieved an 83.9% F-measure at 24.8 FPS, proving its effectiveness on small-scale and cluttered backgrounds.

Conclusion

BiP-Net demonstrates that a bidirectional strategy—combining ray-based top-down representation with a lightweight bottom-up stitching algorithm—can achieve state-of-the-art results for arbitrary-shaped text detection. The proposed CC algorithm is remarkably efficient, with post-processing accounting for only about 20% of total inference time. Future work may involve optimizing the backbone for high-resolution images or adapting the ray-cluster approach to other complex object detection tasks like cell segmentation.

Summary updated

BibTeX
@inproceedings{yang2021raynet,
  author = {Chuang Yang and Mulin Chen and Qi Wang and Xuelong Li},
  title = {{RayNet: Real-time Scene Arbitrary-shape Text Detection with Multiple Rays}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  doi = {10.48550/arxiv.2104.04903},
}
Figure