From 8cd4c45dd35b0436a1a5b24219e58134a5b6b7e8 Mon Sep 17 00:00:00 2001 From: Jincheng Chen Date: Wed, 17 Jun 2020 03:46:04 +0000 Subject: [PATCH] update convert to image directory --- .../convert-to-image-directory.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/articles/machine-learning/algorithm-module-reference/convert-to-image-directory.md b/articles/machine-learning/algorithm-module-reference/convert-to-image-directory.md index 4cf3bac585914..12c5ca957ed69 100644 --- a/articles/machine-learning/algorithm-module-reference/convert-to-image-directory.md +++ b/articles/machine-learning/algorithm-module-reference/convert-to-image-directory.md @@ -23,18 +23,28 @@ This article describes how to use the Convert to Image Directory module to help Following dataset formats are supported: - Compressed file in these extensions: '.zip', '.tar', '.gz', '.bz2'. - - Folder containing 1 compressed file in above valid extensions. - - Folder containing images. + - Folder containing images. **Highly recommend compressing such folder first then use the compressed file as dataset**. > [!NOTE] - > Image category can be recorded in module output if this image dataset is organized in torchvision ImageFolder format, please refer to [torchvision datasets](https://pytorch.org/docs/stable/torchvision/datasets.html#imagefolder) for more information. Otherwise, only images are saved. + > If use image dataset in supervised learning, label is required. + > For image classification task, label can be generated as image 'category' in module output if this image dataset is organized in torchvision ImageFolder format. Otherwise, only images are saved without label. Here is an example of how you could organize image dataset to get label, use image category as subfolder name. Please refer to [torchvision datasets](https://pytorch.org/docs/stable/torchvision/datasets.html#imagefolder) for more information. + > + > ``` + > root/dog/xxx.png + > root/dog/xxy.png + > root/dog/xxz.png + > + > root/cat/123.png + > root/cat/nsdf3.png + > root/cat/asd932_.png + > ``` 3. Submit the pipeline. ## Results The output of **Convert to Image Directory** module is in Image Directory format, and can be connected to other image related modules of which the input port format is also Image Directory. -​ + ## Technical notes ### Expected inputs