Skip to content

Fix extra allocation and copy.#149

Closed
jlennox wants to merge 2 commits into
AlturosDestinations:masterfrom
jlennox:fix/extra-allocation-and-copy
Closed

Fix extra allocation and copy.#149
jlennox wants to merge 2 commits into
AlturosDestinations:masterfrom
jlennox:fix/extra-allocation-and-copy

Conversation

@jlennox

@jlennox jlennox commented Aug 2, 2020

Copy link
Copy Markdown

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

zgabi commented Jan 17, 2021

Copy link
Copy Markdown

@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

jlennox commented Jan 17, 2021

Copy link
Copy Markdown
Author

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