-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Remove the System.Drawing dependency #6363
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 the System.Drawing dependency #6363
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6363 +/- ##
==========================================
- Coverage 68.59% 68.51% -0.09%
==========================================
Files 1171 1166 -5
Lines 248036 246586 -1450
Branches 25736 25764 +28
==========================================
- Hits 170150 168947 -1203
+ Misses 71126 70924 -202
+ Partials 6760 6715 -45
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly comments on the API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing the API suggestions, that part LGTM. Added some comments on docs / testing. @michaelgsharp can you be sure to review usage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not totally familiar with all of the internal algorithms used, but overall LGTM.
I second most of Eric's suggestions, especially adding unit tests to MLImage.
docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ApplyONNXModelWithInMemoryImages.cs
Show resolved
Hide resolved
I hope to be able to use this version as soon as possible! Thanks |
Description
The change here is removing the dependency on System.Drawing and replacing it with a public class
Imager
for image handling. It allows users to useImager
directly for image handling. It is important to note that this is abreaking change
.The change contains update to the samples code too.
Public Interfaces
Examples
Load Image
Load from pixel data
Access the image pixel data
Save the image
*Breaking Change
The breaking change is mostly about the used data with the Image analytic transformers. Previously,
System.Drawing.Bitmap
type was used. Now this is replaced with theImager
type. Here is an example:and then use the created image object, something like:
It is a good idea to look at the sample code changes in this PR which give a better idea how users can migrate from using
System.Drawing
toImager
class.