Skip to content

Commit 3dee7a2

Browse files
Merge pull request #1667 from roboflow/fix/training-resolution
Fix issue with inference resolution not denoted correctly in RFDetr
2 parents 38b9d90 + 9e71ee6 commit 3dee7a2

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

inference_experimental/inference_exp/models/rfdetr/rfdetr_instance_segmentation_pytorch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ def from_pretrained(
124124
model_config = CONFIG_FOR_MODEL_TYPE[model_type](device=device)
125125
checkpoint_num_classes = weights_dict["class_embed.bias"].shape[0]
126126
model_config.num_classes = checkpoint_num_classes - 1
127+
model_config.resolution = inference_config.network_input.training_input_size.height
127128
model = build_model(config=model_config)
128129
model.load_state_dict(weights_dict)
129130
model = model.eval().to(device)

inference_experimental/inference_exp/models/rfdetr/rfdetr_object_detection_pytorch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def from_pretrained(
130130
model_config = CONFIG_FOR_MODEL_TYPE[model_type](device=device)
131131
checkpoint_num_classes = weights_dict["class_embed.bias"].shape[0]
132132
model_config.num_classes = checkpoint_num_classes - 1
133+
model_config.resolution = inference_config.network_input.training_input_size.height
133134
model = build_model(config=model_config)
134135
model.load_state_dict(weights_dict)
135136
model = model.eval().to(device)

inference_experimental/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "inference-exp"
3-
version = "0.15.4"
3+
version = "0.15.5"
44
description = "Experimental vresion of inference package which is supposed to evolve into inference 1.0"
55
readme = "README.md"
66
requires-python = ">=3.10,<3.13"

inference_experimental/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)