-
Notifications
You must be signed in to change notification settings - Fork 216
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
Mediapipe generic metrics demo #3054
Conversation
@@ -172,7 +173,7 @@ def display(self): | |||
self.pq.put((sent_frame_id, received_frame, timestamp)) | |||
|
|||
def get_timestamp(self) -> int: | |||
return int(cv2.getTickCount() / cv2.getTickFrequency() * 1e6) | |||
return int(time.time() * 1e6) |
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 this change? why do we still want to stamp it manually? should we rely on automatic stamping?
otherwise the metric is wrong - we take into account client->server network transfer time
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.
fixed that, now benchmarking is based on server side timestamps. Client side timestamps are now only used to order frames while using legacy(non-streaming) method.
@@ -232,7 +233,7 @@ def start(self, *, ovms_address : str, input_name : str, model_name : str, datat | |||
inputs=[grpcclient.InferInput(input_name, np_frame.shape, datatype.string())] | |||
inputs[0].set_data_from_numpy(np_frame) | |||
if streaming_api: | |||
triton_client.async_stream_infer(model_name=model_name, inputs=inputs, parameters={"OVMS_MP_TIMESTAMP":self.get_timestamp()}) | |||
triton_client.async_stream_infer(model_name=model_name, inputs=inputs) |
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 do we still have get_timestamp if we dont use it here?
bd053a3
to
5dd015b
Compare
d6cef4d
to
0e4a084
Compare
5dd015b
to
43e1c69
Compare
f97f626
to
87121dd
Compare
ef43bc6
to
df10202
Compare
87121dd
to
06489ea
Compare
df10202
to
626fb8b
Compare
06489ea
to
6ef988d
Compare
6ef988d
to
e8a7d5f
Compare
🛠 Summary
JIRA/Issue if applicable.
Describe the changes.
🧪 Checklist
``