dotnet / dotnet/machinelearning-samples

Create Image Classification/Clustering Sample w/ DnnImageFeaturizerTransform

Open
#225 6 comments 0 reactions 0 assignees View on GitHub
need-further-analysis
Dominant language
PowerShell
Stars
4.7k
Forks
2.7k
Avg merge
2d 22h
Merged PRs (30d)
1

Description

We do have a sample of [image classification w/ TF](https://github.com/dotnet/machinelearning-samples/blob/b40499b69fddd751f2c582e748f8f1de64497d84/samples/csharp/getting-started/DeepLearning_TensorFlowEstimator/README.md).

Instead (or in addition), we should demonstrate the use of [DnnImageFeaturizerTransform](https://github.com/dotnet/machinelearning/blob/e3830910531f00013c27391914233a085a1394a4/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs). Being easier to utilize, we should be encouraging users to make use of it.

I'd recommend using the Dog Breeds vs. Fruits dataset which we used in [NimbusML for its image examples](https://docs.microsoft.com/en-us/nimbusml/tutorials/b_f-image-processing-clustering). We currently host this dataset in our CDN for NimbusML.

In Python, the dataset / image loader looks like:
```Python
# Load image summary data from github
url = "https://express-tlcresources.azureedge.net/datasets/DogBreedsVsFruits/DogFruitWiki.SHUF.117KB.735-rows.tsv"
df_train = pd.read_csv(url, sep = "\t", nrows = 100)
df_train['ImagePath_full'] = "https://express-tlcresources.azureedge.net/datasets/DogBreedsVsFruits/" + \
df_train['ImagePath']
... load images
```

Purpose of the dataset is for example code & includes ~775 images of dogs & fruit:
![image](https://user-images.githubusercontent.com/4080826/52151638-ab89e880-2628-11e9-9df5-2b060875e56e.png)
![image](https://user-images.githubusercontent.com/4080826/52151656-b5abe700-2628-11e9-8f5a-483b3ddf20e5.png)

/cc @CESARDELATORRE, @JRAlexander

(copied from PR -- https://github.com/dotnet/machinelearning/pull/2372#pullrequestreview-199284335)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.