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
Searching for documentation on image regression #5595
Comments
@justinormont could I have to take a quick look at this? |
Using AutoML@Titibo26 -- You can have AutoML run the model selection and hyperparameter optimization for you. You would want to feed your current image pipeline as a You'll want to also tell AutoML to ignore the original filenames, otherwise it will treat them as features, causing leakage. Non-AutoMLFor you current pipeline, you can just replace your current trainer with a regression trainer. You also won't need the For the evaluation step, you'll need to switch from |
Hi, thank you for the answer. Firstly, the DataView interface that i need should be a collection of object containing the RGB string path AND the depth string Path, right ? Regarding the example, the process create a dataview containing paths to images files as shown : Next step is about prefeaturizing data. Regarding method's doc, i guess the aim is to tell autoML which value is what. Next step is about customizing columninformations. This is where i need to tell autoML that my column with rbg path and my column with depth path are images. I also need to tell it to not take column name / label into account. I can then handle next steps of th experiment... So far, when i run my experiment with I think my mistakes are in "prefeaturizing " and in "customizing columninformations". ` public static void GenerateModel()
` TD |
For a regression task, you'll have ensure the datatype of the It would be helpful if you could post a zip of the full solution, or more simply place a copy unzipped in a new github repo. PreFeaturizerThe preFeaturizer will consist of the pipeline which loads the image from disk, extracts the pixels, and runs the ONNX/TF model. IEstimator<ITransformer> preFeaturizer = mlContext.Transforms.LoadImages(outputColumnName: "input", imageFolder: _imagesFolder, inputColumnName: nameof(ImageData.InputImagePath))
// The image transforms transform the images into the model's expected format.
.Append(mlContext.Transforms.ResizeImages(outputColumnName: "input", imageWidth: InceptionSettings.ImageWidth, imageHeight: InceptionSettings.ImageHeight, inputColumnName: "input"))
.Append(mlContext.Transforms.ExtractPixels(outputColumnName: "input", interleavePixelColors: InceptionSettings.ChannelsLast, offsetImage: InceptionSettings.Mean))
.Append(mlContext.Model.LoadTensorFlowModel(_inceptionTensorFlowModel)
.ScoreTensorFlowModel(outputColumnNames: new[] { "softmax2_pre_activation" }, inputColumnNames: new[] { "input" }, addBatchDimensionInput: true)) Column purposes // STEP 3: Customize column information returned by InferColumns API.
ColumnInformation columnInformation = columnInference.ColumnInformation;
columnInformation.CategoricalColumnNames.Remove("label");
columnInformation.LabelColumnName = "label";
columnInformation.IgnoredColumnNames.Add(nameof(ImageData.InputImagePath)); |
Here is a repo with the zipped Solution : I still can't figure how to convert my CSV with images' Paths to image input for autoML. Thank you EDIT: On my final implementation it seems that i get my data loaded but an exception is fired when i execute the experiment : |
Hi,
I think this can be done though regression with resnet or densenet.
I have a dataset ( https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html ) with pairs of pictures (input / result needed) :
Rgb_img_1 / depth_img_1
And i have an Excel file with each path to each files.
I started with the multiclassification tutorial ( https://docs.microsoft.com/fr-fr/dotnet/machine-learning/tutorials/image-classification ) but now, i have to translate it to a regression model as i'm searching for depth values for each pixel of a picture.
I know that i have to change my model generation :
`
public static ITransformer GenerateModel(MLContext mlContext)
{
`
Could you tell me where can i find docs and ressources to understand :
Also, i have a .onnx of densenet. would it be easier to go this way instead of using a ml.net model ? (but i'd like to deeply understand ml.net framework)
Also i took a look on autoMl but i dont think it can resolve my regression problem with images input. Is this right ?
Thanks,
The text was updated successfully, but these errors were encountered: