How can I label images for classification based on image name?

조회 수: 2 (최근 30일)
ghada sandoub
ghada sandoub 2020년 6월 17일
댓글: ghada sandoub 2020년 6월 18일
I want to carry out transfer learning for classification using squeezeNet for a set of images. All the images are stored in one folder and I want to classify each image based on its name (file name). For example, if the image name is '1.jpg' , its label will be '1'. so if I have 500 images in the folder , I want the network to realize that I have 500 classes. I used deep network designer in Matlab and I import data as the folder of images, then I got this training data distribution which means that all the images will be classified as one class called 'high' !!!!!. Does anyone know how to label the images based on image name in the folder? Thanks.

답변 (1개)

Ajith Krishna Kanduri
Ajith Krishna Kanduri 2020년 6월 18일
편집: Ajith Krishna Kanduri 2020년 6월 18일
Hi Sandoub,
I have understood you are facing issue in labeling the images. You can refer the following link for more information about loading data in the Deep Network Designer.
You can see in the import data tab there is an option “Select a folder with subfolder of images for each class”. Images in the subfolder are categorized into classes. Since you are using all the images from one folder, they are categorized into one class. If you want to have 500 classes, then you can use 500 subfolders.
  댓글 수: 1
ghada sandoub
ghada sandoub 2020년 6월 18일
I already think about that, however, it is very hard task to do this manually ( use 500 subfolders and put one image in each subfolder). Did you know a simple way to do this?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by