-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support all detector modes #95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks about right to me.
for i, roi in enumerate(rois): | ||
geometry = rois[i]["geometry"] | ||
# TODO add validation to calculate x and y automatically | ||
x = 0.5 * (geometry["left"] + geometry["right"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we calculating the centers here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ImageQuery
model from the SDK requires x
and y
to be specified. Tyler thinks there's a way to get pydantic to do this automatically, but for now this seems easiest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah apparently Avi asked for the sdk to return the centers of the bboxes as well as left, top, right, bottom coordinates. Tim likes this too.
|
||
if multi_predictions is not None and predictions is not None: | ||
raise ValueError("Got result with both multi_predictions and predictions.") | ||
if multi_predictions is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's a "multi_prediction"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the field where multiclass/counting results are returned through.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm late to the party, this is great support for secondary predictions, but we'll eventually need to return to this to fully support the detector mode architecture
image_query = create_iqe( | ||
detector_id=detector_id, | ||
result_type=result_type, | ||
label=results["label"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to change soon, you'll need to populate this field according to the mode type
@@ -25,15 +28,15 @@ def create_iqe( | |||
created_at=datetime.utcnow(), | |||
query=query, | |||
detector_id=detector_id, | |||
result_type=ResultTypeEnum.binary_classification, | |||
result_type=result_type, | |||
result=BinaryClassificationResult( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to use a different type here for counting modes
Add support to the edge endpoint for all detector modes. Adds some basic tests to ensure responses are being parsed correctly.