Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to customize order of output for edge tpu detector models #9455

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

alec-groff
Copy link

Add order to config.model to allow the user the ability to specify the order of boxes, scores, class_ids, and count for their edge tpu detector output. The default value is the current setting.

Copy link

netlify bot commented Jan 26, 2024

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 61a8088
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/65b7c19febef210008b479ac

@@ -44,6 +44,7 @@ def __init__(self, detector_config: EdgeTpuDetectorConfig):
model_path=detector_config.model.path,
experimental_delegates=[edge_tpu_delegate],
)
self.order = detector_config.model.order
Copy link
Sponsor Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is a reason to set self.order every time, just set it once in init

@@ -51,6 +51,9 @@ class ModelConfig(BaseModel):
model_type: ModelTypeEnum = Field(
default=ModelTypeEnum.ssd, title="Object Detection Model Type"
)
order: list[int] = Field(
Copy link
Sponsor Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this config would apply to every detector so it needs to be used for every detector or perhaps the default value should be None and the field changes to be called custom_model_output_order or something

@@ -51,6 +51,9 @@ class ModelConfig(BaseModel):
model_type: ModelTypeEnum = Field(
default=ModelTypeEnum.ssd, title="Object Detection Model Type"
)
order: list[int] = Field(
Copy link
Sponsor Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name should be more descriptive like model_output_tensor_order or something

	modified:   frigate/detectors/plugins/cpu_tfl.py
	modified:   frigate/detectors/plugins/edgetpu_tfl.py
@bazylhorsey
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants