Skip to content

Commit 9f4a34b

Browse files
author
Songki Choi
committed
Fix wrong label settings for non-anomaly task ModelAPIs
Signed-off-by: Songki Choi <[email protected]>
1 parent c461200 commit 9f4a34b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/otx/api/usecases/exportable_code/demo/demo_package/model_container.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""ModelContainer class used for loading the model in the model wrapper."""
2-
# Copyright (C) 2022 Intel Corporation
2+
# Copyright (C) 2022-2023 Intel Corporation
33
# SPDX-License-Identifier: Apache-2.0
4-
#
54

65
import importlib
76
import json
@@ -64,7 +63,8 @@ def __init__(self, model_dir: Path, device="CPU") -> None:
6463
else ["Normal", "Anomaly"]
6564
)
6665
else:
67-
self.model_parameters["labels"] = []
66+
# model already contains correct labels
67+
self.model_parameters.pop("labels")
6868

6969
self._initialize_wrapper()
7070
self.core_model = Model.create_model(

0 commit comments

Comments
 (0)