File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/otx/algorithms/classification/adapters/openvino Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,16 @@ def __init__(
114114 plugin_config = {"PERFORMANCE_HINT" : "THROUGHPUT" },
115115 )
116116 self .configuration = get_cls_inferencer_configuration (self .label_schema )
117+
118+ # create a dummy hierarchical config for backward compatibility, which is not actually used
119+ if self .configuration ["hierarchical" ]:
120+ try :
121+ model_adapter .get_rt_info (["model_info" , "hierarchical_config" ])
122+ except RuntimeError :
123+ self .configuration ["hierarchical_config" ] = json .dumps (
124+ {"cls_heads_info" : {"label_to_idx" : [], "all_groups" : []}, "label_tree_edges" : []}
125+ )
126+
117127 self .model = Model .create_model (model_adapter , "otx_classification" , self .configuration , preload = True )
118128
119129 self .converter = ClassificationToAnnotationConverter (self .label_schema )
You can’t perform that action at this time.
0 commit comments