fix granularity
This commit is contained in:
@@ -45,9 +45,7 @@ class Settings(BaseSettings):
|
||||
ann_fp16_turbo: bool = False
|
||||
ann_tuning_level: int = 2
|
||||
rknn: bool = True
|
||||
rknn_textual_threads: int = 1
|
||||
rknn_visual_threads: int = 1
|
||||
rknn_facial_detection_threads: int = 1
|
||||
rknn_threads: int = 1
|
||||
preload: PreloadModelData | None = None
|
||||
max_batch_size: MaxBatchSize | None = None
|
||||
|
||||
|
||||
@@ -24,12 +24,7 @@ class RknnSession:
|
||||
self.model_path = Path(str(model_path).replace("model", soc_name))
|
||||
self.ort_model_path = Path(str(self.model_path).replace(f"{soc_name}.rknn", "model.onnx"))
|
||||
|
||||
if "textual" in str(self.model_path):
|
||||
self.tpe = settings.rknn_textual_threads
|
||||
elif "visual" in str(self.model_path):
|
||||
self.tpe = settings.rknn_visual_threads
|
||||
else:
|
||||
self.tpe = settings.rknn_facial_detection_threads
|
||||
self.tpe = settings.rknn_threads
|
||||
|
||||
log.info(f"Loading RKNN model from {self.model_path} with {self.tpe} threads.")
|
||||
self.rknnpool = RknnPoolExecutor(rknnModel=self.model_path.as_posix(), tpes=self.tpe, func=runInfrence)
|
||||
|
||||
Reference in New Issue
Block a user