Welcome to Practice Problem : Identify the Apparels


#1

Welcome to Practice Problem: Identify the apparels

This will be the official thread for any discussion related to the practice problem. Feel free to ask questions, share approaches and learn.


#2

your training data is not in appropriate manner . that is mixture of all the images .
you have to assign 9 folders for all the similar images like one for shoes one for mans clothes like this.
how i differentiate 60000 example in 9 different category manually.this is not good effort to start with problem. please do something .


#3

Hi @hari86,

You have been provided a train.csv file which contains the name of the image and their corresponding classes. You can make use of this train.csv file to read the images from the apparel images. Similarly, you can make use of the test.csv file to read testing images. Note that both training and testing images are in the same folder.

Here is a sample code to read the images with respect to their corresponding classes:

# Reading the train and test file
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline

train = pd.read_csv(name of train file)
test = pd.read_csv(name of test file)

# Reading the images
X = []
for img_name in train.image:     # replace train.image with the column name in train file
    img = plt.imread('Image_path' + img_name) # give the path of the image
    X.append(img)
X = np.array(X)

Now you have an array containing the images. Similarly, you can read the testing images.

Hope this helps!!