Hello,
I trained RT-DETR thanks to modifying the rtdetr_detection_distillation.ipynb from tao tutorials. I trained the teacher model and succesfully distilled the student model. The student as well as the teacher model performed with over 80 mAP50 on the evaluation dataset.
But when i convert the student model to onnx and then to tensorrt engine and run inference as defined in the notebook, i get the result with blank labels even though something should be detected.
these are my onnx generation specs:
specs[“dataset”][“batch_size”] = 8 #If OOM error, decrease batch size
specs[“dataset”][“workers”] = 4
specs[“dataset”][“remap_mscoco_category”] = False
specs[“dataset”][“num_classes”] = num_classes + 1
specs[“dataset”][“augmentation”][“eval_spatial_size”] = [960, 640]
specs[“dataset”][“augmentation”][“train_spatial_size”] = [960, 640]
specs[“model”][“backbone”] = “convnext_tiny”
specs[“model”][“train_backbone”] = True
specs[“model”][“return_interm_indices”] = [1,2,3]
specs[“model”][“dec_layers”] = 6
specs[“model”][“enc_layers”] = 1
specs[“model”][“num_queries”] = 300
specs[“export”][“input_width”] = 960
specs[“export”][“input_height”] = 640
print(json.dumps(specs, sort_keys=True, indent=4))
this my spec for onnx to tensorrt
specs[“dataset”][“batch_size”] = 8 #If OOM error, decrease batch size
specs[“dataset”][“workers”] = 4
specs[“dataset”][“remap_mscoco_category”] = False
specs[“dataset”][“num_classes”] = num_classes + 1
specs[“dataset”][“augmentation”][“eval_spatial_size”] = [960, 640]
specs[“dataset”][“augmentation”][“train_spatial_size”] = [960, 640]
specs[“model”][“backbone”] = “convnext_tiny”
specs[“model”][“train_backbone”] = True
specs[“model”][“return_interm_indices”] = [1,2,3]
specs[“model”][“dec_layers”] = 6
specs[“model”][“enc_layers”] = 1
specs[“model”][“num_queries”] = 300
specs[“gen_trt_engine”][“tensorrt”][“data_type”] = “FP16”
inference spec:
specs[“dataset”][“batch_size”] = 1 #If OOM error, decrease batch size
specs[“dataset”][“workers”] = 4
specs[“dataset”][“remap_mscoco_category”] = False
specs[“dataset”][“num_classes”] = num_classes + 1
specs[“dataset”][“augmentation”][“eval_spatial_size”] = [960, 640]
specs[“dataset”][“augmentation”][“train_spatial_size”] = [960, 640]
specs[“model”][“backbone”] = “convnext_tiny”
specs[“model”][“train_backbone”] = True
specs[“model”][“return_interm_indices”] = [1,2,3]
specs[“model”][“dec_layers”] = 6
specs[“model”][“enc_layers”] = 1
specs[“model”][“num_queries”] = 300
specs[“inference”][“input_width”] = 960
specs[“inference”][“input_height”] = 640
specs[“inference”][“outline_width”] = 5
specs[“inference”][“color_map”] = {}
specs[“inference”][“color_map”][“crack”] = “red”
specs[“inference”][“color_map”][“pothole”] = “blue”
what could cause this? i do not think it is the problem of the model as the pth model performed well on evaluation dataset.
Thank you for any insigth