[Fix] Fixed the support of custom rknn models by filling the model type.

This commit is contained in:
Zhenpeng Zhou 2025-04-04 10:45:58 -07:00
parent 19fc63e3af
commit 5a6213e2c8

View File

@ -85,6 +85,9 @@ class Rknn(DetectionApi):
if "/" in model_path: if "/" in model_path:
model_props["preset"] = False model_props["preset"] = False
model_props["path"] = model_path model_props["path"] = model_path
for model_type in ModelTypeEnum:
if model_type in model_path:
model_props["model_type"] = model_type
else: else:
model_props["preset"] = True model_props["preset"] = True