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

Fix extra allocation and copy. #149

Closed
wants to merge 2 commits into from
Closed

Fix extra allocation and copy. #149

wants to merge 2 commits into from

Conversation

jlennox
Copy link

@jlennox jlennox commented Aug 2, 2020

Inside YoloWrapper.Detect(byte[]) there's a costly allocation and copy of the image buffer. This can be prevented by pinning the provided array instead.

There was also Marshal.SizeOf(imageData[0]) which since the supplied buffer is byte[] is an expensive way (has a memory read and Marshal.SizeOf is not cheap/free like sizeof) to get the constant 1.

@zgabi
Copy link

zgabi commented Jan 17, 2021

@jlennox The previous maintainer of this pachkage left the company, see #143.
I've created a copy from this repository and added this functianlity.
https://github.com/zgabi/Yolo.Net

Also created a nuget package: https://www.nuget.org/packages/Yolo.Net/3.0.6-alpha.1

Feel free to crete PRs on my repository.

@jlennox
Copy link
Author

jlennox commented Jan 17, 2021

Thanks.

@jlennox jlennox closed this Jan 17, 2021
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