[Feature][Relax][ONNX] Support DeformConv (Deformable Convolution) in Relax ONNX frontend

Aperta
#20,968 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start in python/tvm/relax/frontend/onnx/onnx_frontend.py and review the ONNX DeformConv specification at opset 19+, including its inputs, attributes, and optional bias and mask. Determine how the frontend represents sampling, bilinear interpolation, and convolution in Relax; done means importing DeformConv nodes produces equivalent calls with offsets and masks handled as described.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature Description

Support the ONNX DeformConv (Deformable Convolution) operator in the Apache TVM Relax ONNX frontend (python/tvm/relax/frontend/onnx/onnx_frontend.py).

Motivation

Deformable Convolution (DCNv2/DCNv3) is an essential architectural component in modern computer vision architectures for object detection, instance segmentation, and pose estimation (such as DETR, Mask DINO, and YOLOv9). It augments standard grid convolutions with learned 2D spatial offsets, allowing receptive fields to dynamically adapt to object scales and geometry.

Standardized in ONNX opset 19+, DeformConv is currently not supported in the Relax ONNX frontend. Importing ONNX models containing deformable convolutions fails with:

NotImplementedError: The following operators are not supported: ['DeformConv']

This operator was also highlighted in the ONNX coverage RFC tracking issue #20124 under Convolution operators.

Operator Specification (ONNX Opset 19+)
  • Inputs:
    1. X: 4D input feature map (N, C_in, H_in, W_in).
    2. W: 4D weight tensor (C_out, C_in/group, kH, kW).
    3. offset: 4D offset tensor (N, 2 * offset_group * kH * kW, H_out, W_out) containing spatial sampling displacements.
    4. B (optional): 1D bias tensor (C_out).
    5. mask (optional): 4D modulation mask tensor (N, mask_group * kH * kW, H_out, W_out) for modulated deformable convolutions (DCNv2).
  • Attributes:
    • dilations: list of ints (default [1, 1])
    • group: int (default 1)
    • kernel_shape: list of ints
    • offset_group: int (default 1)
    • pads: list of ints
    • strides: list of ints (default [1, 1])
  • Outputs:
    1. Y: 4D output feature map (N, C_out, H_out, W_out).
Expected Behavior

The Relax ONNX frontend should convert DeformConv nodes into equivalent Relax calls by sampling spatial locations with bilinear interpolation based on the offsets and masks, and convolving with kernel weights.

Lingua principale
Python
Stelle
13.9k
Fork
4.1k
Merge medio
4g 22h
PR unite (30g)
22

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/tvm

Tutte le issue di apache/tvm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.