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

Improved image upload #58

Merged
merged 29 commits into from
Mar 5, 2025
Merged

Improved image upload #58

merged 29 commits into from
Mar 5, 2025

Conversation

denniswittich
Copy link
Contributor

@denniswittich denniswittich commented Feb 28, 2025

Implementation of new upload strategy.
Basic concept: Hold a list of items to upload which is cut off if it gets to long.
In each update cycle the first BS items are uploaded.
There is a priority queue with images that are not dropped and always uploaded fist.

Fixes an error due to an unclosed clientsession where we forgot to await the response.

BREAKING CHANGE:
The abstract method evaluate which needs to be implemented by detectors now provides the raw jpg image bytes instead of a semi-converted np.array. This means if the detector uses cv2, reading the file can be done with cv_image = cv2.imdecode(np.frombuffer(image, np.uint8), cv2.IMREAD_COLOR). Alternatively PIL could be used as well.

@denniswittich denniswittich requested review from NiklasNeugebauer and removed request for NiklasNeugebauer February 28, 2025 13:57
@denniswittich
Copy link
Contributor Author

PR is done... I will do some smoke tests and wait for the loop PR to get green with this branch

@denniswittich denniswittich merged commit 73221a0 into main Mar 5, 2025
3 checks passed
@denniswittich denniswittich deleted the improved-image-upload branch March 5, 2025 10:22
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 this pull request may close these issues.

2 participants