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

how to run generate dataset.lst code #1

Open
annabechang opened this issue May 11, 2018 · 2 comments
Open

how to run generate dataset.lst code #1

annabechang opened this issue May 11, 2018 · 2 comments

Comments

@annabechang
Copy link

annabechang commented May 11, 2018

hi, thank you for your nice code. i am a newbie in programming, would you please tell me more about how to run the generate dataset.lst code properly?
i have image stored under train folder, with images named as id_1_labels_[95, 66, 137, 70, 20].jpg. inside [] are the label of the image. i tried to run the generate dataset.lst code as:
python lstgen.py /Users/Anna/.kaggle/competitions/imaterialistchallengefashion2018/train
but the .lst file doesn't look right. thank you for your valuable help.

@leocvml
Copy link
Owner

leocvml commented May 17, 2018

hello , Sorry for my late reply
I’m not sure I understand what you mean.
you have a image and it named as id_1_labels_[95,66,137,70,20].jpg
i think first you should use

from os import listdir
train_path = 'D:/DeepLearning/ ...'  # your training image path
img_name = [f for f in listdir(train_path)]

print(img_name)

and split image_name like this

img_names = 'id_1_labels_[95, 66, 137, 70, 20].jpg'
anno = img_names.split('_')
xywhc = (anno[3].split('.')[0])[1:-1].split(',')
print(anno)
print(xywhc)

if you didn't know the WxH of image ,just use skimage or opencv to open it!
and check each shape to normalization

@annabechang
Copy link
Author

I see. and replace the #class with xywhc?
Thank you for such detailed explanation!

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