You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
985 B

  1. # imagesToDataset
  2. Gets all the images from the directories 'object' and 'noobject', and puts in a dataset file.
  3. The dataset file is a dataset.data file that contains 2 columns:
  4. - images arrays of pixels
  5. - 0 or 1, depending if is from the 'noobject' or 'object' directory
  6. First, install the libraries.
  7. ### install scikit-learn
  8. http://scikit-learn.org/stable/install.html
  9. pip install -U scikit-learn
  10. ### install scikit-image
  11. http://scikit-image.org/download
  12. pip install -U scikit-image
  13. ### install numpy
  14. https://www.scipy.org/install.html
  15. python -m pip install --upgrade pip
  16. pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
  17. ### install Pillow
  18. http://pillow.readthedocs.io/en/3.0.x/installation.html
  19. (sudo) pip install Pillow
  20. ### install matplotlib
  21. https://matplotlib.org/users/installing.html
  22. python -mpip install -U pip
  23. python -mpip install -U matplotlib
  24. may need to install python-tk:
  25. sudo apt-get install python-tk
  26. ## to run
  27. python readDataset.py