-
Notifications
You must be signed in to change notification settings - Fork 3k
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 benchmark script for segment anything v2 #22169
Conversation
print(f"Start {config.repeats} runs of performance tests...") | ||
start = time.time() | ||
for _ in range(config.repeats): | ||
_image_features_0, _image_features_1, _image_embeddings = sam2_encoder(img) |
Check notice
Code scanning / CodeQL
Unused local variable Note
print(f"Start {config.repeats} runs of performance tests...") | ||
start = time.time() | ||
for _ in range(config.repeats): | ||
_image_features_0, _image_features_1, _image_embeddings = sam2_encoder(img) |
Check notice
Code scanning / CodeQL
Unused local variable Note
print(f"Start {config.repeats} runs of performance tests...") | ||
start = time.time() | ||
for _ in range(config.repeats): | ||
_image_features_0, _image_features_1, _image_embeddings = sam2_encoder(img) |
Check notice
Code scanning / CodeQL
Unused local variable Note
print(f"Start {config.repeats} runs of performance tests...") | ||
start = time.time() | ||
for _ in range(config.repeats): | ||
_masks, _iou_predictions, _low_res_masks = sam2_decoder(*torch_inputs) |
Check notice
Code scanning / CodeQL
Unused local variable Note
print(f"Start {config.repeats} runs of performance tests...") | ||
start = time.time() | ||
for _ in range(config.repeats): | ||
_masks, _iou_predictions, _low_res_masks = sam2_decoder(*torch_inputs) |
Check notice
Code scanning / CodeQL
Unused local variable Note
print(f"Start {config.repeats} runs of performance tests...") | ||
start = time.time() | ||
for _ in range(config.repeats): | ||
_masks, _iou_predictions, _low_res_masks = sam2_decoder(*torch_inputs) |
Check notice
Code scanning / CodeQL
Unused local variable Note
Description
Add benchmark script segment anything v2.
It depends on #22119 for onnx export, and #22167 for sam2 graph fusion.
Motivation and Context
Benchmark SAM2 model performance.