How to classify digital images that belong to one or more classes using deep learning (convolutional neural networks)? The classes of each image are described in a CSV file.

I have an image dataset.
Each image can belong to one or more classes.
That is, in the same image there are one or more classes.
The dataset has a CSV file with 5 columns, with the first column in the file name of each image and the other 4 columns refer to 4 classes (A, B, C, D).
For example the image 1.jpg may belong to class A (1) and B (1), it does not belong to class C (0) and there is uncertainty whether it belongs to class D (-1).
In other words, 1 = belongs, 0 = does not belong and -1 = uncertain.
I can't divide the dataset by classes (folders for each class), as the images can belong to several classes.
Someone can help me

Answers (1)

This is data_meta CSV
Image ,Class A, Class B, Class C, Class D
00000001_000.png,1,1,0,0
00000001_001.png,1,1,0,1
00000001_002.png,0,0,0,1
00000002_000.png,0,0,0,0
00000003_000.png,0,0,1,-1
00000003_001.png,0,-1,0,1
00000003_002.png,1,0,0,0
00000003_003.png,0,0,0,1
00000003_004.png,0,1,0,0
00000003_005.png,0,0,1,0
00000003_006.png,0,1,1,0
00000003_007.png,1,0,0,1
00000004_000.png,0,0,1,0
00000005_000.png,0,1,0,0
00000005_001.png,-1,-1,1,0
00000005_002.png,0,1,-1,0
00000005_003.png,0,0,0,1
00000005_004.png,0,0,1,0
00000005_005.png,0,1,0,0
00000005_006.png,0,0,-1,1
00000005_007.png,0,1,0,-1
00000006_000.png,0,0,0,1
00000007_000.png,0,1,0,0
00000008_000.png,0,0,1,0
00000008_001.png,0,0,0,1
......
......
......
......

5 Comments

I don't understand. You say you have the classes stored in a CSV file, so what's the problem? Just read the class out of that CSV file. Why do you even need deep learning for that???
Hello dear.
I have digital image files all in one folder. These files belong to one or more classes. The information to which class each file belongs is in a CSV file
Right, but why or how do you need to classify them again? They have ALREADY been classified and the class(es) they are believed to belong to were stored in that text file, so simply read the classification from the text file using functions like importdata(), textscan(), dlmread(), readmatrix(), etc.
This is a dataset. I want to train, validate and test a convolutional neural network so that the algorithm is able to classify an image in order to predict what kind of class an image belongs to.
Do you have solven the problem? I have the same question now :)

Sign in to comment.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Tags

Asked:

on 29 May 2020

Commented:

on 21 Jun 2023

Community Treasure Hunt

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

Start Hunting!