From 8b8bb677b4d806f6bfcb9928540591c71380ef55 Mon Sep 17 00:00:00 2001 From: beniz Date: Mon, 6 Mar 2023 15:18:52 +0100 Subject: [PATCH] fix: vitclip16 requires 224 input size --- options/base_options.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/options/base_options.py b/options/base_options.py index 068836368..d4db21860 100644 --- a/options/base_options.py +++ b/options/base_options.py @@ -898,6 +898,14 @@ def _after_parse(self, opt, set_device=True): "Bounding box class selection requires --data_sanitize_paths" ) + # vitclip16 projector only works with input size 224 + if opt.D_proj_network_type == "vitclip16": + if opt.D_proj_interp != 224: + warnings.warn( + "ViT-B/16 (vitclip16) projector only works with input size 224, setting D_proj_interp to 224" + ) + opt.D_proj_interp = 224 + self.opt = opt return self.opt