Back to R project for statistical computing
GSoC 2026

Extending Torchvision with C++ Performance Optimisations for Production-Grade Computer Vision in R

The torchvision package in the mlverse ecosystem provides essential tools for computer vision workflows in R, including datasets, transformations, and model utilities. While the ecosystem has matured significantly, a key limitation remains in the performance of certain core operations, particularly in detection pipelines. Functions such as Non-Maximum Suppression, bounding box transformations, and proposal filtering are currently implemented at the R level, which introduces inefficiencies when working with larger inputs or real-time use cases. This project aims to address that gap by moving performance-critical components into a native C++ backend using torchvisionlib. The approach will focus on identifying the parts of the pipeline that are actual bottlenecks, implementing them in C++ with careful attention to memory usage and batching, and integrating them back into torchvision without changing the user-facing API. Rather than rewriting everything, the work will prioritise targeted optimisations that have a measurable impact on end-to-end performance. In addition to backend improvements, the project will include the implementation of at least one modern computer vision model family, such as YOLO, using the optimised components. If time permits, support for an additional model (e.g., RT-DETR) will also be explored. These models will be integrated into the existing ecosystem with consistent APIs and working examples. The main deliverables of this project are: a set of optimised C++ implementations for core detection operations, their seamless integration into torchvision, at least one fully functional model pipeline built on top of this backend, and supporting documentation and benchmarks demonstrating performance improvements. The goal is to make torchvision not just feature-complete, but efficient enough for practical, large-scale use.

Project details

Contributor

Srishti Dutta

Mentors

Not available

Technologies

Not listed in the archive