mttk / stl10 Goto Github PK
View Code? Open in Web Editor NEWPython utilities for reading the STL-10 dataset: http://cs.stanford.edu/~acoates/stl10/
Python utilities for reading the STL-10 dataset: http://cs.stanford.edu/~acoates/stl10/
I was looking at https://github.com/mttk/STL10/blob/master/stl10_input.py#L60:
images = np.transpose(images, (0, 3, 2, 1))
is there a reason that you have (0, 3, 2, 1)
and not something else?
I noticed that if you change it to (0, 2, 3, 1)
the images get flipped. Does it mean that the first 96 that appears from images = np.reshape(everything, (-1, 3, 96, 96))
corresponds to the HEIGHT but the second 96 corresponds to WIDTH? When you transpose it since the 3 goes before the 2 in (0, 3, 2, 1)
it made me assume that since the 2 stayed in the same position that it was the height pixel index.
There is an error when we run the code with python 3.6.x. It says there is directory not found which needs us to create the 'img' folder in the current working directory.
I think there is os.mkdir('.\img') needed.
Thank you for this script.
If you want to create class subfolders based on class names instead of numbers insert this snippet before the save_images(images, labels)
call:
with open('data/stl10_binary/class_names.txt', 'r') as f:
names = f.read().splitlines()
i2c = {i+1:names[i] for i in range(len(names))}
labels = [i2c[i] for i in labels]
I tried running the demo but I found the following error:
(venv2) brandomiranda~/Documents/MIT/MEng/hbf_tensorflow_code/tf_tutorials/stl10 $ frameworkpython stl10_input.py
<module 'urllib' from '/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/__init__.py'>
Traceback (most recent call last):
File "stl10_input.py", line 114, in <module>
download_and_extract()
File "stl10_input.py", line 108, in download_and_extract
filepath, _ = urllib.urlretrieve(DATA_URL, filepath, reporthook=_progress)
AttributeError: module 'urllib' has no attribute 'urlretrieve'
did you ever find an error like this before?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.