Skip to content

Commit

Permalink
fix default model for rknn detector (#12807)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcA711 authored Aug 7, 2024
1 parent 701f6eb commit eace948
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frigate/detectors/plugins/rknn.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
class RknnDetectorConfig(BaseDetectorConfig):
type: Literal[DETECTOR_KEY]
num_cores: int = Field(default=0, ge=0, le=3, title="Number of NPU cores to use.")
purge_model_cache: bool = Field(default=True)


class Rknn(DetectionApi):
Expand All @@ -36,7 +35,9 @@ def __init__(self, config: RknnDetectorConfig):
core_mask = 2**config.num_cores - 1
soc = self.get_soc()

model_props = self.parse_model_input(config.model.path, soc)
model_path = config.model.path or "deci-fp16-yolonas_s"

model_props = self.parse_model_input(model_path, soc)

if model_props["preset"]:
config.model.model_type = model_props["model_type"]
Expand Down

0 comments on commit eace948

Please sign in to comment.