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

Remove parametrization of fields names #404

Closed
grzegorz-roboflow opened this issue May 17, 2024 · 0 comments · Fixed by #409
Closed

Remove parametrization of fields names #404

grzegorz-roboflow opened this issue May 17, 2024 · 0 comments · Fixed by #409
Assignees

Comments

@grzegorz-roboflow
Copy link
Contributor

Follow-up of code review comment:

[loud thinking / suggestion] Maybe I do not get the full context here, but if we are converting inference results to sv detections, then maybe we could get rid of parametrisation of fields names that are related to responses in favour of constants (or even get rid of operations on dicts in favour of operating on responses objects, but then what with QR codes and barcodes). Then we could also name the input parameter as batch_inference_results and just return list[sv.Detections] without embedding that into dict["predictions"] = [<sv.Detections>]. That would shift the responsibility of forming proper outputs of blocks into caller which owns this. Obviously that would cost another round of for-loop on the caller side, but what is visible in barcode detection - the fact that other keys that predictions_key are forgotten in output list of dicts actually makes this function harder to read and understand in global context.

Originally posted by @PawelPeczek-Roboflow in #392 (comment)

@grzegorz-roboflow grzegorz-roboflow self-assigned this May 17, 2024
@grzegorz-roboflow grzegorz-roboflow linked a pull request May 21, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant