Tessellate-Imaging / monk_v1

Monk is a low code Deep Learning tool and a unified wrapper for Computer Vision.
Apache License 2.0
582 stars 215 forks source link

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

Open Debdyuti-01 opened 4 years ago

Debdyuti-01 commented 4 years ago

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

abhi-kumar commented 4 years ago

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

Debdyuti-01 commented 4 years ago

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

Drive link for the same.

abhi-kumar commented 4 years ago

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

Drive link for the same.

Make the notebook public, it says access denied

Debdyuti-01 commented 4 years ago

https://colab.research.google.com/drive/1HsTP_nKT4uaPZce-NwdUT8lucxSCy37C?usp=sharing

abhi-kumar commented 4 years ago

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.