Interface IRFDetrDetectionPreprocessor

Namespace
NT2I.ONNX.Abstractions.Interfaces.RFDetr
Assembly
NT2I.ONNX.Abstractions.dll

Définit le contrat pour un pré-processeur spécifique aux modèles de détection RF-DETR.

Le pipeline de pré-traitement RF-DETR utilise :

  • Normalisation ImageNet — mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225] (ordre RGB).
  • Resize direct (StretchResize) — pas de letterbox, ratio d'aspect non conservé.
  • Layout NCHW — [batch, 3, H, W] en float32.
Ce pipeline est identique au pré-traitement SAM2, ce qui permet une mutualisation de la pré-traitement via le Hub (CudaSharedImageContext : cache hit sur Requirements identiques).
public interface IRFDetrDetectionPreprocessor : IPreprocessor, IDisposable
Inherited Members

Methods

BatchProcessBGR(byte[][], int[], int[], int, int, int)

Prétraite un batch d'images au format BGR.

IDataHandlingResult BatchProcessBGR(byte[][] PackedBGRBatchBuffer, int[] widthsPerImage, int[] heightsPerImage, int batchSize, int targetWidth, int targetHeight)

Parameters

PackedBGRBatchBuffer byte[][]

Tableau de buffers BGR, un par image.

widthsPerImage int[]

Largeurs des images sources.

heightsPerImage int[]

Hauteurs des images sources.

batchSize int

Nombre d'images dans le batch.

targetWidth int

Largeur cible après redimensionnement.

targetHeight int

Hauteur cible après redimensionnement.

Returns

IDataHandlingResult

Un résultat de traitement contenant les données du batch prêtes pour l'inférence.

BatchProcessPlanar(byte[][], byte[][], byte[][], int[], int[], int, int, int)

Prétraite un batch d'images au format planaire.

IDataHandlingResult BatchProcessPlanar(byte[][] PlanarBatchBuffer_R, byte[][] PlanarBatchBuffer_G, byte[][] PlanarBatchBuffer_B, int[] widthsPerImage, int[] heightsPerImage, int batchSize, int targetWidth, int targetHeight)

Parameters

PlanarBatchBuffer_R byte[][]

Canaux rouges, un par image.

PlanarBatchBuffer_G byte[][]

Canaux verts, un par image.

PlanarBatchBuffer_B byte[][]

Canaux bleus, un par image.

widthsPerImage int[]

Largeurs des images sources.

heightsPerImage int[]

Hauteurs des images sources.

batchSize int

Nombre d'images dans le batch.

targetWidth int

Largeur cible après redimensionnement.

targetHeight int

Hauteur cible après redimensionnement.

Returns

IDataHandlingResult

Un résultat de traitement contenant les données du batch prêtes pour l'inférence.

ProcessBGR(byte[], int, int, int, int)

Prétraite une seule image au format BGR.

IDataHandlingResult ProcessBGR(byte[] PackedBGRBuffer, int imageWidth, int imageHeight, int targetWidth, int targetHeight)

Parameters

PackedBGRBuffer byte[]

Buffer contenant l'image au format BGR entrelacé (B₀G₀R₀…).

imageWidth int

Largeur de l'image source en pixels.

imageHeight int

Hauteur de l'image source en pixels.

targetWidth int

Largeur cible après redimensionnement.

targetHeight int

Hauteur cible après redimensionnement.

Returns

IDataHandlingResult

Un résultat de traitement contenant les données prêtes pour l'inférence.

ProcessPlanar(byte[], byte[], byte[], int, int, int, int)

Prétraite une seule image au format planaire (R, G, B séparés).

IDataHandlingResult ProcessPlanar(byte[] PlanarBuffer_R, byte[] PlanarBuffer_G, byte[] PlanarBuffer_B, int imageWidth, int imageHeight, int targetWidth, int targetHeight)

Parameters

PlanarBuffer_R byte[]

Canal rouge de l'image source.

PlanarBuffer_G byte[]

Canal vert de l'image source.

PlanarBuffer_B byte[]

Canal bleu de l'image source.

imageWidth int

Largeur de l'image source en pixels.

imageHeight int

Hauteur de l'image source en pixels.

targetWidth int

Largeur cible après redimensionnement.

targetHeight int

Hauteur cible après redimensionnement.

Returns

IDataHandlingResult

Un résultat de traitement contenant les données prêtes pour l'inférence.