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

[Enhacement] Automatic Dataset download #3

Open
okbalefthanded opened this issue Sep 5, 2018 · 7 comments
Open

[Enhacement] Automatic Dataset download #3

okbalefthanded opened this issue Sep 5, 2018 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@okbalefthanded
Copy link

A good feature to automate the benchmarking is to add a module for automatic dataset download.

@amineHorseman amineHorseman added the enhancement New feature or request label Sep 5, 2018
@justanotherlad
Copy link

@amineHorseman Hi ! I'd like to take up this issue.
Can you please guide me how to proceed with it?

@amineHorseman
Copy link
Owner

Hi @swastikbanerjee07, thank you for your help

Currently, we have to manually donwload the following 2 files before using the training script:

  • fer2013.csv
  • shape_predictor_68_face_landmarks.dat

The idea is to create a function that automatically download these 2 files when train.py or convert_fer2013_to_images_and_landmarks.py scripts are launched.

An easy way to do donwload a file in python 2 & 3 is to use urllib.request.urlretrieve function.
But you have first to check if the file was not already downloaded before.

@justanotherlad
Copy link

justanotherlad commented Oct 10, 2018

Hi! I'm new to this thing, but extremely interested, so I'd be glad to get a lil bit more help.

  1. Should I import urllib and write the code in parameters.py? Or is these any other file where I should write the code? I'm not sure which file needs to be updated to fix this issue.
  2. What is the direct url for fer2013.csv?
  3. Can we directly import csv and give the url in the urllib.request function to import the data directly automatically?
  4. How to check if the file was downloaded before? :/ I don't get you 😞🤔

@amineHorseman
Copy link
Owner

Hi,

  1. yes you should import urllib, but do not write the code in parameters.py, instead create a new file. The parameters.py file is only reserved for configuration variables.
  2. you can find the link in the readme, just follow up the link and copy the URL of the download button
  3. no urllib will donwload the file, any file, then the convert_fer2013_to_images_and_landmarks.py will automatically read the csv file and load the data
  4. just check if the file fer2013.csv exists in the main folder, if not you donwload the file using urllib, if it exists you do nothing

@TrieuLe0801
Copy link

Hi,
I have a suggestion. I think you should use imageio instead of scipy.misc.imsave because I see the imsave is removed in new version of scipy. Please try it if you think it is necessary.

@imrose23
Copy link

Hello,
I am a newbie in machine learning and currently working on making own custom dataset of facial emotions for children with ASD. I could not understand the fer13.csv format. How the pixels were taken. There is a single column for the pixels. What does it mean? When I convert my dataset into CSV, it turned out like below.
mydata

Thanks.

@rohitbabugaddeti
Copy link

Hi @amineHorseman

I am interested to do this task. Since this is an old issue, please let me know if it still needs to be done

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

6 participants