kkgadiraju / sat-classification-using-cnn Goto Github PK
View Code? Open in Web Editor NEWClassifying SAT-6 data using a CNN
License: MIT License
Classifying SAT-6 data using a CNN
License: MIT License
Hi there,
finally found something to read in the DeepSat Sat6 data set ( http://csc.lsu.edu/~saikat/deepsat/) provided by @kkgadiraju (SAT-Classification-Using-CNN/Preprocessing-SAT6.ipynb). However, I'm, not sure, whether the image output is correct.
Here is @kkgadiraju respective code:
data = sio.loadmat('/home/gadiraju/data/bl-slums/sat-6-full.mat')
train_X = data['train_x'].transpose()
train_Y = data['train_y'].transpose()
test_X = data['test_x'].transpose()
test_Y = data['test_y'].transpose()
annotations = data['annotations']
print train_X.shape, train_Y.shape, test_X.shape, test_Y.shape, annotations
train_X = train_X.reshape(train_X.shape[0], 28,28,4)
test_X = test_X.reshape(test_X.shape[0],28,28,4)full
print train_X.shape, test_X.shape
When I try to visualize it with
ix =100001#Type a number between 0 and 323,999 inclusive
imshow(np.squeeze(train_X[ix,:,:,0:3]).astype(int)) #Only seeing the RGB channels
plt.show()
#Tells what the image is
if train_Y[ix,0] == 1:
print ('Barren Land')
elif train_Y[ix,1] == 1:
print ('Trees')
elif train_Y[ix,2] == 1:
print ('Grassland')
elif train_Y[ix,3] == 1:
print ('Roads')
elif train_Y[ix,4] == 1:
print ('Buildings')
elif train_Y[ix,5] == 1:
print ('Water Body')
else:
print ('Other')
the resulting image is somewhat odd and patterned estranged, not showing actually what is labelled (in my opinion). Anybody there who knows the issue? Guess its just a minor one, but I somewhat do not notice, what it is.
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.