Skip to content

Commit 80801ef

Browse files
chyomin06fracape
authored andcommitted
[feat] exit when all stages of the feature codecs are bypassed, default vision performances should be measured using the dedicated script default_vision_performances.sh"
1 parent 1ec72d9 commit 80801ef

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

compressai_vision/codecs/fctm.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,21 @@ def __init__(self, **kwargs):
5353
kwargs["mac_computation"],
5454
)
5555

56+
tools = kwargs["tools"]
57+
if (
58+
tools["feature_reduction"]["type"] == "bypass"
59+
and tools["conversion"]["type"] == "bypass"
60+
and tools["inner_codec"]["type"] == "bypass"
61+
):
62+
print(
63+
"[!WARNING] => Configuration tells no split inference.\n",
64+
"If non-split performance evaluation is needed, \n",
65+
"please refer to 'default_vision_performances.sh' \n",
66+
"under the compressai_vision/scripts/evaluation folder.\n",
67+
)
68+
69+
raise SystemExit()
70+
5671
self.qp = kwargs["enc_configs"]["qp"]
5772
self.eval_encode = kwargs["eval_encode"]
5873

0 commit comments

Comments
 (0)