Skip to content

Commit b0e9145

Browse files
authored
Merge pull request #1448 from roboflow/add_rfdetr_aliases
rf-detr aliases
2 parents 6ade113 + 436f09d commit b0e9145

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

inference/core/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.51.6"
1+
__version__ = "0.51.7"
22

33

44
if __name__ == "__main__":

inference/models/aliases.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
RFDETR_ALIASES = {
5656
"rfdetr-base": "coco/36",
5757
"rfdetr-large": "coco/37",
58+
"rfdetr-nano": "coco/38",
59+
"rfdetr-small": "coco/39",
60+
"rfdetr-medium": "coco/40",
5861
}
5962

6063
REGISTERED_ALIASES = {

inference/models/rfdetr/rfdetr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import cv2
77
import numpy as np
88
import onnxruntime
9-
import torchvision.transforms.functional
109
from PIL import Image
1110

1211
from inference.core.entities.requests.inference import InferenceRequestImage
@@ -38,8 +37,6 @@
3837

3938
if USE_PYTORCH_FOR_PREPROCESSING:
4039
import torch
41-
import torchvision
42-
from torchvision.transforms.functional import pil_to_tensor
4340

4441
CUDA_IS_AVAILABLE = torch.cuda.is_available()
4542

@@ -374,6 +371,9 @@ def postprocess(
374371
topk_labels,
375372
)
376373
)
374+
batch_predictions = batch_predictions[
375+
batch_predictions[:, 6] < len(self.class_names)
376+
]
377377

378378
processed_predictions.append(batch_predictions)
379379

inference_sdk/http/utils/aliases.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
RFDETR_ALIASES = {
2525
"rfdetr-base": "coco/36",
2626
"rfdetr-large": "coco/37",
27+
"rfdetr-nano": "coco/38",
28+
"rfdetr-small": "coco/39",
29+
"rfdetr-medium": "coco/40",
2730
}
2831

2932
QWEN_ALIASES = {

0 commit comments

Comments
 (0)