Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during training of Fashion dataset classifier for 'gender' class #94

Open
Debdyuti-01 opened this issue Aug 5, 2020 · 5 comments

Comments

@Debdyuti-01
Copy link

While training the fashion data set , When it come across only classifying the gender class , it shows the below error
Screenshot (77)

@abhi-kumar
Copy link
Contributor

Please share your notebook, that will help us understand the error better

@Debdyuti-01
Copy link
Author

@abhi-kumar
Copy link
Contributor

https://drive.google.com/drive/folders/1eqcV389Jfv6MUOXVo_fHQUqvg1I39xfq

Drive link for the same.

Make the notebook public, it says access denied

@Debdyuti-01
Copy link
Author

@abhi-kumar
Copy link
Contributor

As per the code it seems a single label classification but the code used is for multi label classification.

There is a delimiter mismatch; the header has a delimiter of "," and rest of the table has whitespace as a delimiter

with open("./dataset/mod_labels.csv",'w') as f:
  f.write("ID,Labels\n")
  for key,value in mod_labels.items():
    value = list(map(str,value))
    labels = " ".join(value)
    f.write("{},{}\n".format(key,labels))
f.close()

Recommended way for single label: -
While writing to csv use pandas dataframes
a) Create a list of lists ( [[img1.jpg, "label1"], [[img2.jpg, "label2"], ... and so on)
b) Convert that to dataframe using pandas
c) Save the dataframe to csv (keep index as False)

While loading the dataset params leave out the delimiter option, it will read the csv file and detect the delimiter accordingly



Recommended way for multi label: -
While writing to csv use pandas dataframes
a) Create a list of lists ( [[img1.jpg, "label1_a label1_b"], [[img2.jpg, "label2_a label2_b"], ... and so on)
b) Every label has a whitespace between them (the delimiter)
b) Convert that to dataframe using pandas
c) Save the dataframe to csv (keep index as False)

While loading the dataset params set the delimiter option as whitespace, it will read the csv file and detect the delimiter between image and label automatically whereas the delimiter (whitespace) is user mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants