From 7925f8e120613e574fec7892278080f017b1b7aa Mon Sep 17 00:00:00 2001 From: SolomonLake Date: Thu, 13 Nov 2025 08:40:23 -0600 Subject: [PATCH] Remove rf-detr dummy class prepend --- roboflow/util/model_processor.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/roboflow/util/model_processor.py b/roboflow/util/model_processor.py index d7622d51..066bb46c 100644 --- a/roboflow/util/model_processor.py +++ b/roboflow/util/model_processor.py @@ -271,7 +271,6 @@ def _process_rfdetr(model_type: str, model_path: str, filename: str) -> str: def get_classnames_txt_for_rfdetr(model_path: str, pt_file: str): class_names_path = os.path.join(model_path, "class_names.txt") if os.path.exists(class_names_path): - maybe_prepend_dummy_class(class_names_path) return class_names_path import torch @@ -282,7 +281,6 @@ def get_classnames_txt_for_rfdetr(model_path: str, pt_file: str): with open(class_names_path, "w") as f: for class_name in args["class_names"]: f.write(class_name + "\n") - maybe_prepend_dummy_class(class_names_path) return class_names_path raise FileNotFoundError( @@ -294,17 +292,6 @@ def get_classnames_txt_for_rfdetr(model_path: str, pt_file: str): ) -def maybe_prepend_dummy_class(class_name_file: str): - with open(class_name_file) as f: - class_names = f.readlines() - - dummy_class = "background_class83422\n" - if dummy_class not in class_names: - class_names.insert(0, dummy_class) - with open(class_name_file, "w") as f: - f.writelines(class_names) - - def _process_huggingface( model_type: str, model_path: str, filename: str = "fine-tuned-paligemma-3b-pt-224.f16.npz" ) -> str: