-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Is there any way to pass pre-loaded image into MLContext pipeline? #3460
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
Comments
Basically it seems to be a duplicate of #3369 but re-worded. |
Hi @ma-gu , The sample implementation creates an You can replace that with a class that has a public field You can then start your pipeline with a |
Hi @yaeldekel , Thanks. |
Hi @yaeldekel, I've implemented BitmapDataView, could you please to have a look if you spot anything obviously wrong? An issue I have currently is ML.NET throwing the following exception during prediction engine construction:
Exception is throwing from the last line in the following snippet(linked above to code in my fork of machinelearning-samples):
Unfortunately I stuck at this point and seems Exception messages from ML.NET doesn't look helpful for those who isn't familiar with this library. I have a guess that something is wrong with my BitmapDataView implementation but can't figure out what exactly. Thanks |
@wschin Does your fix address this? |
@ma-gu Did you ever get this working? |
@jamsoft Almost 2 years passed already... I believe I just gave up - otherwise I should provide working code snippet here. |
Thanks for your reply. Yeah, it's cost me a day to find out no-one can get it working and it seems like the most obvious use case as well. So odd. I also cannot use my 3090 with ML.NET as it needs drivers from 2019. I think I'm going to go look at bundling a Python exe again. |
Also me have same issue with image processing, need to look into python trainer to avoid this issue. |
System information
Issue
My intention was to implement object detection in video. Please see attached code sample and explanation below.
I wasn't able to find proper API methods for configuring MLContext pipeline.
I expected it should be possible to pass individual in-memory representation of image(as a Bitmap object for example) into pipeline.
Source code / logs
Let's pretend we have a task to run object detection model on frames coming from video stream.
It seems natural to pass 1 frame one by one as they arriving from camera.
I can't find such possibility with current MLContext pipeline and API available.
Here's example pipeline from machinelearning-samples :
Having LoadImages extension method overload accepting in-memory image representation (Bitmap or whatever) would definetly solve a problem:
public static ImageLoadingEstimator LoadImages(this TransformsCatalog catalog, params Bitmap[] images);
Am I missing some way implement this without storing frames onto the disk? Or does it mean ML.NET wasn't designed for realtime video processing?
Thanks in advance.
The text was updated successfully, but these errors were encountered: